Opened 3 years ago
Last modified 8 months ago
#10295 new defect
movenc: copyts with use_tfdt does not copy base media decode time
| Reported by: | thinkski | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | mov fmp4 |
| Cc: | Caleb | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
When transcoding an MP4 segment to another MP4 segment, it is useful to be able to use the same base media decode time within the tfdt tag, so that segments can be transcoded in parallel.
Specifying copyts and use_tfdt should achieve this, but does not, instead producing an output MP4 where the base media decode time begins with 0.
How to reproduce:
% ffmpeg -copyts -i in.mp4 -movflags use_tfdt -f mp4 -movflags cmaf+delay_moov+skip_trailer out.mp4
% mp4dump in.mp4
...
[tfdt] size=12+8, version=1
base media decode time = 151213553719664
...
% mp4dump out.mp4
...
[tfdt] size=12+8, version=1
base media decode time = 0
...
Change History (3)
comment:1 by , 2 years ago
comment:2 by , 8 months ago
I believe this issue may be relevant for multi-variant fMP4 HLS & DASH (CMAF) feeds as well, as "tfdt" is used for playback synchronization (A/V lipsync) between different audio & video tracks (provided as separate fMP4 files).
For instance, if wanting to make a 5 minute recording of an in-progress fMP4 livestream:
ffmpeg -i "https://example.com/example-fmp4-master-playlist.m3u8" -c copy -f mp4 -t 300 liverecording.mp4
Will both ignore the incoming TFTD, and reset it to 0 in the new file, potentially offsetting A/V sync in the recording.
I will do my best to track down an example stream that has this issue and update if I find one. Most publicly available sample streams also start at 0 and therefore won't reveal this issue.
comment:3 by , 8 months ago
| Cc: | added |
|---|



Any info on how to handle this?