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
871 stars 147 forks source link

MacOS M1/Arm 4K UHD BD ISO not playable on Oppo-203 #579

Closed axledentaldj closed 2 years ago

axledentaldj commented 2 years ago

I have a Mac mini M1 (2020) (Arm) on 11.6.5. With my build of tsmuxer 2.6.x (M1 Arm build) and the current 4-22-03 Nightly build for MacOS, doesn't make a 4K UHD BD ISO playable on my Oppo-203 (that has the Free Russian Jailbreak firmware on it). It states "File is Not Supported". Now, if a run tsmuxer to make a BDMV folder it usually says something along the lines of a dirty Disc error and will not play in the Oppo-203. So, in order to fix this, I have to take that tsmuxer ISO and use DVDFab 11.0.6.1Mac to just do a full copy and save again to another named ISO file, and then the Oppo-203 can play it. I don't know what DVDFab does differently between tsmuxer and DVDFab in making ISOs?

The BD ISO files sizes are the same. The crc32 to each file is different though. Maybe its breaking the index.bdmv or MovieObject.bdmv files? I think I tried switching them around...?

This happens whether its at BDMV Im remuxing or a mkv container to ISO switching.

Windows tsmuxer-git-08d1269 works just fine!

axledentaldj commented 2 years ago

Sure, here: https://mega.nz/file/ZBQ3CA5A#zfT47czGb_vJgdwRmxdJJ1-gjmcyYY1raHyfMPxAIys

jcdr428 commented 2 years ago

@xavery is it possible for you to look at this issue ? This is way above my expertise.

Edit: The DTCP descriptor "0x0ffffcfc" should be written by line 414 of tsPacket.cpp, but instead the previous four bytes "0x4d568804" are repeated !

lighterowl commented 2 years ago

Hopefully that's enough information to create an isolated-ish test case without diving too deep. I have to admit I'm not a fan of the BitStream code and trying to debug it isn't necessarily my idea of a nice weekend ... 😅

lighterowl commented 2 years ago

Wasn't able to reproduce this with my local QEMU-emulated ARM64 machine. Images generated by that machine and the x64 host are bitwise same. The MacStadium machine is not accessible at the time (raised a ticket) so this needs to wait until I have access. Anyhow, it looks like the issue might be related to the compiler rather than the CPU itself, though I have no hard proof so far. @jcdr428 As far as I understand, this should be always reproducible if --hdmv-descriptors is specified in MUXOPT, right? I'm using this metafile to test :

MUXOPT --no-pcr-on-video-pid --new-audio-pes --hdmv-descriptors --blu-ray --label="foobar" --vbr  --auto-chapters=5 --vbv-len=500 --constant-iso-hdr
V_MPEG4/ISO/AVC, "bbb_sunflower_1080p_30fps_normal.mp4", track=1, lang=und
A_MP3, "bbb_sunflower_1080p_30fps_normal.mp4", track=2, lang=und
A_AC3, "bbb_sunflower_1080p_30fps_normal.mp4", track=3, lang=und
lighterowl commented 2 years ago

Okay. I was able to reproduce this on x64 by just compiling tsMuxer with Clang in release mode. Creating the ISO yields a different file than the one produced by gcc-compiled tsMuxer, in both debug and release modes. Compiled with Clang's undefined behaviour sanitizer, and the results are quite telling :

$ UBSAN_OPTIONS=print_stacktrace=1 ~/tsMuxer/build_clang_rel_ubsan/tsMuxer/tsmuxer bbb_iso.meta ../bbb_x64_gcc_rel_ubsan.iso 
tsMuxeR version git-b2e5dd3. github.com/justdan96/tsMuxer
/home/daniel/tsMuxer/tsMuxer/bitStream.h:36:74: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
    #0 0x5628b31a8f0c in BitStream::setBuffer(unsigned char*, unsigned char*) /home/daniel/tsMuxer/tsMuxer/bitStream.h:36:74
    #1 0x5628b31a8478 in BitStreamReader::setBuffer(unsigned char*, unsigned char*) /home/daniel/tsMuxer/tsMuxer/bitStream.h:70:20
    #2 0x5628b32c1a5c in SPSUnit::deserialize() /home/daniel/tsMuxer/tsMuxer/nalUnits.cpp:487:19
    #3 0x5628b31e8577 in H264StreamReader::additionalStreamCheck(unsigned char*, unsigned char*) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:568:20
    #4 0x5628b31e6fe4 in H264StreamReader::getTSDescriptor(unsigned char*, bool, bool) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:438:9
    #5 0x5628b332057a in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:156:38
    #6 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #7 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #8 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #9 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #10 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #11 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:36:74 in 
