It is currently 26 May 2017, 23:44



[Sticky] CasparCG 2.0 - Maximum H.264 Performance

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

[Sticky] CasparCG 2.0 - Maximum H.264 Performance

Postby Robert Nagy » 06 Jul 2011, 13:47

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.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

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

Postby kiddigital » 23 Aug 2011, 21:46

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...
User avatar
kiddigital
 
Posts: 45
Joined: 26 Oct 2010, 18:20
Location: Netherlands

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

Postby Robert Nagy » 24 Aug 2011, 07:07

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.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

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

Postby siconova » 05 Feb 2012, 22:28

Hi,

Robert Nagy wrote:If you have interlaced content also add, -flags +ildcr+ilme -top 1


I tried the feature for interlaced content and I'm having some error messages.. it's there a possibility that the line is "-flags +ildct+ilme -top 1" instead?
siconova
 
Posts: 81
Joined: 04 May 2011, 20:02

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

Postby Robert Nagy » 05 Feb 2012, 22:42

ildct is correct.
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.
Robert Nagy
 
Posts: 1271
Joined: 20 Apr 2009, 20:22
Location: Gothenburg, Sweden

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

Postby fedorsymkin » 29 May 2015, 17:20

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
fedorsymkin
 
Posts: 36
Joined: 04 Apr 2014, 15:55


Return to Tech and Development

Who is online

Users browsing this forum: No registered users and 2 guests