[FFmpeg-user] Large file sizes on recording.
leonard at kcfchurch.org
Wed Feb 26 18:10:56 CET 2014
I'm using a bash script to on a linux (Ubuntu) machine to record and HLS
live stream to a remote Wowza server for live services. The services
usually run for about 1.5 hours. I'm using a Decklink SDI video input
card. I'm splitting the output from bmdcapture (using "tee") to two
separate ffmpeg instances, the first for HLS and the second for recording
to an mp4 file. For a while I've been recording at 720x400 at 30 fps
using libx264 with "-vcodec libx264 -preset medium -vb 1000k -vprofile
baseline -level 3.1 -pix_fmt yuv420p" which would generally give me a file
size around 800 MB on average.
Of course this is not HD and we have all this expensive HD equipment that
gives us HD but I'm not recording HD with these parameters.
Naturally, my boss wants HD and I want to give it to him. Problem is, with
the new parameters that keeps the CPU utilization to about 90-110% (as low
as I could get it on the 4 core processor last night while playing around
with the parameters) the file size is going to be somewhere around 1.7
terabytes. Here's the recording part of the bash script:
/home/suser/bin/ffmpeg -nostats -itsoffset -0.2 -i - \
-copytb -1 \
-async -1 $OUTFILEAUDIO \
-vcodec libx264 -preset veryfast -crf 22 -vprofile baseline -level 4.1
-pix_fmt yuv420p \
-flags +ilme+ildct \
-y $OUTFILE \
< "$fifoFILEname" 2>> liveFILE.log & ffmpegFILEpid=$!
The current output from this line is 1280x720 @59.95 fps.
I'm thinking that I'm probably not getting it right since I've seen cameras
able to record HD to a much smaller file on the fly from a live source.
If not, is there some post-processing I can do on the file to make it much
smaller? Should I record to a different format first if there is?
Thanks in advance for any advice.
More information about the ffmpeg-user