[FFmpeg-trac] #9382(undetermined:new): Wrong TB returned for use in '-bsf setts'
FFmpeg
trac at avcodec.org
Sun Aug 22 09:34:58 EEST 2021
#9382: Wrong TB returned for use in '-bsf setts'
-------------------------------------+-------------------------------------
Reporter: markfilipak | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
(0) This command:
{{{
ffmpeg -i
"concat:VTS_04_1.VOB|VTS_04_2.VOB|VTS_04_3.VOB|VTS_04_4.VOB|VTS_04_5.VOB|VTS_04_6.VOB"
\
-map 0 -codec copy -dn "(0).mkv"
provokes "Can't write packet with unknown timestamp" and aborts. To
overcome that, I'll use a bitstream filter.
}}}
(1) However, this command:
{{{
ffmpeg -i
"concat:VTS_04_1.VOB|VTS_04_2.VOB|VTS_04_3.VOB|VTS_04_4.VOB|VTS_04_5.VOB|VTS_04_6.VOB"
\
-bsf "setts=pts=N/TB*1001/24000:dts=N/TB*1001/24000" -map 0 -codec copy
-dn "(1).mkv"
doesn't work as expected -- MPV reports "FPS: 29.583 (specified) 0.266
(estimated)" and playback is very, very slow.
\___=23.976*1000/90000
}}}
(2) But this command:
{{{
ffmpeg -i
"concat:VTS_04_1.VOB|VTS_04_2.VOB|VTS_04_3.VOB|VTS_04_4.VOB|VTS_04_5.VOB|VTS_04_6.VOB"
\
-bsf "setts=pts=N/(1/1000)*1001/24000:dts=N/(1/1000)*1001/24000" -map 0
-codec copy -dn "(2).mkv"
does work as expected -- MPV reports "FPS: 29.583 (specified) 23.976
(estimated)" and playback is normal.
}}}
Why doesn't (1) work? Because the value of 'TB' that's returned and used
is the '''_decoder_'s time base''': 1/90000.
But it needs to be the value of the '''_encoder_'s time base''': 1/1000,
as proven by (2).
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9382>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list