/home/daniel/tsMuxer/tsMuxer/bitStream.h:56:29: runtime error: load of misaligned address 0x5628b3faa671 for type 'unsigned int', which requires 4 byte alignment
0x5628b3faa671: note: pointer points here
 00 00 00  68 e9 3b 2c 8b 7f 00 00  30 b1 1b cb b4 7f 00 00  60 a6 fa b3 28 56 00 00  91 08 00 00 00
              ^ 
    #0 0x5628b31a90a5 in BitStreamReader::getCurVal(unsigned int*) /home/daniel/tsMuxer/tsMuxer/bitStream.h:56:29
    #1 0x5628b31a848b in BitStreamReader::setBuffer(unsigned char*, unsigned char*) /home/daniel/tsMuxer/tsMuxer/bitStream.h:72:20
    #2 0x5628b32c09c4 in PPSUnit::deserialize() /home/daniel/tsMuxer/tsMuxer/nalUnits.cpp:352:19
    #3 0x5628b31e814d in H264StreamReader::additionalStreamCheck(unsigned char*, unsigned char*) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:580:22
    #4 0x5628b31e6fe4 in H264StreamReader::getTSDescriptor(unsigned char*, bool, bool) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:438:9
    #5 0x5628b332057a in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:156:38
    #6 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #7 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #8 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #9 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #10 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #11 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:56:29 in 
Decoding H264 stream (track 1): Profile: High@4.1  Resolution: 1920:1080p  Frame rate: 30
H.264 muxing fps is not set. Get fps from stream. Value: 30
B-pyramid level 1 detected. Shift DTS to 2 frames
/home/daniel/tsMuxer/tsMuxer/bitStream.h:196:13: runtime error: store to misaligned address 0x5628b3faa115 for type 'unsigned int', which requires 4 byte alignment
0x5628b3faa115: note: pointer points here
 40 00 10 00 00 00 00  b6 6b 41 06 00 00 00 00  6c 63 46 06 00 00 00 00  fa 0d 4c 06 00 00 00 00  f8
             ^ 
    #0 0x5628b31a8b92 in BitStreamWriter::putBits(unsigned int, unsigned int) /home/daniel/tsMuxer/tsMuxer/bitStream.h:196:25
    #1 0x5628b33409fd in TS_program_association_section::serialize(unsigned char*, int) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:185:15
    #2 0x5628b3323e25 in TSMuxer::buildPAT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1141:27
    #3 0x5628b3322ca3 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:395:5
    #4 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #5 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #6 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #7 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #8 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #9 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:196:13 in 
/home/daniel/tsMuxer/tsMuxer/bitStream.h:224:18: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
    #0 0x5628b31a8e43 in BitStreamWriter::flushBits() /home/daniel/tsMuxer/tsMuxer/bitStream.h:224:18
    #1 0x5628b3340b3c in TS_program_association_section::serialize(unsigned char*, int) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:197:15
    #2 0x5628b3323e25 in TSMuxer::buildPAT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1141:27
    #3 0x5628b3322ca3 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:395:5
    #4 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #5 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #6 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #7 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #8 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #9 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:224:18 in 
/home/daniel/tsMuxer/tsMuxer/bitStream.h:225:37: runtime error: load of misaligned address 0x5628b3faa125 for type 'unsigned int', which requires 4 byte alignment
0x5628b3faa125: note: pointer points here
 00 01 e1 00 00 00 00  fa 0d 4c 06 00 00 00 00  f8 26 50 06 00 00 00 00  8a be 52 06 00 00 00 00  f7
             ^ 
    #0 0x5628b31a8e54 in BitStreamWriter::flushBits() /home/daniel/tsMuxer/tsMuxer/bitStream.h:225:37
    #1 0x5628b3340b3c in TS_program_association_section::serialize(unsigned char*, int) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:197:15
    #2 0x5628b3323e25 in TSMuxer::buildPAT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1141:27
    #3 0x5628b3322ca3 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:395:5
    #4 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #5 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #6 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #7 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #8 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #9 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:225:37 in 
