DumpTS icon indicating copy to clipboard operation
DumpTS copied to clipboard

macOS compile

Open grylem opened this issue 5 years ago • 21 comments

Is this possible compile on macOS?

grylem avatar Oct 02 '18 15:10 grylem

grylem,

Thanks for your attention and comments, I am very glad this project is noticed by somebody, sweet!

I am not familiar with macOS development environment, but I am familiar at Linux development environment, I planned to let it to be compiled well under Linux after finishing MMT/TLV elementary stream extracting this month, and then macOS, it may not take too much effort for me to finish it.

BTW: Of course, if anybody is interested in this open project, it is welcome to add this kind of platform porting, it may be more efficient, :)

wangf1978 avatar Oct 02 '18 15:10 wangf1978

wangf1978 possible if the project can be compiled under Linux it can be compiled under macOS. this can be checked when you finish your work for Linux porting. good luck

grylem avatar Oct 02 '18 17:10 grylem

Now it can be compiled successfully under linux, please see the details in the README.md

wangf1978 avatar Oct 07 '18 04:10 wangf1978

Tried to compile under macOS but not successfully. Too many errors. some managed to solve - by adding to makefile -std=c++14, some not yet

grylem avatar Oct 07 '18 06:10 grylem

Fix it, please see the details in README.md It works well under macOS Mojave although there are still some warnings to be fixed clang --version Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

wangf1978 avatar Oct 07 '18 15:10 wangf1978

Thanks. DumpTS test.mp4 --showinfo --removebox='udta' show same info like DumpTS test.mp4 --showinfo and mesage Failed to open the file: /path/test.mp4~5041293523865039971 {errno: 2}.

grylem avatar Oct 08 '18 10:10 grylem

Sorry for unfriendly usage, at present it does NOT support in-place removebox. You can use the below command:

DumpTS test.mp4 --showinfo
DumpTS test.mp4 --removebox='udta' --output=test_new.mp4 --verbose=1
DumpTS test_new.mp4 --showinfo

In-place removebox will be supported later.

wangf1978 avatar Oct 08 '18 14:10 wangf1978

Thanks! Please remove this example from readme DumpTS C:\test.mp4 --showinfo --removebox='unkn'

grylem avatar Oct 08 '18 18:10 grylem

Thanks, after checking the code, these command can be supported, but there are some bugs in MacOS, and in Windows/Linux, there also exists a issue, I will fix them together soon.

wangf1978 avatar Oct 09 '18 14:10 wangf1978

DumpTS test.mp4 --showinfo --removebox='udta' show same info like DumpTS test.mp4 --showinfo and mesage Failed to open the file: /path/test.mp4~5041293523865039971 {errno: 2}.

This issue is already fixed, too.

wangf1978 avatar Oct 11 '18 03:10 wangf1978

Multiple error then compile latest version ../../src/HuffmanTree.cpp:746:4: error: cannot jump from this goto statement to its label goto done; ^ ../../src/HuffmanTree.cpp:763:60: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:42: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:24: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:6: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:762:51: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:762:28: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:762:6: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:761:6: note: jump bypasses variable initialization int VLC_items_per_line = 5; ^ ../../src/HuffmanTree.cpp:759:6: note: jump bypasses variable initialization int Dimension = -1; ^ ../../src/HuffmanTree.cpp:734:4: error: cannot jump from this goto statement to its label goto done; ^ ../../src/HuffmanTree.cpp:763:60: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:42: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:24: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:763:6: note: jump bypasses variable initialization int nMaxCharsOfW = 0, nMaxCharsOfX = 0, nMaxCharsOfY = 0, nMaxCharsOfZ = 0; ^ ../../src/HuffmanTree.cpp:762:51: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:762:28: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:762:6: note: jump bypasses variable initialization int nMaxCharsOfValue = 0, nMaxCharsOfLength = 0, nMaxCharsOfCodeBits = 0; ^ ../../src/HuffmanTree.cpp:761:6: note: jump bypasses variable initialization int VLC_items_per_line = 5; ^ ../../src/HuffmanTree.cpp:759:6: note: jump bypasses variable initialization int Dimension = -1; ^ 2 errors generated. make: *** [obj/HuffmanTree.o] Error 1

grylem avatar Nov 04 '18 12:11 grylem

Many thanks. Fixed it in the latest commit.

wangf1978 avatar Nov 05 '18 09:11 wangf1978

Thanks. Can you test this ..? there are two files test.mp4 from final cut test1.mp4 other source DumpTS test.mp4 --removebox='udta' - processed file is broken message from terminal - removebox : udta input : test.mp4 [Box][sdtp] Can't find 'stsz' or 'stz2' box to get sample count. DumpTS test1.mp4 --removebox='free' - processed file is broken removebox : free input : test1.mp4

in both cases no vidio and audion in processed files.

grylem avatar Nov 05 '18 12:11 grylem

can you upload test.mp4 and test1.mp4? I have tried the file t.mp4 in my side, it seems to work well.

wangf1978 avatar Nov 05 '18 13:11 wangf1978

of course for your 1.mp4 all ok. orig.zip processed.zip

grylem avatar Nov 05 '18 14:11 grylem

Thanks for your materials, it is fixed, please check the latest commit.

wangf1978 avatar Nov 06 '18 09:11 wangf1978

tested in another way ./DumpTS test.mp4 --output=test.h264 --trackid=2 --outputfmt=es [Box][sdtp] Can't find 'stsz' or 'stz2' box to get sample count. that's not all extract *.h264 with other diffirent soft rhash test.h264 test_1.h264 test_2h.264 for extracted with DumpTS checksun is b27b46ef31bd9d41b91b2e593aff50b7 for other 2 files 1dc1d4576ed0d4fefa023e70f88d3bb1 compare in hex fiend test.h264 and test_2.h264 has 505 differences in one byte

grylem avatar Nov 06 '18 11:11 grylem

H.264 SPS/PPS is added at the beginning?

wangf1978 avatar Nov 06 '18 11:11 wangf1978

You can make own test. test.mp4 from orig.zip

grylem avatar Nov 06 '18 19:11 grylem

Ok, thanks. can you upload the dumped .h264 stream with other software? I will do binary comparing, and something should be found.

wangf1978 avatar Nov 07 '18 13:11 wangf1978

you can do it yourself https://github.com/DolbyLaboratories/dlb_mp4demux https://github.com/gpac/gpac for gpac you need an old version v5.2
or you can use other programs that you like.and compare the result

grylem avatar Nov 07 '18 15:11 grylem