nicer ffmpeg & bitrate fix

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
jfkastner
Posts: 74
Joined: Wed Jun 17, 2009 11:52 pm

nicer ffmpeg & bitrate fix

Post by jfkastner »

ubu 904 / zm 1242 - the video generation locked up my system too much, zmc lost frames, and the bitrate was all over

my quick fix: in zmvideo.pl toward the end change a few lines to


my $ffmpegbitrate = $frame_rate*200000;

my $command = " nice -n 10 ".ZM_PATH_FFMPEG." -y -r $frame_rate ".ZM_FFMPEG_INPUT_OPTIONS." -i %0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg -b ".$ffmpegbitrate." -s $video_size ".ZM_FFMPEG_OUTPUT_OPTIONS." '$video_file' > ffmpeg.log 2>&1";


if you add a " & " after the &1 in the last line ffmpeg runs in the background, even nicer (since you can still use the ZM menus) - but you have to refresh/F5 the dialog to see the generated video file

maybe someone else can make this better?
Post Reply