/home/daniel/tsMuxer/tsMuxer/bitStream.h:228:9: runtime error: store to misaligned address 0x5628b3faa125 for type 'unsigned int', which requires 4 byte alignment
0x5628b3faa125: note: pointer points here
 00 01 e1 00 00 00 00  fa 0d 4c 06 00 00 00 00  f8 26 50 06 00 00 00 00  8a be 52 06 00 00 00 00  f7
             ^ 
    #0 0x5628b31a8e8b in BitStreamWriter::flushBits() /home/daniel/tsMuxer/tsMuxer/bitStream.h:228:19
    #1 0x5628b3340b3c in TS_program_association_section::serialize(unsigned char*, int) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:197:15
    #2 0x5628b3323e25 in TSMuxer::buildPAT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1141:27
    #3 0x5628b3322ca3 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:395:5
    #4 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #5 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #6 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #7 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #8 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #9 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:228:9 in 
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:200:5: runtime error: store to misaligned address 0x5628b3faa125 for type 'unsigned int', which requires 4 byte alignment
0x5628b3faa125: note: pointer points here
 00 01 e1 00 00 00 00  fa 0d 4c 06 00 00 00 00  f8 26 50 06 00 00 00 00  8a be 52 06 00 00 00 00  f7
             ^ 
    #0 0x5628b3340bfb in TS_program_association_section::serialize(unsigned char*, int) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:200:13
    #1 0x5628b3323e25 in TSMuxer::buildPAT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1141:27
    #2 0x5628b3322ca3 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:395:5
    #3 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #4 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #5 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #6 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #7 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #8 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:200:5 in 
/home/daniel/tsMuxer/tsMuxer/bitStream.h:193:22: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
    #0 0x5628b31a8b25 in BitStreamWriter::putBits(unsigned int, unsigned int) /home/daniel/tsMuxer/tsMuxer/bitStream.h:193:22
    #1 0x5628b3341ee3 in TS_program_map_section::serialize(unsigned char*, int, bool, bool) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:414:19
    #2 0x5628b3324150 in TSMuxer::buildPMT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1152:27
    #3 0x5628b3322ce0 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:396:5
    #4 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #5 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #6 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #7 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #8 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #9 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/bitStream.h:193:22 in 
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:425:5: runtime error: store to misaligned address 0x5628b3fa911f for type 'unsigned short', which requires 2 byte alignment
0x5628b3fa911f: note: pointer points here
 00 00 f0 01 f0  00 05 04 48 44 4d 56 88  04 0f ff fc fc 00 00 00  38 40 1c 04 00 00 00 00  00 00 00
             ^ 
    #0 0x5628b3342b85 in TS_program_map_section::serialize(unsigned char*, int, bool, bool) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:425:17
    #1 0x5628b3324150 in TSMuxer::buildPMT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1152:27
    #2 0x5628b3322ce0 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:396:5
    #3 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #4 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #5 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #6 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #7 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #8 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:425:5 in 
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:478:9: runtime error: store to misaligned address 0x5628b3fa913f for type 'unsigned short', which requires 2 byte alignment
0x5628b3fa913f: note: pointer points here
 3f 04 f1 00 f0  00 ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ff ff ff
             ^ 
    #0 0x5628b33429d5 in TS_program_map_section::serialize(unsigned char*, int, bool, bool) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:478:20
    #1 0x5628b3324150 in TSMuxer::buildPMT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1152:27
    #2 0x5628b3322ce0 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:396:5
    #3 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #4 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #5 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #6 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #7 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #8 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:478:9 in 
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:486:5: runtime error: store to misaligned address 0x5628b3fa9141 for type 'unsigned int', which requires 4 byte alignment
0x5628b3fa9141: note: pointer points here
 f1 00 f0  00 ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff
              ^ 
    #0 0x5628b3342b28 in TS_program_map_section::serialize(unsigned char*, int, bool, bool) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:486:13
    #1 0x5628b3324150 in TSMuxer::buildPMT() /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1152:27
    #2 0x5628b3322ce0 in TSMuxer::intAddStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, AbstractStreamReader*) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:396:5
    #3 0x5628b32b80e0 in MuxerManager::preinitMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:149:26
    #4 0x5628b32b96b8 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:210:5
    #5 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #6 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #7 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #8 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:486:5 in 
