ffmpeg codec for webcam > Better bitrate or raw file output - Raspberry Pi Forums


hello raspberry pi forum,

got problem ffmpeg recording of webcam. following command runs well, first frames best quality, quality runs low each further frame.

code: select all

ffmpeg -f video4linux2 -i /dev/video0 ~/test.avi 
searched several ours in web best ffmpeg solutions, didn't find any. result made libx264, raspberry pi (version 3) slow in converting native mp4 x264.

setting file extension .mkv or .mp4 cause x264-codec working 99% cpu. .avi extension causes 40-50% of cpu load.

my question:
there solution set .avi-compression bitrate and/or possible write raw-stream file?

thank in advance

best regards

rivertoy

i found answer myself.

add parameter:

code: select all

-qscale:v 1
value 1 highest quality , 31 lowest quality (smallest file size).

hope other ones.


raspberrypi



Comments