How to record temporary screen recording using ffmpeg

I am on a Mac with MacOS Sierra installed. I installed ffmpeg with homebrew. I list my devices through:

ffmpeg -f avfoundation -list_devices true -i ""

which returns:

[AVFoundation input device @ 0x7fc2de40e840] AVFoundation video devices:
[AVFoundation input device @ 0x7fc2de40e840] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7fc2de40e840] [1] Capture screen 0
[AVFoundation input device @ 0x7fc2de40e840] AVFoundation audio devices:
[AVFoundation input device @ 0x7fc2de40e840] [0] Built-in Microphone

I don’t need sound, so I start my 5 second screen recording through:

ffmpeg -f avfoundation -t '5' -i '1' test.mov

It creates a mov file in the working directory, but does not stop after 5 seconds. In fact, I can’t even stop recording as it suggests by pressing "q". Ctl-C does not work either, and I remain with the strength leaving the Activity Activity. I tried the same command but using device 0 (FaceTime camera) and it stops after 5 seconds.

- , : quicktime ( , - ), FaceTime QuickTime. : " ". VLC.

: (Yosemite) (, , ).

+4
1

, , .

, :

ffmpeg -f avfoundation -i "1" out.mov

, :

[mov @ 0x7f7fcf19da00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
......
[mov @ 0x7f7fcf19da00] WARNING codec timebase is very high. If duration is too long,
file may not be playable by quicktime. Specify a shorter timebase
or choose different container.

fps 1000k, .

, fps. yuv420p, yuv422p :

ffmpeg -f avfoundation -i "1" -pix_fmt yuv420p -r 25 -t 5 out.mov

2013-mid MBP MacOS sierra, brew ffmpeg 3.1.1.

+4

Source: https://habr.com/ru/post/1656005/


All Articles