Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS compile #1

Open
grylem opened this issue Oct 2, 2018 · 21 comments
Open

macOS compile #1

grylem opened this issue Oct 2, 2018 · 21 comments

Comments

@grylem
Copy link

grylem commented Oct 2, 2018

Is this possible compile on macOS?

@wangf1978
Copy link
Owner

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, :)

@grylem
Copy link
Author

grylem commented Oct 2, 2018

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

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Oct 7, 2018

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

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Oct 8, 2018

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}.

@wangf1978
Copy link
Owner

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.

@grylem
Copy link
Author

grylem commented Oct 8, 2018

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

@wangf1978
Copy link
Owner

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
Copy link
Owner

wangf1978 commented Oct 11, 2018

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.

@grylem
Copy link
Author

grylem commented Nov 4, 2018

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

@wangf1978
Copy link
Owner

Many thanks.
Fixed it in the latest commit.

@grylem
Copy link
Author

grylem commented Nov 5, 2018

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.

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Nov 5, 2018

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

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Nov 6, 2018

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

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Nov 6, 2018

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

@wangf1978
Copy link
Owner

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

@grylem
Copy link
Author

grylem commented Nov 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants