PTS in video api

Hi.

I use decoder-converter-encoder chain to trancode mpegts video stream with ffmpeg as reciever and transmitter.

How to use PTS (presentation timestamp) from mpegts to syncronize transcoded video and audio? How to pass pts to chain and obtain valid AVPacket for transcoded video?

Hi,
ffmpeg is 3rdparty implementation. You may check if you can get help from https://www.ffmpeg.org/contact.html#Forums

We don’t support ffmpeg with hardware acceleration on TX2. If you need hardware acceleration, please use gstreamer or tegra_multimedia_api.


https://developer.nvidia.com/embedded/dlc/l4t-multimedia-api-reference-32-1

hi.
I already use tegra_multimedia_api, it`s ok.
My problem is video and audio syncronization.

Hi,
In ffmpeg source code, I can see muxer code at:

ffmpeg\ffmpeg-3.3.1\libavformat

Since it is 3rdparty code and we haven’t traced into it. Other users may share their experiences.

I pass pts to encoder via v4l2_buffer timestamp. And recieve it back after encode.

It’s ok.

What about dts, when b-frames is enabled in encoder?

Hi,
You can control timestamps by

"--copy-timestamp <st> Enable copy timestamp with start timestamp(st) in seconds"

If you set ‘-nbf 1’

"-nbf <num>            Number of B frames [Default = 0]"

The encoded frames are sent out in below orders:

IDR P B P B P B ...