问题
Using ffmpeg
to replace audio in a QuickTime with audio from a WAV.
Anyone know why I'm getting Referenced QT chapter track not found
?
Command:
$ ffmpeg \
-i "$video" -t 25 \
-i "$audio" -map 0:v -c:v copy -map 1:a -c:a pcm_s24le -ar 48000 \
-hide_banner "$output"
Output:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7faf62010600] Referenced QT chapter track not found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2018-11-06T09:27:43.000000Z
Duration: 00:00:25.00, start: 0.000000, bitrate: 186987 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 185115 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 00:00:00:00
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'audio.wav':
Metadata:
encoded_by : Pro Tools
originator_reference: aaOpKJaTN7Nk
date : 2018-11-08
creation_time : 13:53:50
time_reference : 166698000
Duration: 00:00:25.00, bitrate: 2128 kb/s
Stream #1:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s32 (24 bit), 2116 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'test19.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf58.12.100
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 185115 kb/s, 0.04 fps, 25 tbr, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 00:00:00:00
Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
Metadata:
encoder : Lavc58.18.100 pcm_s24le
frame= 625 fps=277 q=-1.0 Lsize= 566343kB time=00:00:24.96 bitrate=185876.0kbits/s speed=11.1x
video:564928kB audio:1406kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001496%
Same error with -map 0:v:0
回答1:
Output looks to be created without errors.
What the error means is that MOV header indicates that a text track with chapter titles and timestamps is present but FFmpeg can't actually find that track in the file.
Adding -ignore_chapters 1
before -i "$video"
will stop ffmpeg from looking for that track.
回答2:
While traversing my personal video collection with ffprobe
, I ran into several such errors, including:
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000039a980] Referenced QT chapter track not found
and...
[mp3float @ 000000000079bb80] Header missing
From what I can tell, these are non-fatal errors that seem to simply be an indicator of the video's original encoder doing a bad or incomplete job, and so for a video collection that's large enough and sourced from enough disparate sources, I'd guess that it would be a mathematical likelihood to run into at least a few of these errors while analysing the entire collection. For obvious reasons, however, it makes sense to want to suppress these errors since they aren't needed and look unseemly in STDOUT.
There seems to be no such -ignore-chapters
option for ffprobe
, but I was able to suppress all of these non-fatal errors by adding -v fatal
, which changes the command's loglevel to only display fatal errors (the default shows fatal and non-fatal errors, warnings and extra information). This option doesn't suppress ffprobe
's output, which is printed as normal.
来源:https://stackoverflow.com/questions/53260802/ffmpeg-referenced-qt-chapter-track-not-found