dexvx 1 Posted March 25, 2018 Posted March 25, 2018 (edited) Been trial and erroring some HEVC transcoding performance issues. Seems to be some issues reading the pgs subtitles? [matroska,webm @ 000000de125dcd40] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified sizeConsider increasing the value for the 'analyzeduration' and 'probesize' options[matroska,webm @ 000000de125dcd40] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified sizeConsider increasing the value for the 'analyzeduration' and 'probesize' options[matroska,webm @ 000000de125dcd40] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified sizeConsider increasing the value for the 'analyzeduration' and 'probesize' options[matroska,webm @ 000000de125dcd40] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified sizeConsider increasing the value for the 'analyzeduration' and 'probesize' options ----------------------------------------- I installed a Quadro P600 (Pascal GPU). With subtitles enabled (on client target), in the logs, I see something like this: frame= 4017 fps= 14 q=15.0 size=N/A time=00:03:50.89 bitrate=N/A speed=0.779x [graph 0 input from stream 0:3 @ 0000006495e7b0c0] Changing frame properties on the fly is not supported by all filters. Last message repeated 1 timesframe= 4025 fps= 14 q=15.0 size=N/A time=00:03:51.08 bitrate=N/A speed=0.778x [graph 0 input from stream 0:3 @ 0000006495e7b0c0] Changing frame properties on the fly is not supported by all filters. Last message repeated 1 timesframe= 4033 fps= 14 q=15.0 size=N/A time=00:03:51.46 bitrate=N/A speed=0.778x [graph 0 input from stream 0:3 @ 0000006495e7b0c0] Changing frame properties on the fly is not supported by all filters.frame= 4041 fps= 14 q=16.0 size=N/A time=00:03:51.89 bitrate=N/A speed=0.778x Quadro P600 with subtitles disabled (on client target): frame= 7877 fps= 35 q=15.0 size=N/A time=00:10:22.83 bitrate=N/A speed=2.78x frame= 7896 fps= 35 q=14.0 size=N/A time=00:10:23.53 bitrate=N/A speed=2.78x frame= 7915 fps= 35 q=14.0 size=N/A time=00:10:24.45 bitrate=N/A speed=2.77x frame= 7934 fps= 35 q=14.0 size=N/A time=00:10:25.24 bitrate=N/A speed=2.77x frame= 7955 fps= 35 q=13.0 size=N/A time=00:10:26.03 bitrate=N/A speed=2.77x frame= 7976 fps= 35 q=13.0 size=N/A time=00:10:26.86 bitrate=N/A speed=2.77x frame= 7996 fps= 35 q=16.0 size=N/A time=00:10:27.84 bitrate=N/A speed=2.76x ----------------------------------------- Now with software (no hardware acceleration) transcoding, subtitles enabled (on client target). Avg CPU Usage is ~33%. frame= 560 fps= 14 q=28.0 size=N/A time=00:00:23.72 bitrate=N/A speed=0.577x frame= 568 fps= 14 q=28.0 size=N/A time=00:00:24.06 bitrate=N/A speed=0.577x frame= 575 fps= 14 q=28.0 size=N/A time=00:00:24.34 bitrate=N/A speed=0.576x frame= 582 fps= 14 q=28.0 size=N/A time=00:00:24.76 bitrate=N/A speed=0.579x frame= 590 fps= 14 q=28.0 size=N/A time=00:00:25.02 bitrate=N/A speed=0.578x Software (no hardware acceleration) with subtitles disabled (on client target). Avg CPU usage is now ~70%! But now at least the transcoding fps is good for viewing. Seems like the process was waiting for something with subtitles enabled? frame= 4347 fps= 35 q=28.0 size=N/A time=00:04:34.67 bitrate=N/A speed= 2.2x frame= 4367 fps= 35 q=28.0 size=N/A time=00:04:35.61 bitrate=N/A speed=2.19x frame= 4389 fps= 35 q=28.0 size=N/A time=00:04:36.50 bitrate=N/A speed=2.19x frame= 4410 fps= 35 q=28.0 size=N/A time=00:04:37.40 bitrate=N/A speed=2.19x frame= 4429 fps= 35 q=28.0 size=N/A time=00:04:38.10 bitrate=N/A speed=2.19x Edited March 25, 2018 by dexvx
Luke 42080 Posted March 25, 2018 Posted March 25, 2018 hi, can you please attach the complete ffmpeg logs? short answer is yes, burning in PGS subtitles can be painful.
Carlo 4561 Posted March 25, 2018 Posted March 25, 2018 You would be far better off using SRT subs and keep them external. These can be used regardless of direct play or transcoded.
dexvx 1 Posted March 27, 2018 Author Posted March 27, 2018 Attached logs. NVENC (HEVC/H264 enabled), Subs On and Off SW Transcode, Subs On and Off WW-NVENC-SubOff.log WW-NVENC-SubOn.log WW-SW-SubOff.log WW-SW-SubOn.log
Luke 42080 Posted March 27, 2018 Posted March 27, 2018 OK yea, those differences look fairly typical. As cayars suggested, external text srt is always the most efficient.
dexvx 1 Posted March 28, 2018 Author Posted March 28, 2018 Thanks, my workaround will be just to disable subtitles. One thing to note is that in the SW route, the CPU utilization is something like this: Subtitles On ~33% across 4C/8T, 15fps transcode Subtitles Off ~75% across 4C/8T, 35 fps transcode Seems to me that part of the PGS burning in is causing something to stall, as there is clearly system headroom not being utilized.
mbnwa 49 Posted March 28, 2018 Posted March 28, 2018 (edited) My guess is one of the processes (FFMpeg) for burning in the subtitles are single threaded so it's bottlenecking the entire workflow, I have also seen this while doing HDR -> SDR conversion of HEVC content. Edited March 28, 2018 by mbnwa
dexvx 1 Posted March 28, 2018 Author Posted March 28, 2018 My guess is one of the processes (FFMpeg) for burning in the subtitles are single threaded so it's bottlenecking the entire workflow, I have also seen this while doing HDR -> SDR conversion of HEVC content. Although there is definitely some bottlenecking going on, I don't think it is due to a single threaded issue. In the case with 'subtitles on', the CPU utilization was about ~33% across all cores. Not one core was maxed. Memory/disk usage was also pretty consistent. Could be some kind of timer issue causing the process to wait. 1
Michael K. 24 Posted October 10, 2018 Posted October 10, 2018 (edited) ...CPU utilization was about ~33% across all cores... I'm experiencing the same issue. As soon as I choose a subtitle on an HEVC movie the transcode is very sluggish, but the CPU utilization is around only 30%. I use PGS subtitles, but I don't have that issue with PGS when transcoding HD H.264 or SD MPEG2, only with UHD HEVC. Are there any thoughts as to why the transcode is slow and CPU is low? Where could the bottleneck be? Edited October 10, 2018 by Michael K.
Solution Luke 42080 Posted October 10, 2018 Solution Posted October 10, 2018 It's not really an issue, there is a cost to PGS subtitles and you have to be aware of that cost. They will often need to be burned in with transcoding and that can be a very costly process. To improve performance i would suggest either turning the subtitles off, or using our subtitle download feature to obtain external srt subtitles. Please let us know if this helps. 1
Michael K. 24 Posted October 11, 2018 Posted October 11, 2018 Okay, with regards to the 'cost', what resource is impacted? I don't see any strain on the hardware. Processor, memory, and disk are all operating well below their maximum. What should I be looking at? I would be happy to make upgrades to hardware or software if you can point me in the right direction.
Happy2Play 9782 Posted October 11, 2018 Posted October 11, 2018 The question would be is this a ffmpeg or a hardware/driver issue as some have reported not seeing high resource usage when subtitle burn in is happening. But they get low framerate processing. But I would think it is more of a hardware issue. The growing pains of the standards changing to new format.
Luke 42080 Posted October 11, 2018 Posted October 11, 2018 It's not an issue, it's just that it requires more horsepower to have ffmpeg draw the subtitles over the video on the fly.
Michael K. 24 Posted October 11, 2018 Posted October 11, 2018 ...not seeing high resource usage when subtitle burn in is happening. ...low framerate processing. That's exactly what I'm experiencing. But I would think it is more of a hardware issue. The hardware works very well with maximum resource usage for transcoding HEVC 4K video. It's only when subtitles are transcoded along with it (muxed) that low resource/frame rate is happening. Does that point to anything?
Luke 42080 Posted October 11, 2018 Posted October 11, 2018 Yes, what it points to is that you should consider obtaining external text srt subtitles. Our subtitle download feature can help with that.
Happy2Play 9782 Posted October 11, 2018 Posted October 11, 2018 That's exactly what I'm experiencing. The hardware works very well with maximum resource usage for transcoding HEVC 4K video. It's only when subtitles are transcoded along with it (muxed) that low resource/frame rate is happening. Does that point to anything? Just that PSG subtitles are the issue and the only way around this is more processing power or different subtitles (srt).
Michael K. 24 Posted October 11, 2018 Posted October 11, 2018 ...requires more horsepower... It appears to me that ffmpeg does not utilize the horsepower it has available. If what you mean by horsepower is processor, then ffmpeg is using only about 30% of it. I'm still struggling to understand where the bottleneck is.
Happy2Play 9782 Posted October 11, 2018 Posted October 11, 2018 maximum resource usage for transcoding HEVC 4K video It appears to me that ffmpeg does not utilize the horsepower it has available. If what you mean by horsepower is processor, then ffmpeg is using only about 30% of it. I'm still struggling to understand where the bottleneck is. That is where mixed information is being reported. So a transcode without subtitles will utilize move cpu power then when you add subtitles into the mix.
Michael K. 24 Posted October 11, 2018 Posted October 11, 2018 (edited) So a transcode without subtitles will utilize move cpu power then when you add subtitles into the mix. Yes that is correct. A transcode without subtitles will utilize more CPU than a transcode with subtitles. It is the opposite of what should be happening. This is the same symptom that @@dexvx also reported in his original posts. Transcode with subtitles should be using more power, but it's not. There is plenty of available processing and yet the transcode is super slow. Edited October 11, 2018 by Michael K.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now