justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
850 stars 144 forks source link

Cannot extract TrueHD with AD3 to TrueHD and AC3 #553

Open ted423 opened 2 years ago

ted423 commented 2 years ago

ffmpeg can't decode turehd with ac3 00000.track_4352.thd: Invalid data found when processing input

ted423 commented 2 years ago
ffprobe.exe 00000.track_4352.thd
ffprobe version n5.0-4-g911d7f167c-20220209 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220209
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
00000.track_4352.thd: Invalid data found when processing input
ted423 commented 2 years ago

This is a known bug. https://trac.ffmpeg.org/ticket/667

so I just want a split file

ted423 commented 2 years ago

so I just want a split file

Use ffmpeg for that ffmpeg -i file.ts -c copy -vn -sn -map 0:a:0 mfile.mp4 (or thd or ts)

I need time to do some testing and come up with a concrete response. Most of the time I read mpls directly. In some cases, will need merge multiple m2ts, eac3to and mkvtoolnix will cause some errors

ted423 commented 2 years ago

merge multiple m2ts,

Segmented m2ts has some segments in TrueHD that should be removed anyway. That can be done with https://github.com/domyd/mlp

thanks a lot, I will try later

jcdr428 commented 2 years ago

@ValZapod double major sync units should be found only after last access units, which is not the case anymore with domyd. tsMuxer THD might be 100ms out of sync in very, very rare cases similar to Monsters University containing 100+ m2ts segments, but at least the THD stream is DD compliant.

jcdr428 commented 2 years ago

@ValZapod can you please open a new issue and clarify/detail what is broken/what needs to be fixed ?

justdan96 commented 2 years ago

It isn't clear what the issue with tsMuxer is - can someone please clarify?

ted423 commented 2 years ago

It isn't clear what the issue with tsMuxer is - can someone please clarify?

ffmpeg can't decode turehd with ac3. So I want tsMuxer can extract it to two file. ValZapod Try to give me some other solutions.

but some BD has multi m2ts, useac3to and mkvtoolnix make some sync issue like this https://github.com/justdan96/tsMuxer/issues/262

I have not tested tsMuxer on Truehd whether there are similar problems, and these discussions are out of topic