[Sticky] CasparCG 2.0 - Maximum H.264 Performance

#1
I would like suggest that if you want to play H.264 media that you encode/transcode it with FFmpeg and provide in addition to other arguments the "-tune fastdecode" argument. This will give ~x4 faster decoding speed although with some decreased compression efficiency.
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.

Re: [Sticky] CasparCG 2.0 - Maximum H.264 Performance

#2
Robert Nagy wrote:I would like suggest that if you want to play H.264 media that you encode/transcode it with FFmpeg and provide in addition to other arguments the "-tune fastdecode" argument. This will give ~x4 faster decoding speed although with some decreased compression efficiency.
What are the FFMpeg output parameters that you suggest to specify (next to -tune fastdecode) for good quality H264 content for use in Caspar? (using the LibAV fork or the original FFMpeg code? Which version(s)?)


We can optimize our transcoding pipeline for Caspar with it.
Running Caspar for a local dutch station using DeckLink 3D+ broadcasting HD (1080i) and SD (PAL 576i) and a test rig with Intenisty Pro...

Re: [Sticky] CasparCG 2.0 - Maximum H.264 Performance

#3
My personal recommendation using the latest build http://ffmpeg.zeranoe.com/builds/ is something like:

-acodec libmp3lame -ac 2 -ar 48000 -ab 256k -request_sample_fmt s16 - vcodec libx264 -g 50 -tune fastdecode -crf 16 -crf_max 22 -threads 0

If you have interlaced content also add, -flags +ildct+ilme -top 1
CasparCG Integrator, Developer and Consultant
Former CasparCG Lead Developer
Feel free to contact me (ronag@live.com) if you need any CasparCG related support, development or other consulting.

Re: [Sticky] CasparCG 2.0 - Maximum H.264 Performance

#6
I noticed that decoding h264 in ffmpeg-producer is made using single thread (while ffmpeg.exe uses multithreading decoding h264)

There is comment in code of ffmpeg-producer

Code: Select all

// Some codecs don't like to have multiple multithreaded decoding instances. Only enable for those we know work.
Doesn't h264 like realy? I tried to include h264 to "multithread-allow" list

Code: Select all

AVCodecID supported_codecs[] = {CODEC_ID_MPEG2VIDEO, CODEC_ID_PRORES, CODEC_ID_FFV1, CODEC_ID_H264};
And everything was OK, h264 decoding performance was increased by almost <cpu count> times

Who is online

Users browsing this forum: No registered users and 3 guests

cron