digidna / isobmff Goto Github PK
View Code? Open in Web Editor NEWC++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Home Page: https://imazing.com/isobmff
License: MIT License
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Home Page: https://imazing.com/isobmff
License: MIT License
This is less of an issue and more of a call for help!
I am trying to port ISOBMFF into a Windows Runtime Component using this guid in order to call the API from my C# UWP aplication. In my application i am trying to get Image collection and thier thumbnails in HEIC containers ( Example ! ) . On the other hand I am also trying to write several Images as a collection into a HEIC container.
I am hardly familiar with C++ which is the biggest obstacle I am facing.
It would be a great help it this library was accessable from other code languages (perhaps even as a NUGET
Write custom boxes and other custom metadata for parsing later?
Looks like this line (in BinaryStream.cpp) cannot work:
fractional = ( n & fractionalMask ) / ( 1 << fractionalLength );
because fractional is an unsigned int and should be returning a fractional value. Changing fractional to a float and therefore the line to:
fractional = static_cast< float >( n & fractionalMask ) / ( 1 << fractionalLength );
Should produce the correct result
I am trying to compile this code on Ubuntu 16.04.1 and am running into numerous issues.
The ISOBMFF-master/Makefile include path for the PIMPL Submodule includes is incorrect
The default Makefile uses clang. I tried using clang-5.0 and it will not compile for reasons such as #include not resolvable. This might be an artifact of having gcc-5.4.1 installed, and I did not dig into it. The only reason I tried using clang is because that is the default setting in the project, and I wondered if that would resolve the other issues I am having with gcc.
gcc 5.4.1 will not compile with a complaints such as:
ISOBMFF/source/HVCC-Array.cpp:34:50: error: specialization of ‘template class XS::PIMPL::Object::IMPL’ in different namespace [-fpermissive]
class XS::PIMPL::Object< ISOBMFF::HVCC::Array >::IMPL
So I am wondering what versions of linux and gcc tools this code has ever been compiled on.
I have a need to fix some MP4s that all have the same problem in the STTS atom/box.
Hello, thanks for the library.
Is partial parsing possible with this library? E.g download say 4-5 mb of large of file and attempt to parse moov from the data or download the last 4-5 mb of the file and attempt to parse the moov if moov is at end?
Thanks.
I can't use mingw32-make on this project. I did download the submodules, but I get this in the terminal:
process_begin: CreateProcess(NULL, uname, ...) failed. make: process_begin: CreateProcess(NULL, uname -m, ...) failed. make: 'cut' is not recognized as an internal or external command, operable program or batch file. '[' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. -f was unexpected at this time. The system cannot find the path specified. -f was unexpected at this time. process_begin: CreateProcess(NULL, uname, ...) failed. make[1]: process_begin: CreateProcess(NULL, uname -m, ...) failed. make[1]: 'cut' is not recognized as an internal or external command, operable program or batch file. '[' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. -f was unexpected at this time. The system cannot find the path specified. -f was unexpected at this time. process_begin: CreateProcess(NULL, uname, ...) failed. make[1]: process_begin: CreateProcess(NULL, uname -m, ...) failed. make[1]: 'cut' is not recognized as an internal or external command, operable program or batch file. '[' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. -f was unexpected at this time. The system cannot find the path specified. -f was unexpected at this time.
If someone could help me compile this project that would be awesome 😁
ISOBMFF-Dump misses many atoms like uuid, pasp etc. ISOBMFF-Explorer does not show either.
Also ISOBMFF-Dump (Explorer) cannot parse *.mov without ftyp.
Is it possible to make it so that ISOBMFF displays all atoms in atoms tree?
I have cloned recursively , but when i try to use parser , this exception occurs
undefined reference to `ISOBMFF::Parser::Parse(std::string const&)'
makefile:45: recipe for target 'HEICParser' failed
collect2: error: ld returned 1 exit status
i have linked the library using the command
g++ -L/home/path/ISOBMFF/Build/Release/Products/x86_64 -o "HEICParser" ./src/HEICParser.o -lISOBMFF
I have attached my code
mycode.txt
I have attached my code makefile command
makefile.txt
I have gone through many solutions but nothing helps .. kindly help me to solve this issue
I've just tried to run make (on OS X 10.11.6) from the project tld and immediately get the following error:
Makefile:31: Submodules/makelib/Common.mk: No such file or directory
Makefile:81: Submodules/makelib/Targets.mk: No such file or directory
make: *** No rule to make target `Submodules/makelib/Targets.mk'. Stop.
The "Submodules/makelib/" directory is indeed empty from a fresh git clone. Am I missing something?
I'm on Linux.
When running make
in the top-level, I get:
[ ISOBMFF ]> Compiling C++ file [ Release - x86_64 ]: HVCC.cpp
In file included from ISOBMFF/source/HVCC.cpp:31:
In file included from ISOBMFF/include/ISOBMFF/HVCC.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/FullBox.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/Box.hpp:36:
ISOBMFF/include/ISOBMFF/BinaryStream.hpp:34:10: fatal error: 'string' file not found
#include <string>
^
1 error generated.
make[1]: *** [Submodules/makelib/Targets.mk:220: Build/Release/Intermediates/x86_64/HVCC.cpp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
[ ISOBMFF ]> Compiling C++ file [ Release - x86_64 ]: STSD.cpp
In file included from ISOBMFF/source/STSD.cpp:31:
In file included from ISOBMFF/include/ISOBMFF/STSD.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/FullBox.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/Box.hpp:36:
ISOBMFF/include/ISOBMFF/BinaryStream.hpp:34:10: fatal error: 'string' file not found
#include <string>
^
It looks like it is compiling C instead of C++? With make SHELL='sh -x'
, I see:
+ echo -e [\x1b[32;01m ISOBMFF \x1b[0m]> Compiling C++ file [ \x1b[36;01mRelease - x86_64\x1b[0m ]: \x1b[33;01m\x1b[30;01mILOC-Item-Extent.cpp\x1b[0m\x1b[0m
-e [\x1b[32;01m ISOBMFF \x1b[0m]> Compiling C++ file [ \x1b[36;01mRelease - x86_64\x1b[0m ]: \x1b[33;01m\x1b[30;01mILOC-Item-Extent.cpp\x1b[0m\x1b[0m
+ clang -Werror -Wall -fPIC -Os -stdlib=libc++ -fno-strict-aliasing -ISubmodules/PIMPL/PIMPL/include -IISOBMFF/include/ -std=c++11 -o Build/Release/Intermediates/x86_64/ILOC-Item-Extent.cpp.o -c ISOBMFF/source/ILOC-Item-Extent.cpp
In file included from ISOBMFF/source/ILOC-Item-Extent.cpp:31:
In file included from ISOBMFF/include/ISOBMFF/ILOC.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/FullBox.hpp:36:
In file included from ISOBMFF/include/ISOBMFF/Box.hpp:36:
ISOBMFF/include/ISOBMFF/BinaryStream.hpp:34:10: fatal error: 'string' file not found
#include <string>
^
1 error generated.
make[1]: *** [Submodules/makelib/Targets.mk:220: Build/Release/Intermediates/x86_64/ILOC-Item-Extent.cpp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
It looks like it is using clang instead of clang++ for some reason, but CC=clang++ make
, make CC=clang++
or changing clang to clang++ in the Makefile don't seem to work either.
Compiling a minimal example with clang test.cpp -std=c++11 && ./a.out
works however, so it must be a build system issue.
#include <iostream>
#include <string>
int main()
{
std::cout << std::string( 5, 'A' ) << std::endl;
return 0;
}
ISOBMFF/ISOBMFF/include/ISOBMFF/Parser.hpp:34:31: fatal error: XS/PIMPL/Object.hpp: No such file or directory .....this exception occurs for me while trying to compile
The documents reference ISOBMFF::TRAK which does not exist in the library. Additionally, shared pointers are not used correctly:
std::shared_ptr< ISOBMFF::File > file = parser.GetFile();
std::shared_ptr< ISOBMFF::FTYP > ftyp = file.GetTypedBox< ISOBMFF::FTYP >( "ftyp" );
Should be:
std::shared_ptr< ISOBMFF::File > file = parser.GetFile();
std::shared_ptr< ISOBMFF::FTYP > ftyp = file->GetTypedBox< ISOBMFF::FTYP >( "ftyp" );
Hello,
I think there are .mk files that are not checked in - I was trying to run a "make" and received this error:
COSML-1686660:ISOBMFF nniels053$ make
Makefile:31: Submodules/makelib/Common.mk: No such file or directory
Makefile:81: Submodules/makelib/Targets.mk: No such file or directory
make: *** No rule to make target `Submodules/makelib/Targets.mk'. Stop.
Thanks,
-Nick
Hi,
The application does not check the upper limit of the size of the files that are attempted to be read in the application, and therefore the application fails Segmentation Fault when parse such files.
This is because the application is trying to allocate a vector at very large sizes. We share the lines of code that we think cause this problem below:
std::vector< uint8_t > BinaryStream::Read( size_t size )
{
std::vector< uint8_t > data( size, 0 );
if( size > 0 )
{
this->Read( &( data[ 0 ] ), size );
}
return data;
}
I have attached backtrace:
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737346040512) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737346040512) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737346040512, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7ab6476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7a9c7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff7dd953b in ?? () from /lib/x86_64-linux-gnu/libc++abi.so.1
#6 0x00007ffff7dc2feb in ?? () from /lib/x86_64-linux-gnu/libc++abi.so.1
#7 0x00007ffff7dd86f3 in ?? () from /lib/x86_64-linux-gnu/libc++abi.so.1
#8 0x00007ffff7ddb4d6 in ?? () from /lib/x86_64-linux-gnu/libc++abi.so.1
#9 0x00007ffff7ddb45c in __cxa_throw () from /lib/x86_64-linux-gnu/libc++abi.so.1
#10 0x00007ffff7ddafe8 in operator new(unsigned long) () from /lib/x86_64-linux-gnu/libc++abi.so.1
#11 0x00007ffff7f81d03 in std::__1::__libcpp_operator_new[abi:v15007]<unsigned long>(unsigned long) (__args=1542885733411454960) at /usr/include/c++/v1/new:246
#12 std::__1::__libcpp_allocate[abi:v15007](unsigned long, unsigned long) (__size=1542885733411454960, __align=1) at /usr/include/c++/v1/new:272
#13 std::__1::allocator<unsigned char>::allocate[abi:v15007](unsigned long) (this=0x7fffffffdb00, __n=1542885733411454960)
at /usr/include/c++/v1/__memory/allocator.h:112
#14 std::__1::__allocate_at_least[abi:v15007]<std::__1::allocator<unsigned char> >(std::__1::allocator<unsigned char>&, unsigned long) (__alloc=...,
__n=1542885733411454960) at /usr/include/c++/v1/__memory/allocate_at_least.h:54
#15 std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::__vallocate[abi:v15007](unsigned long) (this=0x7fffffffdaf0, __n=4182248)
at /usr/include/c++/v1/vector:692
#16 0x00007ffff7f86456 in std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::vector (this=0x3fd0e8, __n=4182248,
__n@entry=1542885733411454960, __x=<error reading variable: Cannot access memory at address 0x6>) at /usr/include/c++/v1/vector:1123
#17 0x00007ffff7f25b5a in ISOBMFF::BinaryStream::Read (this=0x555555577060, size=1542885733411454960) at ISOBMFF/source/BinaryStream.cpp:73
#18 0x00007ffff7f30193 in ISOBMFF::ContainerBox::ReadData (this=0x7fffffffdba8, parser=..., stream=...) at ISOBMFF/source/ContainerBox.cpp:115
#19 0x00007ffff7f4659c in ISOBMFF::IINF::ReadData (this=0x5555555773e8, parser=..., stream=...) at ISOBMFF/source/IINF.cpp:98
#20 0x00007ffff7f304d7 in ISOBMFF::ContainerBox::ReadData (this=0x7fffffffdcc8, parser=..., stream=...) at ISOBMFF/source/ContainerBox.cpp:136
#21 0x00007ffff7f5f8ac in ISOBMFF::META::ReadData (this=0x555555576f58, parser=..., stream=...) at ISOBMFF/source/META.cpp:99
#22 0x00007ffff7f304d7 in ISOBMFF::ContainerBox::ReadData (this=0x555555576d28, parser=..., stream=...) at ISOBMFF/source/ContainerBox.cpp:136
#23 0x00007ffff7f6a2a3 in ISOBMFF::Parser::Parse (this=this@entry=0x7fffffffde88, stream=...) at ISOBMFF/source/Parser.cpp:211
#24 0x00007ffff7f697ad in ISOBMFF::Parser::Parse (this=0x7fffffffde88, path=...) at ISOBMFF/source/Parser.cpp:163
#25 0x0000555555557cbd in main (argc=2, argv=0x7fffffffe278) at main.cpp:75
Also I have attached the file below that causes crashing the application:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.