I am facing issue while transcoding of ts file which has H264 encoded data with Closed Captions (A53, CEA 608/708) data.
I am having “GeForce GTX 1070”
I am using FFMPEG with “-codec:v h264_nvenc” for transcoding this file, when I don’t have bframes flag. it seems coping Captions properly from source file to destination file but when I use “-bf 2” in encoding params which tells encoder to generate Bframe I P B B P B B etc, it make order of captions text wrong…
Like “Test One” will be displayed like “Tets eOn” or something.
If I use software encoder “-codec:v libx264” it works perfect with “-bf 2” as well but it is NOT working with Nvidia Encoder “h264_nvenc”.
Can you please check and let me know solution for this?
This is working perfect if I do not use B frames in output encoded NVidia frames. Like if I remove “-bf 2” from above command it shows proper captions.
Also as mentioned above, If I use software encoder “-codec:v libx264” it works perfect with “-bf 2”.
It seems “-codec:v h264_nvenc” encoder reorder frames as per need but do not handle (reorder) captions (sei data) provided as input with encode function.
Please guide me so that I can move forward using NVidia encoder as I am stuck due to this issue.
I’m developing a video application under the following environments:
Local PC
Ubuntu Desktop 16.04 LTS
NVIDIA driver 384.90 (Quadro P2000)
Amazon Cloud EC2 instance
Ubuntu Server 16.04 LTS
NVIDIA driver 367.57 (GRID K520)
The application re-encodes a RTMP stream using FFmpeg 3.3.4. On both cases the AC53 Closed Captions information is omitted by NVENC because it works with x264 encoder (software encoding).
I also tried @hardik.patel1786 's path on the encoder but is does not work (maybe a compilation flag or encoder param?).
FFmpeg 3.4 does not seems to have this issue fixed on NVENC.
I opened a ticket on FFmpeg to solve this issue here [url]http://trac.ffmpeg.org/ticket/6802[/url]. The issue contains the patch needed to fix the closed caption not appearing issue on FFmpeg 3.3.4 and 3.4 based on @hardik.patel1786 patch for the NVENC encoder.
In my case the closed captions appear as expected on both environments (Local and Amazon EC2)