[FFmpeg-trac] #9337(ffmpeg:new): 'atempo' didn't work unless '-map 0' was added
FFmpeg
trac at avcodec.org
Wed Jul 21 08:20:26 EEST 2021
#9337: 'atempo' didn't work unless '-map 0' was added
-------------------------------------+----------------------------------
Reporter: markfilipak | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: ffmpeg
Version: git-master | Resolution:
Keywords: atempo | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+----------------------------------
Changes (by markfilipak):
* component: undetermined => ffmpeg
Old description:
> 1.cmd => ffmpeg -i source.vob -filter_complex
> "[0:v]settb=expr=1/24,setpts=expr=N[v]" -map
> "[v]" -map 0:1 -codec:v %AVcoder% -codec:a copy -r 24 1.mkv
> 2.cmd => ffmpeg -i source.vob -filter_complex
> "[0:v]settb=expr=1/24,setpts=expr=N[v];[0:a]atempo=1.001[a]" -map
> "[v]" -map "[a]" -codec:v %AVcoder% -codec:a ac3 -r 24 2.mkv
> 3.cmd => ffmpeg -i source.vob -filter_complex
> "[0:v]settb=expr=1/24,setpts=expr=N[v];[0:a]atempo=1.001[a]" -map 0 -map
> "[v]" -map "[a]" -codec:v %AVcoder% -codec:a ac3 -r 24 3.mkv
> 4.cmd => ffmpeg -i 3.mkv -map 0:0 -map 0:1 -codec:v copy -codec:a copy
> 4.mkv
> 5.cmd => ffmpeg -i 3.mkv -map 0:2 -map 0:3 -codec:v copy -codec:a copy
> 5.mkv
>
> source.vob has a 9-&-1/2 second clip that's repeated 7 more times. The
> clip is soft telecined. And of course, the video and audio are
> synchronized.
> 1.mkv, 2.mkv, 3.mkv were made by converting the soft telecined source to
> 24fps.
> 4.mkv, 5.mkv, were made from 3.mkv.
>
> 1.mkv was made just to show that the audio lags the video at the end of
> the 8th clip. Note the boy slamming the door. By the end of the 8th clip,
> it lags by about 1/2 second.
> 2.mkv is what I expected would produce synchronized audio, but it fails.
> 3.mkv appears to work when played with MPV, but there's an extra video
> track and an extra audio track.
>
> 4.mkv is just the 1st video & audio pair of tracks from 3.mkv.
> 5.mkv is just the 2nd video & audio pair.
>
> 4.mkv is what I want, so output tracks 0:0 & 0:1 must be from the graph.
> 5.mkv is not what I want, so output tracks 0:2 & 0:3 must be from '-map
> 0'.
>
> Issue #1: Why does 'atempo' need '-map 0' to work?
> Issue #2: Will what I want always be 0:0 & 0:1?
>
> source.vob is here:
> https://www.dropbox.com/s/bdahs4n08z120z6/source.vob?dl=0
> 1.mkv, 2.mkv, 3.mkv, 4.mkv, 5.mkv are available on request.
> 1.log, 2.log, 3.log, 4.log, 5.log are available on request.
>
> Regards, And Thank You for ffmpeg.
> Mark Filipak.
New description:
source.vob is here:
https://www.dropbox.com/s/bdahs4n08z120z6/source.vob?dl=0
To reproduce the issue, run 1.cmd .. 5.cmd. That will take less than a
minute. Then read the rest of this report.
1.cmd => ffmpeg -i source.vob -filter_complex
"[0:v]settb=expr=1/24,setpts=expr=N[v]" -map
"[v]" -map 0:1 -codec:v %AVcoder% -codec:a copy -r 24 1.mkv
2.cmd => ffmpeg -i source.vob -filter_complex
"[0:v]settb=expr=1/24,setpts=expr=N[v];[0:a]atempo=1.001[a]" -map
"[v]" -map "[a]" -codec:v %AVcoder% -codec:a ac3 -r 24 2.mkv
3.cmd => ffmpeg -i source.vob -filter_complex
"[0:v]settb=expr=1/24,setpts=expr=N[v];[0:a]atempo=1.001[a]" -map 0 -map
"[v]" -map "[a]" -codec:v %AVcoder% -codec:a ac3 -r 24 3.mkv
4.cmd => ffmpeg -i 3.mkv -map 0:0 -map 0:1 -codec:v copy -codec:a copy
4.mkv
5.cmd => ffmpeg -i 3.mkv -map 0:2 -map 0:3 -codec:v copy -codec:a copy
5.mkv
source.vob has a 9-&-1/2 second clip that's repeated 7 more times. The
clip is soft telecined. And of course, the video and audio are
synchronized.
1.mkv, 2.mkv, 3.mkv were made by converting the soft telecined source to
24fps.
4.mkv, 5.mkv, were made from 3.mkv.
1.mkv was made just to show that the audio lags the video at the end of
the 8th clip. Note the boy slamming the door. By the end of the 8th clip,
it lags by about 1/2 second.
2.mkv is what I expected would produce synchronized audio, but it fails.
3.mkv appears to work when played with MPV, but there's an extra video
track and an extra audio track.
4.mkv is just the 1st video & audio pair of tracks from 3.mkv.
5.mkv is just the 2nd video & audio pair.
4.mkv is what I want, so output tracks 0:0 & 0:1 must be from the graph.
5.mkv is not what I want, so output tracks 0:2 & 0:3 must be from '-map
0'.
Issue #1: Why does 'atempo' need '-map 0' to work?
Issue #2: Will what I want always be 0:0 & 0:1?
1.mkv, 2.mkv, 3.mkv, 4.mkv, 5.mkv are available on request.
1.log, 2.log, 3.log, 4.log, 5.log are available on request.
Regards, And Thank You for ffmpeg.
Mark Filipak.
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9337#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list