[FFmpeg-trac] #10629(undetermined:new): ffmpeg concat destroys metadata tracks when combining TS (Transport Stream) files
FFmpeg
trac at avcodec.org
Sat Oct 21 17:57:59 EEST 2023
#10629: ffmpeg concat destroys metadata tracks when combining TS (Transport Stream)
files
--------------------------------------+----------------------------------
Reporter: superbonaci | Type: defect
Status: new | Priority: minor
Component: undetermined | Version: 6.0
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+----------------------------------
Summary of the bug:
How to reproduce:
{{{
% ffmpeg -h
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-
shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
--host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-
libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-
libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-
librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1
--enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
--enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-
libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
--enable-audiotoolbox --enable-neon
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
outfile}...
}}}
How to reproduce:
Use the concat demuxer or protocol to combine/merge/concatenate .ts files
which are part of whole stream.
The stream can be any https://www.twitch.tv/ stream.
The stream is made of several .ts parts which can be combined:
index-0000000000.ts
...
index-0000000945.ts
into output.ts
Parts can be downloaded with:
{{{
% twitch-dl download https://www.twitch.tv/videos/1462570126 -k -q source
--no-join
}}}
To get the properly formatted combined file, use
[https://www.downloadhelper.net Video Download Helper] and set it to
download .ts files, so can save them as .m2ts
ffmpeg does not concatenate the parts like [https://www.downloadhelper.net
DownloadHelper] or [https://github.com/lay295/TwitchDownloader
TwitchDownloader] do (these produce the same exact file, same sha1).
Apparently the audio and video streams merged by ffmpeg are in good
condition but several metadata is destroyed. The other 2 programs keep
everything as is.
The method that concatenates properly all the parts is available here
(.NET Framework):
https://github.com/lay295/TwitchDownloader/blob/fefd3d18f84185977b9959032dd423b7e1fed405/TwitchDownloaderCore/VideoDownloader.cs#L663-L698
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10629>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list