Reputation: 4167
In linux, I use following code to cast android screen to pc, it work well
adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" | ffplay -
so I think exist way to redirect screenrecord output to pc storage, so I try following code
adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" >> /tmp/t.mp4
but the output video file cannot be opened by vlc and google-chrome, how to fix it?
ffplay is belongs ffmpeg, so I guess exist similar cli in ffmpeg to output input video streaming into video file
Upvotes: 0
Views: 3542
Reputation: 4167
I find the soluiton, use default ffmpeg, in latest linux mint, it use avconv
to instead ffmpeg
, but 2 clis syntax are same, following is my code
adb shell "screenrecord --time-limit 1 --output-format=h264 -; screenrecord --time-limit 180 --output-format=h264 -" | avconv -i - /tmp/t.mp4
Upvotes: 1