[FFmpeg-user] Large file sizes on recording.
bouke at videotoolshed.com
Thu Feb 27 11:52:20 CET 2014
----- Original Message -----
From: "Leonard Bogard" <leonard at kcfchurch.org>
To: "FFmpeg user questions" <ffmpeg-user at ffmpeg.org>
Sent: Wednesday, February 26, 2014 6:10 PM
Subject: [FFmpeg-user] Large file sizes on recording.
> 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,
> 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:
This is very, very large! Sounds like uncompressed, not H264...
Something is definitly wrong, are you sure you don't mean 1.7 gigabyte?
(That would make more sense...)
> /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.
Are you sure you want interlaced video? (I since you don't de-interlace and
have a funny FPS)
> I'm thinking that I'm probably not getting it right since I've seen
> 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?
Generally, if you want the best quality / data rate, you need to set your
preset as slow as possible.
(In real life, 'slow' is good enough for rock 'n roll in most cases.)
If you can live with a low-res file for live, and need to publish the
archive later, you could capture the source to MpegII next to the H264
That has extremely low CPU cost, with a trade off for larger file sizes, but
you can re-compress that later.
(Or, use a 'pro' codec as an inbetween)
> Thanks in advance for any advice.
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user