[FFmpeg-user] Force target DTS == source DTS -- How?

Mark Filipak markfilipak.imdb at gmail.com
Wed Jan 10 20:42:15 EET 2024


Correction...

On 1/10/24 13:21, Devin Heitmueller wrote:
> On Wed, Jan 10, 2024 at 12:50 PM Mark Filipak
> <markfilipak.imdb at gmail.com> wrote:
>>
>> Question: How can I force the target's DTS to be the source's DTS?
> 
> Add "-copyts" to the front of the command-line as a global option.
> The ffmpeg application will automatically rebase timestamps to zero
> after demuxing unless you specify this option (which is further up the
> pipeline than your bsf, hence the bsf has no effect).
> 
> Devin

Thanks, Devin, but nope, they're a lot closer but they're still not the same.

set FORCE=-bsf:v setts=dts=DTS:pts=PTS
set SOURCE=h:\BDMV\STREAM\00305.m2ts
:     IS: 0,    1044806,    1048560,     3753,   640646, 0x900a1a7a, S=1, 1

ffmpeg -to 39.122 -copyts -i %SOURCE% -map 0 %FORCE% -c copy -sn -dn c:\target_2.m2ts
: RESULT: 0,    1170806,    1174560,     3753,   640646, 0x900a1a7a, S=1, 1

ffmpeg -to 39.122 -copyts -i %SOURCE% -map 0         -c copy -sn -dn c:\target_1.m2ts
: RESULT: 0,    1170806,    1174560,     3753,   640646, 0x900a1a7a, S=1, 1

Sorry I flubbed the command lines. These are correct.



More information about the ffmpeg-user mailing list