0.1% complete
/home/daniel/tsMuxer/tsMuxer/tsPacket.h:140:9: runtime error: store to misaligned address 0x7fb4c90eb25a for type 'unsigned int', which requires 4 byte alignment
0x7fb4c90eb25a: note: pointer points here
 01 20  07 10 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00
              ^ 
    #0 0x5628b3328e75 in AdaptiveField::setPCR33(unsigned long) /home/daniel/tsMuxer/tsMuxer/tsPacket.h:140:14
    #1 0x5628b3328e75 in TSMuxer::writeEmptyPacketWithPCR(long) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:593:29
    #2 0x5628b3333442 in TSMuxer::writePCR(unsigned long) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:873:5
    #3 0x5628b33362db in TSMuxer::muxPacket(AVPacket&) /home/daniel/tsMuxer/tsMuxer/tsMuxer.cpp:1015:13
    #4 0x5628b32b979c in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/avPacket.h
    #5 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #6 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #7 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #8 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.h:140:9 in 
H264 bitstream changed: insert nal unit delimiters
/home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:22: runtime error: applying non-zero offset 3 to null pointer
    #0 0x5628b31f602d in H264StreamReader::isPriorityData(AVPacket*) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:22
    #1 0x5628b32ac69c in MPEGStreamReader::readPacket(AVPacket&) /home/daniel/tsMuxer/tsMuxer/mpegStreamReader.cpp:174:17
    #2 0x5628b3257c45 in METADemuxer::readPacket(AVPacket&) /home/daniel/tsMuxer/tsMuxer/metaDemuxer.cpp:133:72
    #3 0x5628b32b9831 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:217:35
    #4 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #5 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #6 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #7 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:22 in 
/home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:63: runtime error: applying non-zero offset 4 to null pointer
    #0 0x5628b31f60be in H264StreamReader::isPriorityData(AVPacket*) /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:63
    #1 0x5628b32ac69c in MPEGStreamReader::readPacket(AVPacket&) /home/daniel/tsMuxer/tsMuxer/mpegStreamReader.cpp:174:17
    #2 0x5628b3257c45 in METADemuxer::readPacket(AVPacket&) /home/daniel/tsMuxer/tsMuxer/metaDemuxer.cpp:133:72
    #3 0x5628b32b9831 in MuxerManager::doMux(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, FileFactory*) /home/daniel/tsMuxer/tsMuxer/muxerManager.cpp:217:35
    #4 0x5628b322edf4 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:760:26
    #5 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #6 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #7 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/h264StreamReader.cpp:1467:63 in 
Decoding MPEG-Audio stream (track 2): Bitrate: 160Kbps  Sample Rate: 48KHz  Channels: 2  Layer: 3
Decoding AC3 stream (track 3): Bitrate: 320Kbps Sample Rate: 48KHz Channels: 5.1
83.5% complete
Processed 19036 video frames
100.0% complete
Flushing write buffer
Creating Blu-ray stream info and seek index
Creating Blu-ray playlist
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:1677:5: runtime error: store to misaligned address 0x5628b402626a for type 'unsigned int', which requires 4 byte alignment
0x5628b402626a: note: pointer points here
 00 00  40 00 00 00 00 00 00 00  00 01 00 00 00 60 30 30  30 30 30 4d 32 54 53 00  01 00 0b 43 e9 40
              ^ 
    #0 0x5628b334b2e3 in MPLSParser::composePlayList(BitStreamWriter&) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:1677:16
    #1 0x5628b334aa87 in MPLSParser::compose(unsigned char*, int, DiskType) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:1467:5
    #2 0x5628b31b6280 in BlurayHelper::createMPLSFile(TSMuxer*, TSMuxer*, int, std::vector<double, std::allocator<double> >, DiskType, int, bool) /home/daniel/tsMuxer/tsMuxer/blurayHelper.cpp:632:30
    #3 0x5628b322fa49 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:797:30
    #4 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #5 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #6 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:1677:5 in 
