[FFmpeg-user] screen capture - small files

Jesper Hedin jesper.hedin at intaktus.se
Wed Nov 25 12:01:00 CET 2015


Hello all!

Than you all for the feedback on my question regarding small files. I have now landed in this command:

ffmpeg  -t 5 -f avfoundation -i "1:0" -pixel_format nv12 -c:v mpeg4 -c:a aac -strict -2 -framerate 3 -r 3  -b:v 1024  -ac 1 -sample_rate 22050 outfile.mp4


However, it is not quite there yet. What I am missing is audio played normally over a video that plays in 3 fps. With the above command all audio seems to be captured at ”3fps” and then played much faster, like 24 fps or whatever. Anyway, the audio plays quickly in the beginning and then silence.

So is there any way to capture audio during the whole session, in sync with the video which is captured at 3 fps?

(As you see i am not a power user… this is alien to me… ) :-) 




> 23 nov. 2015 kl. 19:28 skrev Thilo Borgmann <thilo.borgmann at mail.de>:
> 
> Hi,
> 
> Am 23.11.15 um 14:09 schrieb Moritz Barsnick:
>> On Mon, Nov 23, 2015 at 08:27:02 +0100, Jesper Hedin wrote:
>>> ffmpeg  -f avfoundation -i "1:0" -c:v mpeg4 -c:a aac -strict -2 -r 3 -b:v 1024 out.mp4
>> 
>> Another recommendation (OT):
>> You are using "-r" as an output option. So you are resampling whatever
>> capture framerate your device gives you to 3 fps. You are probably
>> *not* capturing at 3 fps. If you had shown us your complete console
>> output, I might have been able to tell. ;-)
>> 
>> I recommend using the input option "-framerate 3" instead.
> 
> yes.
> 
>>> [avfoundation @ 0x7fc535000000] Overriding selected pixel format to use uyvy422 instead.
>> [...]
>>> Incompatible pixel format 'uyvy422' for codec 'mpeg4', auto-selecting format ’yuv420p'
>> [...]
>> [avfoundation @ 0x7f9c24800000] Overriding selected pixel format to use uyvy422 instead.
>> 
>> None of the avfoundation device's pixel formats maps well to your mpeg4
>> output. If yuv420p output is okay for you, ffmpeg is probably already (by
>> chance) choosing proper pixel format settings and conversions for you,
>> but you can choose to select what you need manually, by specifying
>> input "-pixel_format" and output "-pix_fmt" options.
> 
> choose "-pixel_format nv12". This is planar yuv420p and conversion
> should be as fast as possible (if mpeg4 does not support nv12 directly).
> 
> -Thilo
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list