* [FFmpeg-devel] RFC: Preserving original demux timestamps in AVPackets
@ 2023-03-03 21:53 Devin Heitmueller
0 siblings, 0 replies; only message in thread
From: Devin Heitmueller @ 2023-03-03 21:53 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Hello all,
I am working on some SCTE-35 stuff, which embeds PTS timestamps deep
within the section payload. In order to pass through packets to an
MPEG-TS output, I need the original PTS value that was used when the
packet was received to calculate the correct offsets.
The way a typical ffmpeg-based application works is to read in the
packets, and then recalculate the pts/dts fields prior to output using
the existing fields. This results in loss of the original values.
I need to stash the original PTS value somewhere within the AVPacket
so I can use it for subsequent calculations on the output side. In my
private tree I have done this through a new AVPacket side data type
called "AV_PKT_DATA_ORIG_PTS", but it wasn't clear to me if such a
patch would be accepted upstream. Alternatively, I can set a metadata
field on the packet using av_packet_pack_dictionary() and use the
existing AV_PKT_DATA_STRINGS_METADATA type. However that would
require it to be converted to a string and back, and seems less than
ideal.
Does anyone have any other suggestions on a way the original received
PTS value can be stashed within an AVPacket in a manner that would be
accepted upstream?
Thanks,
Devin
--
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com e: devin.heitmueller@ltnglobal.com
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-03 21:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 21:53 [FFmpeg-devel] RFC: Preserving original demux timestamps in AVPackets Devin Heitmueller
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git