/home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:2200:5: runtime error: store to misaligned address 0x5628b40262d6 for type 'unsigned int', which requires 4 byte alignment
0x5628b40262d6: note: pointer points here
 61 75 6e 64 00 00  00 00 00 03 00 01 00 00  0b 43 e9 40 ff ff 00 00  00 00 00 01 00 00 0c 11  e7 a0
             ^ 
    #0 0x5628b334b5cb in MPLSParser::composePlayListMark(BitStreamWriter&) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:2200:16
    #1 0x5628b334aaf4 in MPLSParser::compose(unsigned char*, int, DiskType) /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:1472:5
    #2 0x5628b31b6280 in BlurayHelper::createMPLSFile(TSMuxer*, TSMuxer*, int, std::vector<double, std::allocator<double> >, DiskType, int, bool) /home/daniel/tsMuxer/tsMuxer/blurayHelper.cpp:632:30
    #3 0x5628b322fa49 in main /home/daniel/tsMuxer/tsMuxer/main.cpp:797:30
    #4 0x7fb4cafe528f  (/usr/lib/libc.so.6+0x2928f)
    #5 0x7fb4cafe5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #6 0x5628b317d7d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/daniel/tsMuxer/tsMuxer/tsPacket.cpp:2200:5 in 
Mux successful complete
Finalize ISO disk
Muxing time: 0 sec

Ugh.

jcdr428 commented 2 years ago

!!! I'll check whether there is an equivalent to UBSan in msvc options. This may also be the cause of other unreproducible bugs such as #505 .

Edit: not there yet :( https://developercommunity.visualstudio.com/t/add-support-for-ubsan/840750 https://developercommunity.visualstudio.com/t/support-ubsanundefinedbehaviorsanitizer-in-msvc/1393846 Time to look at MinGW/gcc...

lighterowl commented 2 years ago

Okay, I just merged #602 which avoids the shift problem. With these changes, I was able to get a bitwise same ISO on all compilers and platforms we support, including Mac Mini.

The alignment warnings reported by ubsan, although serious, don't pose a problem on either Intel or ARM, as neither of those architectures have strict alignment requirements. This is also why the fix only addresses the shift issue.

@axledentaldj Please fetch the newest code and test.

axledentaldj commented 2 years ago

Which? As I just downloaded the master and I got the same issue.

jcdr428 commented 2 years ago

Win64 https://github.com/justdan96/tsMuxer/suites/6511543803/artifacts/242245282 MacOS https://github.com/justdan96/tsMuxer/suites/6511543808/artifacts/242245218

Just go to the 'Actions' tab to have the latest builds.

axledentaldj commented 2 years ago

Tested the Win64 77f9dc3 in my Parallels Wndows 10, made a 1 minute ISO and it played on my Oppo-203.

Tested MacOS 77f9dc3 and it has the same problem: "File is not Supported". Using hex Fiend and replacing those hex numbers fixes the test BD ISO.

You can download these files here:

Win64: https://mega.nz/file/wEwllZ4D#9p0e8TEbSLKai_jrQHh2altCxUbf8jY0-buEiS_8DQ0

Mac: https://mega.nz/file/tV4XlBYa#dhSnO9IQrEQdGogyJuWiXdU-A9PfE1zx_ZVDqbY_nec

jcdr428 commented 2 years ago

@axledentaldj in the provided file 00000-tsmuxer-macosarm-77f9dc3.iso, there are no more hex numbers 05 04 48 44 4d 56 88 04 4d 56 88 04, the DTCP is now correctly set as 0f ff fc fc: so replacing those hex numbers could not have fixed anything.

Can you please double check that you tested the correct file ?

Untitled

axledentaldj commented 2 years ago

Double checked as you requested. Made a 2 minute clip of that same movie I use for testing this bug.

Still, same problem on my Oppo-203 (Free RU JB USA device), says "File is not supported" I can't figure it out why using hex Feind

050448444D5688044D568804

050448444D5688040FFFFCFC

Find and replace all

and I do the hex edit and save. It fixes it?!?!?!??!

Download that test BD.ISO here: https://mega.nz/file/1cQDnI4Z#pOcid4AHCF0MGVicx4f4yU1e3kuVr3cBA7g97hUa4Kw IMG_0772

jcdr428 commented 2 years ago

@xavery any chance that INT_BIT = 64 on MacOS ? constexpr static unsigned INT_BIT = CHAR_BIT * sizeof(unsigned);

lighterowl commented 2 years ago

@jcdr428 No, MacOS (both ARM and Intel) uses 32-bit ints :

% uname -a
Darwin foobar.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64

% echo 'int main(void) { return sizeof(unsigned); }' | clang -x c -; ./a.out; echo $?
4
% uname -a
Darwin foobar.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64

% echo 'int main(void) { return sizeof(unsigned); }' | clang -x c -; ./a.out; echo $?
4

Besides, I checked this on an Apple Silicon host and the resulting ISO was the same as Windows 64.

If you don't have any other ideas on what might be wrong (perhaps UDF Verifier has some ideas?), I don't know what else there is to be done here. As you've already noted, the HDMV descriptors themselves in the ISO files @axledentaldj posted look okay. In fact, the only bytes that differ between those two ISOs appear to be timestamps.

axledentaldj commented 2 years ago

Maybe I have something on my macOS 11.6.5 Arm Mac mini that's altering something? I know there's homebrew installed and had X11 stuff on my Mac mini but I uninstalled it many months ago. I know there's an update to my BigSur 11.6.6 is out.

Im thinking outside the box..? Hmm, how about someone on their MacOS machine, take my test video mkv file, and use tsmuxer Mac git 77f9dc and remux it into a BD ISO for me to play on my Oppo-203? Just to rule out its NOT my Mac mini (M1 2020 16GB 2TB SSD) doing something funny..?

Download the m2ts file here: https://mega.nz/file/BJQi0LaK#vc1e837-S9W0KNhobo4fXFvi3dY8QBv5MvuoXUU0fmU

jcdr428 commented 2 years ago

@xavery thank you very much. All good with UDF Verifier :(

@axledentaldj on the two last ISOs you posted, I could not find any 050448444D5688044D568804 chain. So I also can't figure out what Hex Fiend is fixing. Could you please upload two ISOs, one (non working) before Hex Fiend replace and one (working) after, so that I can spot any difference ?

axledentaldj commented 2 years ago

OK, files are ready for you to look at:

00000-tsmuxer-mac-git-77f9dc_A.iso (non-working) Download here: https://mega.nz/file/AEBHEKhD#l2wYYzpDqRUnXpPVcjHx7bjVNbgfZUMJ2rbUtAvMGII

00000-tsmuxer-mac-git-77f9dc_Hexfeind.iso (working) Download here: https://mega.nz/file/kIpmRCwL#IV8L9JL6u5zLcuplgIYlcbVV42t3WytHwRU7r660DtY

jcdr428 commented 2 years ago

@axledentaldj the two files are bit for bit identical. Same CRC32 hash...

axledentaldj commented 2 years ago

Really, I didnt check crc32 until you mentioned it, but its now really weird that it wont play unless I use hex feind? Like I said earlier, maybe theres something specific on my Mac Mini MacOS thats doing something? Did you take my sample m2ts file and remux it on a Macos tsmuxer mac git 77f99dc?

Screen Shot 2022-05-19 at 5 10 41 PM
jcdr428 commented 2 years ago

Very weird indeed. I don't have access to a MacOS.

axledentaldj commented 2 years ago

I think, that another macOS is indeed need and I totally forgot I got 2 more of them. Ones a macMini M1 with less memory and the other is my old late 2014 intel Mac mini. I will contact the person that has them and let you know the results.

axledentaldj commented 2 years ago

My friend ran tsmuxer mac git77f9dc on his Mac Mini M1 (2020) on MacOS 12.4 and remuxed my sample 4k m2ts clip into an BD ISO and it had nothing to do with my Mac Mini M1 (2020) because it still wont play on my Oppo-203 unless I Hex Edit it. I was hoping it was my Mac Mini M1.

jcdr428 commented 2 years ago

@axledentaldj the files are identical so my guess is you have to look at other macOS file elements: file attributes and permissions, access rights...

axledentaldj commented 2 years ago

I'll look at that and I have 1 other thing I'm gonna mess with. I'll look at the files inside the BDMV.. Thanks guys for all your efforts.

Looking at BDMV side and some of its contents and seeing a lot of different crc32 numbers, but MovieObject.bdmv shares the same crc32, but can't get DVDfab to make a BDMV folder playable.. and the weirdness contiues.. Sure a DVDFab ISO works.. now to mount that ISO and compare its crc32 contents and make it back in a BDMV. Weirdness continues, as I cant mount a BD ISO withought Finder not responding and a kernal panic begins and Im firced to reboot the mac mini. This just might never get resolved.

axledentaldj commented 2 years ago

I have some good news. I just did an erase and a fresh install of MacOS 12.4 on my Mac Mini M1 and remuxed a 4K mkv with tsmuxer git 7165e3b and its BD ISO IS Playable on the Oppo-203! I dont uabe much installed on my machine yet. Certainly there is NO Homebrew installed.