issue_owner_repo
listlengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
925
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
2.5k
issue_created_at
stringlengths
20
20
issue_updated_at
stringlengths
20
20
issue_html_url
stringlengths
37
62
issue_github_id
int64
387k
2.46B
issue_number
int64
1
127k
[ "axiomatic-systems", "Bento4" ]
On master compiled right now, so on 2017-09-10 (but please confirm if this affects current stable): ``` # mp4info $FILE ==87185==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400000013e at pc 0x00000057a0db bp 0x7ffca59fc550 sp 0x7ffca59fc548 READ of size 1 at 0x60400000013e thread T0 #0 0x57a0da in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AvccAtom.cpp:88:35 #1 0x576171 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:477:20 #2 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #3 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #4 0x617d75 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:115:9 #5 0x61fb44 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #6 0x61fb44 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:994 #7 0x576de7 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #8 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #9 0x63629c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4StsdAtom.cpp:101:13 #10 0x634efd in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4StsdAtom.cpp:57:16 #11 0x575580 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #12 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #13 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #14 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #15 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #16 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #17 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #18 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #19 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #20 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #21 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #22 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #23 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #24 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #25 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #26 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #27 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #28 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #29 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #30 0x6533bd in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #31 0x573c5d in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.h:58:20 #32 0x573c5d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:377 #33 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #34 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #35 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #36 0x5cca60 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #37 0x575b81 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.h:56:20 #38 0x575b81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:357 #39 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #40 0x5723e0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #41 0x59a18c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:104:12 #42 0x59a85a in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:78:5 #43 0x5440b7 in main /tmp/Bento4-master-2017-09-10/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1571:26 #44 0x7fd34e4a3680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #45 0x450c38 in _start (/usr/bin/mp4info+0x450c38) 0x60400000013e is located 0 bytes to the right of 46-byte region [0x604000000110,0x60400000013e) allocated by thread T0 here: #0 0x53f7f0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x590677 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DataBuffer.cpp:55:16 #2 0x579bc0 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AvccAtom.cpp:69:20 #3 0x576171 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:477:20 #4 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #6 0x617d75 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:115:9 #7 0x61fb44 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #8 0x61fb44 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4SampleEntry.cpp:994 #9 0x576de7 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #10 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #11 0x63629c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4StsdAtom.cpp:101:13 #12 0x634efd in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4StsdAtom.cpp:57:16 #13 0x575580 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #14 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #16 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #17 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #18 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #19 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #21 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #22 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #23 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #24 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #25 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #26 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #27 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #28 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #29 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #30 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #31 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #32 0x6533bd in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #33 0x573c5d in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.h:58:20 #34 0x573c5d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:377 SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AvccAtom.cpp:88:35 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) Shadow bytes around the buggy address: 0x0c087fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c087fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c087fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c087fff8000: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00 0x0c087fff8010: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00 =>0x0c087fff8020: fa fa 00 00 00 00 00[06]fa fa fa fa fa fa fa fa 0x0c087fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==87185==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00356-bento4-heapoverflow-AP4_AvccAtom_Create
heap-based buffer overflow in AP4_AvccAtom::Create (Ap4AvccAtom.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/193/comments
0
2017-09-10T08:51:33Z
2017-12-17T00:59:25Z
https://github.com/axiomatic-systems/Bento4/issues/193
256,495,117
193
[ "axiomatic-systems", "Bento4" ]
On master compiled right now, so on 2017-09-10 (but please confirm if this affects current stable): ``` # mp4info $FILE ==100065==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000386 at pc 0x0000005a7739 bp 0x7ffcee1bf2c0 sp 0x7ffcee1bf2b8 READ of size 1 at 0x603000000386 thread T0 #0 0x5a7738 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4HvccAtom.cpp:279:24 #1 0x5a0631 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4HvccAtom.cpp:90:16 #2 0x573de9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:482:20 #3 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #4 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #5 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #6 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #7 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #8 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #9 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #10 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #11 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #12 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #13 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #14 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #15 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #16 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #17 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #18 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #19 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #20 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #21 0x6533bd in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #22 0x573c5d in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.h:58:20 #23 0x573c5d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:377 #24 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #25 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #26 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #27 0x5cca60 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #28 0x575b81 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.h:56:20 #29 0x575b81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:357 #30 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #31 0x5723e0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #32 0x59a18c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:104:12 #33 0x59a85a in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:78:5 #34 0x5440b7 in main /tmp/Bento4-master-2017-09-10/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1571:26 #35 0x7fe45815a680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #36 0x450c38 in _start (/usr/bin/mp4info+0x450c38) 0x603000000386 is located 0 bytes to the right of 22-byte region [0x603000000370,0x603000000386) allocated by thread T0 here: #0 0x53f7f0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x590677 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DataBuffer.cpp:55:16 #2 0x5a0571 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4HvccAtom.cpp:86:20 #3 0x573de9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:482:20 #4 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #6 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #7 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #8 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #9 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #11 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #12 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #13 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #14 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #16 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #17 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #18 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #19 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #21 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #22 0x6533bd in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #23 0x573c5d in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4TrakAtom.h:58:20 #24 0x573c5d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:377 #25 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #26 0x58bd91 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #27 0x58b8c9 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #28 0x5cca60 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #29 0x575b81 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4MoovAtom.h:56:20 #30 0x575b81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:357 #31 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #32 0x5723e0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #33 0x59a18c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:104:12 #34 0x59a85a in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:78:5 SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4HvccAtom.cpp:279:24 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff8020: 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa 0x0c067fff8030: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff8040: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x0c067fff8050: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x0c067fff8060: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 =>0x0c067fff8070:[06]fa fa fa 00 00 06 fa fa fa fa fa fa fa fa fa 0x0c067fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==100065==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00355-bento4-heapoverflow-AP4_HvccAtom_AP4_HvccAtom
heap-based buffer overflow in AP4_HvccAtom::AP4_HvccAtom (Ap4HvccAtom.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/192/comments
0
2017-09-10T08:48:02Z
2017-12-17T00:59:25Z
https://github.com/axiomatic-systems/Bento4/issues/192
256,494,941
192
[ "axiomatic-systems", "Bento4" ]
On master compiled right now, so on 2017-09-10: ``` # mp4info $FILE ==108159==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000091 at pc 0x00000058f0e8 bp 0x7fffd8e97690 sp 0x7fffd8e97688 READ of size 1 at 0x602000000091 thread T0 #0 0x58f0e7 in AP4_BytesToUInt32BE(unsigned char const*) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4Utils.h:79:22 #1 0x58f0e7 in AP4_CttsAtom::AP4_CttsAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4CttsAtom.cpp:89 #2 0x58e426 in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4CttsAtom.cpp:52:16 #3 0x5761ef in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:457:20 #4 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #6 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #7 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #8 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #9 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x594c87 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #11 0x59433d in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #12 0x573ed0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:533:20 #13 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #14 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #15 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #16 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #17 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #18 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #19 0x5723e0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #20 0x59a18c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:104:12 #21 0x59a85a in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:78:5 #22 0x5440b7 in main /tmp/Bento4-master-2017-09-10/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1571:26 #23 0x7ff857ac9680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #24 0x450c38 in _start (/usr/bin/mp4info+0x450c38) 0x602000000091 is located 0 bytes to the right of 1-byte region [0x602000000090,0x602000000091) allocated by thread T0 here: #0 0x53f7f0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x58eb62 in AP4_CttsAtom::AP4_CttsAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4CttsAtom.cpp:80:29 #2 0x58e426 in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4CttsAtom.cpp:52:16 #3 0x5761ef in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:457:20 #4 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #6 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #7 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #8 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #9 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x594c87 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #11 0x59433d in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #12 0x573ed0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:533:20 #13 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #14 0x58bacf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #15 0x58a99a in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #16 0x58a99a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4ContainerAtom.cpp:88 #17 0x5752b0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:755:20 #18 0x572ddd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #19 0x5723e0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #20 0x59a18c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:104:12 #21 0x59a85a in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4File.cpp:78:5 #22 0x5440b7 in main /tmp/Bento4-master-2017-09-10/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1571:26 #23 0x7ff857ac9680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/Bento4-master-2017-09-10/Source/C++/Core/Ap4Utils.h:79:22 in AP4_BytesToUInt32BE(unsigned char const*) Shadow bytes around the buggy address: 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 =>0x0c047fff8010: fa fa[01]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==108159==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00354-bento4-heapoverflow-AP4_BytesToUInt32BE If you think it is a different issue instead of an unfixed one, please let me now. Thanks
heap-based buffer overflow in AP4_BytesToUInt32BE (Ap4Utils.h) (UNFIXED #187)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/191/comments
0
2017-09-10T08:44:17Z
2017-12-17T00:59:25Z
https://github.com/axiomatic-systems/Bento4/issues/191
256,494,784
191
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ==4435==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fe62b800e86 at pc 0x00000057b5a3 bp 0x7ffea98c1b10 sp 0x7ffea98c1b08 WRITE of size 1 at 0x7fe62b800e86 thread T0 #0 0x57b5a2 in AP4_VisualSampleEntry::ReadFields(AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:780:40 #1 0x575726 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:108:5 #2 0x57d624 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #3 0x57d624 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:994 #4 0x5cbf58 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #5 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #6 0x586a2c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:100:13 #7 0x58566f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:56:16 #8 0x5ca71c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #9 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #11 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #12 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #13 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #18 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #19 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #21 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #22 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #23 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #24 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #25 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #26 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #27 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #28 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #29 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #30 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #31 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #32 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #33 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #34 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #35 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #36 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #37 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #38 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #39 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #40 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #41 0x7fe62e887680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #42 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) Address 0x7fe62b800e86 is located in stack of thread T0 at offset 6 in frame #0 0x57b2ef in AP4_VisualSampleEntry::ReadFields(AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:759 This frame has 1 object(s): [32, 65) 'compressor_name' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-underflow /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:780:40 in AP4_VisualSampleEntry::ReadFields(AP4_ByteStream&) Shadow bytes around the buggy address: 0x0ffd456f8180: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 0x0ffd456f8190: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x0ffd456f81a0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x0ffd456f81b0: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 0x0ffd456f81c0: f1 f1 f1 f1 04 f2 00 f2 f2 f2 00 f3 f3 f3 f3 f3 =>0x0ffd456f81d0:[f1]f1 f1 f1 00 00 00 00 01 f3 f3 f3 f3 f3 f3 f3 0x0ffd456f81e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffd456f81f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffd456f8200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffd456f8210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ffd456f8220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==4435==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00344-bento4-stackunderflow-AP4_VisualSampleEntry_ReadFields
stack-based buffer underflow in AP4_VisualSampleEntry::ReadFields (Ap4SampleEntry.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/190/comments
3
2017-09-08T13:41:59Z
2017-09-10T08:30:05Z
https://github.com/axiomatic-systems/Bento4/issues/190
256,257,778
190
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ==9052==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fc5ce900866 at pc 0x00000057b5a3 bp 0x7ffd0f773130 sp 0x7ffd0f773128 WRITE of size 1 at 0x7fc5ce900866 thread T0 #0 0x57b5a2 in AP4_VisualSampleEntry::ReadFields(AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:780:40 #1 0x575726 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:108:5 #2 0x57d624 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #3 0x57d624 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:994 #4 0x5cbf58 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #5 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #6 0x586a2c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:100:13 #7 0x58566f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:56:16 #8 0x5ca71c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #9 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #11 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #12 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #13 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #18 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #19 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #21 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #22 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #23 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #24 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #25 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #26 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #27 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #28 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #29 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #30 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #31 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #32 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #33 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #34 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #35 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #36 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #37 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #38 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #39 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #40 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #41 0x7fc5d1a6a680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #42 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) Address 0x7fc5ce900866 is located in stack of thread T0 at offset 102 in frame #0 0x58676f in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:88 This frame has 3 object(s): [32, 36) 'entry_count' [48, 56) 'bytes_available' [80, 88) 'atom' <== Memory access at offset 102 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:780:40 in AP4_VisualSampleEntry::ReadFields(AP4_ByteStream&) Shadow bytes around the buggy address: 0x0ff939d180b0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x0ff939d180c0: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 0x0ff939d180d0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x0ff939d180e0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x0ff939d180f0: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 =>0x0ff939d18100: f1 f1 f1 f1 04 f2 00 f2 f2 f2 00 f3[f3]f3 f3 f3 0x0ff939d18110: f1 f1 f1 f1 00 00 00 00 01 f3 f3 f3 f3 f3 f3 f3 0x0ff939d18120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ff939d18130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ff939d18140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ff939d18150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==9052==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00343-bento4-stackoverflow-AP4_VisualSampleEntry_ReadFields
stack-based buffer overflow in AP4_VisualSampleEntry::ReadFields (Ap4SampleEntry.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/189/comments
3
2017-09-08T13:39:47Z
2017-09-13T02:41:28Z
https://github.com/axiomatic-systems/Bento4/issues/189
256,257,204
189
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ==20986==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x606000000174 at pc 0x0000004ee515 bp 0x7ffd0b8395f0 sp 0x7ffd0b838da0 READ of size 65509 at 0x606000000174 thread T0 #0 0x4ee514 in __asan_memcpy /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_interceptors.cc:453 #1 0x54de2b in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #2 0x5d4a83 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AvccAtom.cpp:165:32 #3 0x5d1b6b in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AvccAtom.cpp:95:16 #4 0x5cb2e2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:477:20 #5 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #6 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #7 0x575855 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:115:9 #8 0x57d624 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #9 0x57d624 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:994 #10 0x5cbf58 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #11 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #12 0x586a2c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:100:13 #13 0x58566f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:56:16 #14 0x5ca71c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #15 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #16 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #17 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #18 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #19 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #20 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #21 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #22 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #23 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #24 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #25 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #26 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #27 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #28 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #29 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #30 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #31 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #32 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #33 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #34 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #35 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #36 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #37 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #38 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #39 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #40 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #41 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #42 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #43 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #44 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #45 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #46 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #47 0x7f1552e11680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #48 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) 0x606000000174 is located 0 bytes to the right of 52-byte region [0x606000000140,0x606000000174) allocated by thread T0 here: #0 0x53dfb0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x54c887 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DataBuffer.cpp:55:16 #2 0x5d1690 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AvccAtom.cpp:69:20 #3 0x5cb2e2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:477:20 #4 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #6 0x575855 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:115:9 #7 0x57d624 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #8 0x57d624 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:994 #9 0x5cbf58 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #10 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #11 0x586a2c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:100:13 #12 0x58566f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:56:16 #13 0x5ca71c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #18 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #19 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #21 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #22 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #23 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #24 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #25 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #26 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #27 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #28 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #29 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #30 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #31 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #32 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #33 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #34 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 SUMMARY: AddressSanitizer: heap-buffer-overflow /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_interceptors.cc:453 in __asan_memcpy Shadow bytes around the buggy address: 0x0c0c7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff8000: fa fa fa fa 00 00 00 00 00 00 02 fa fa fa fa fa 0x0c0c7fff8010: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 =>0x0c0c7fff8020: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00[04]fa 0x0c0c7fff8030: fa fa fa fa 00 00 00 00 00 00 04 fa fa fa fa fa 0x0c0c7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==20986==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00342-bento4-heapoverflow-AP4_DataBuffer_SetData
heap-based buffer overflow in AP4_DataBuffer::SetData (Ap4DataBuffer.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/188/comments
1
2017-09-08T13:37:40Z
2017-09-09T23:23:15Z
https://github.com/axiomatic-systems/Bento4/issues/188
256,256,574
188
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ==1966==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x617000000324 at pc 0x000000690d51 bp 0x7ffc25bed310 sp 0x7ffc25bed308 READ of size 1 at 0x617000000324 thread T0 #0 0x690d50 in AP4_BytesToUInt32BE(unsigned char const*) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Utils.h:78:22 #1 0x690d50 in AP4_StszAtom::AP4_StszAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StszAtom.cpp:85 #2 0x69036e in AP4_StszAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StszAtom.cpp:51:16 #3 0x5ca79a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:442:20 #4 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #6 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #7 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #8 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #9 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #11 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #12 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #13 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #18 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #19 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #21 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #22 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #23 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #24 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #25 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #26 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #27 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #28 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #29 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #30 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #31 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #32 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #33 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #34 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #35 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #36 0x7f3271712680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #37 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) 0x617000000324 is located 0 bytes to the right of 676-byte region [0x617000000080,0x617000000324) allocated by thread T0 here: #0 0x53dfb0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x6909e3 in AP4_StszAtom::AP4_StszAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StszAtom.cpp:78:33 #2 0x69036e in AP4_StszAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StszAtom.cpp:51:16 #3 0x5ca79a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:442:20 #4 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #6 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #7 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #8 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #9 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #11 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #12 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #13 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #18 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #19 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #20 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #21 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #22 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #23 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #24 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #25 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #26 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #27 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #28 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #29 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #30 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #31 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #32 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #33 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #34 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Utils.h:78:22 in AP4_BytesToUInt32BE(unsigned char const*) Shadow bytes around the buggy address: 0x0c2e7fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2e7fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2e7fff8030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2e7fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c2e7fff8050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c2e7fff8060: 00 00 00 00[04]fa fa fa fa fa fa fa fa fa fa fa 0x0c2e7fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c2e7fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c2e7fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c2e7fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c2e7fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==1966==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00341-bento4-heapoverflow-AP4_BytesToUInt32BE
heap-based buffer overflow in AP4_BytesToUInt32BE (Ap4Utils.h)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/187/comments
1
2017-09-08T13:35:49Z
2017-09-09T23:22:22Z
https://github.com/axiomatic-systems/Bento4/issues/187
256,256,050
187
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ==10603==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000af at pc 0x000000622588 bp 0x7ffccfc80f10 sp 0x7ffccfc80f08 WRITE of size 1 at 0x6020000000af thread T0 #0 0x622587 in AP4_HdlrAtom::AP4_HdlrAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:87:21 #1 0x621f4e in AP4_HdlrAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:51:16 #2 0x5cae91 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:387:20 #3 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #4 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #5 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #6 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #7 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #8 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #9 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #10 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #11 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #12 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #13 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #14 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #15 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #16 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #17 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #18 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #19 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #20 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #21 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #22 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #23 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #24 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #25 0x7f37dafa8680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #26 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) 0x6020000000af is located 1 bytes to the left of 1-byte region [0x6020000000b0,0x6020000000b1) allocated by thread T0 here: #0 0x53dfb0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x6223fa in AP4_HdlrAtom::AP4_HdlrAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:85:18 #2 0x621f4e in AP4_HdlrAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:51:16 #3 0x5cae91 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:387:20 #4 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #5 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #6 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #7 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #8 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #9 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #10 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #11 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #12 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #13 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #14 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #15 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #16 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #17 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #18 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #19 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #20 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #21 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #22 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #23 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #24 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #25 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #26 0x7f37dafa8680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:87:21 in AP4_HdlrAtom::AP4_HdlrAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) Shadow bytes around the buggy address: 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 =>0x0c047fff8010: fa fa 04 fa fa[fa]01 fa fa fa fa fa fa fa fa fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==10603==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00340-bento4-heapoverflow-AP4_HdlrAtom_AP4_HdlrAtom
heap-based buffer overflow in AP4_HdlrAtom::AP4_HdlrAtom (Ap4HdlrAtom.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/186/comments
2
2017-09-08T13:33:53Z
2017-09-12T14:28:05Z
https://github.com/axiomatic-systems/Bento4/issues/186
256,255,533
186
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ASAN:DEADLYSIGNAL ================================================================= ==18215==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f23fa12110e bp 0x000000000017 sp 0x7fff671b9178 T0) ==18215==The signal is caused by a WRITE memory access. ==18215==Hint: address points to the zero page. #0 0x7f23fa12110d /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/string/../sysdeps/x86_64/memcpy.S:71 #1 0x7f23fa10febd in __GI__IO_file_xsgetn /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/libio/fileops.c:1392 #2 0x7f23fa10520f in fread /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/libio/iofread.c:38 #3 0x5b6557 in AP4_StdcFileByteStream::ReadPartial(void*, unsigned int, unsigned int&) /tmp/Bento4-1.5.0-617/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:237:14 #4 0x544473 in AP4_ByteStream::Read(void*, unsigned int) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ByteStream.cpp:55:29 #5 0x622427 in AP4_HdlrAtom::AP4_HdlrAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:86:12 #6 0x621f4e in AP4_HdlrAtom::Create(unsigned int, AP4_ByteStream&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4HdlrAtom.cpp:51:16 #7 0x5cae91 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:387:20 #8 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #9 0x617c17 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DrefAtom.cpp:83:16 #10 0x617329 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DrefAtom.cpp:49:16 #11 0x5c90ae in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:529:20 #12 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #13 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #14 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #15 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #16 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #17 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #18 0x617c17 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DrefAtom.cpp:83:16 #19 0x617329 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4DrefAtom.cpp:49:16 #20 0x5c90ae in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:529:20 #21 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #22 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #23 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #24 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #25 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #26 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #27 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #28 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #29 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #30 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #31 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #32 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #33 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #34 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #35 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #36 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #37 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #38 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #39 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #40 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #41 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #42 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #43 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #44 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #45 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #46 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #47 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #48 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #49 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #50 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #51 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #52 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #53 0x7f23fa0bf680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #54 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/string/../sysdeps/x86_64/memcpy.S:71 ==18215==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00339-bento4-NULLptr-AP4_StdcFileByteStream_ReadPartial
NULL pointer dereference in AP4_StdcFileByteStream::ReadPartial (Ap4StdCFileByteStream.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/185/comments
1
2017-09-08T13:31:49Z
2017-09-09T23:21:54Z
https://github.com/axiomatic-systems/Bento4/issues/185
256,254,952
185
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ASAN:DEADLYSIGNAL ================================================================= ==11595==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000005b27fe bp 0x7ffce60a67e0 sp 0x7ffce60a67c0 T0) ==11595==The signal is caused by a READ memory access. ==11595==Hint: address points to the zero page. #0 0x5b27fd in AP4_DataAtom::~AP4_DataAtom() /tmp/Bento4-1.5.0-617/Source/C++/MetaData/Ap4MetaData.cpp:1357:5 #1 0x5b27fd in AP4_DataAtom::~AP4_DataAtom() /tmp/Bento4-1.5.0-617/Source/C++/MetaData/Ap4MetaData.cpp:1356 #2 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #3 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #4 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48:7 #5 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48 #6 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #7 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #8 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48:7 #9 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48 #10 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #11 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #12 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48:7 #13 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48 #14 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #15 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #16 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48:7 #17 0x60e6d8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48 #18 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #19 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #20 0x553af8 in AP4_ContainerAtom::~AP4_ContainerAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.h:48:7 #21 0x553af8 in AP4_MoovAtom::~AP4_MoovAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:47 #22 0x553af8 in AP4_MoovAtom::~AP4_MoovAtom() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:47 #23 0x5bf8d4 in AP4_List<AP4_Atom>::DeleteReferences() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4List.h:476:9 #24 0x5bf8d4 in AP4_AtomParent::~AP4_AtomParent() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.cpp:512 #25 0x54f634 in AP4_File::~AP4_File() /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:85:1 #26 0x5433c4 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:292:5 #27 0x7f0ba50e1680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #28 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /tmp/Bento4-1.5.0-617/Source/C++/MetaData/Ap4MetaData.cpp:1357:5 in AP4_DataAtom::~AP4_DataAtom() ==11595==ABORTING Audio Track: duration: 7848 ms sample count: 16 ``` Testcase: https://github.com/asarubbo/poc/blob/master/00338-bento4-NULLptr-AP4_DataAtom_AP4_DataAtom
NULL pointer dereference in AP4_DataAtom::~AP4_DataAtom (Ap4MetaData.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/184/comments
2
2017-09-08T13:28:21Z
2024-05-10T02:59:00Z
https://github.com/axiomatic-systems/Bento4/issues/184
256,253,999
184
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ASAN:DEADLYSIGNAL ================================================================= ==6365==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000005cf94c bp 0x7fff5857d580 sp 0x7fff5857d4c0 T0) ==6365==The signal is caused by a READ memory access. ==6365==Hint: address points to the zero page. #0 0x5cf94b in AP4_AtomSampleTable::GetSample(unsigned int, AP4_Sample&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomSampleTable.cpp #1 0x58d158 in AP4_Track::GetSample(unsigned int, AP4_Sample&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Track.cpp:435:43 #2 0x58d158 in AP4_Track::ReadSample(unsigned int, AP4_Sample&, AP4_DataBuffer&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Track.cpp:469 #3 0x5430ad in WriteSamples(AP4_Track*, AP4_SampleDescription*, AP4_ByteStream*) /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:192:12 #4 0x5430ad in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:274 #5 0x7f41deb72680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #6 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomSampleTable.cpp in AP4_AtomSampleTable::GetSample(unsigned int, AP4_Sample&) ==6365==ABORTING Audio Track: duration: 7848 ms sample count: 169 ``` Testcase: https://github.com/asarubbo/poc/blob/master/00337-bento4-NULLptr-AP4_AtomSampleTable_GetSample
NULL pointer dereference in AP4_AtomSampleTable::GetSample (Ap4AtomSampleTable.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/183/comments
1
2017-09-08T13:25:38Z
2017-09-09T23:17:49Z
https://github.com/axiomatic-systems/Bento4/issues/183
256,253,245
183
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # mp42aac $FILE out.aac ASAN:DEADLYSIGNAL ================================================================= ==23307==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x0000005c9865 bp 0x7fffd01b90d0 sp 0x7fffd01b9020 T0) ==23307==The signal is caused by a WRITE memory access. ==23307==Hint: address points to the zero page. #0 0x5c9864 in AP4_Atom::SetType(unsigned int) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.h:247:52 #1 0x5c9864 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:499 #2 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #3 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #4 0x575855 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:115:9 #5 0x57d624 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:742:5 #6 0x57d624 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4SampleEntry.cpp:994 #7 0x5cbf58 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:305:24 #8 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #9 0x586a2c in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:100:13 #10 0x58566f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4StsdAtom.cpp:56:16 #11 0x5ca71c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:422:20 #12 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #13 0x60c29f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #14 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #15 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #16 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #17 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #18 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #19 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #20 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #21 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #22 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #23 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #24 0x60b1d2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #25 0x60b1d2 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:87 #26 0x5ca44c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:751:20 #27 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #28 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #29 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #30 0x58e6ed in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #31 0x5c8e3b in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4TrakAtom.h:58:20 #32 0x5c8e3b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:377 #33 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #34 0x60c561 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:193:12 #35 0x60c099 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4ContainerAtom.cpp:138:5 #36 0x5521b0 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #37 0x5cad1d in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4MoovAtom.h:56:20 #38 0x5cad1d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:357 #39 0x5c7fbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:220:14 #40 0x5c75c0 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4AtomFactory.cpp:150:12 #41 0x54ea2c in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:104:12 #42 0x54f0fa in AP4_File::AP4_File(AP4_ByteStream&, bool) /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4File.cpp:78:5 #43 0x542552 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:242:32 #44 0x7f048a8bf680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #45 0x44f3f8 in _start (/usr/bin/mp42aac+0x44f3f8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /tmp/Bento4-1.5.0-617/Source/C++/Core/Ap4Atom.h:247:52 in AP4_Atom::SetType(unsigned int) ==23307==ABORTING ``` Testcase: https://github.com/asarubbo/poc/blob/master/00336-bento4-NULLptr-AP4_Atom_SetType
NULL pointer dereference in AP4_Atom::SetType (Ap4Atom.h)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/182/comments
1
2017-09-08T13:23:17Z
2017-09-09T23:17:18Z
https://github.com/axiomatic-systems/Bento4/issues/182
256,252,594
182
[ "axiomatic-systems", "Bento4" ]
Exploitable Write Access Violation: Ap4StscAtom.cpp:95 m_Entries[i].m_SamplesPerChunk = samples_per_chunk; Ap4StssAtom.cpp:87 m_Entries[i] = AP4_BytesToUInt32BE(&buffer[i*4]); Ap4AtomSampleTable.cpp:143 result = m_SttsAtom->GetDts(index, dts, &duration); Ap4StscAtom.h:49 AP4_Array<AP4_StscTableEntry>::SetItemCount m_SampleDescriptionIndex(0) {} AP4_AtomFactory::CreateAtomFromStream (this=0xbfffdec4, stream=..., type=1635148613, size_32=28, size_64=28, atom=@0xbfffd40c: 0x0) at Source/C++/Core/Ap4AtomFactory.cpp:499 atom->SetType(AP4_ATOM_TYPE_AVCE); Non Exploitable Memory Violation: Ap4StszAtom.cpp:84 for (unsigned int i=0; i<sample_count; i++) { The Proof of Concept file and the GDB backtrace, including the binary executable command has been provided. [bento4_vulns.zip](https://github.com/axiomatic-systems/Bento4/files/1287564/bento4_vulns.zip)
Multiple Exploitable and Non-Exploitable issues Identified
https://api.github.com/repos/axiomatic-systems/Bento4/issues/181/comments
3
2017-09-08T10:29:00Z
2017-09-12T04:47:16Z
https://github.com/axiomatic-systems/Bento4/issues/181
256,210,318
181
[ "axiomatic-systems", "Bento4" ]
On 1.5.0-617: ``` # aac2mp4 $FILE /tmp/out.mp4 AAC frame [000000]: size = -7, 96000 kHz, 0 ch ================================================================= ==8420==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625000002100 at pc 0x0000004eed45 bp 0x7ffdd3db9900 sp 0x7ffdd3db90b0 READ of size 4294963374 at 0x625000002100 thread T0 #0 0x4eed44 in __asan_memcpy /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_interceptors.cc:453 #1 0x54734d in AP4_BitStream::ReadBytes(unsigned char*, unsigned int) /tmp/Bento4-1.5.0-617/Source/C++/Codecs/Ap4BitStream.cpp:202:13 #2 0x543498 in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Aac2Mp4/Aac2Mp4.cpp:142:29 #3 0x7f7742500680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 #4 0x44fc28 in _start (/usr/bin/aac2mp4+0x44fc28) 0x625000002100 is located 0 bytes to the right of 8192-byte region [0x625000000100,0x625000002100) allocated by thread T0 here: #0 0x53e7e0 in operator new[](unsigned long) /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_new_delete.cc:84 #1 0x546445 in AP4_BitStream::AP4_BitStream() /tmp/Bento4-1.5.0-617/Source/C++/Codecs/Ap4BitStream.cpp:45:16 #2 0x5449fb in AP4_AdtsParser::AP4_AdtsParser() /tmp/Bento4-1.5.0-617/Source/C++/Codecs/Ap4AdtsParser.cpp:124:17 #3 0x542d8b in main /tmp/Bento4-1.5.0-617/Source/C++/Apps/Aac2Mp4/Aac2Mp4.cpp:100:20 #4 0x7f7742500680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289 SUMMARY: AddressSanitizer: heap-buffer-overflow /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/work/compiler-rt-4.0.1.src/lib/asan/asan_interceptors.cc:453 in __asan_memcpy Shadow bytes around the buggy address: 0x0c4a7fff83d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a7fff83e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a7fff83f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a7fff8400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a7fff8410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c4a7fff8420:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a7fff8430: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a7fff8440: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a7fff8450: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a7fff8460: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a7fff8470: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==8420==ABORTING Aborted ``` Testcase: https://github.com/asarubbo/poc/blob/master/00335-bento4-heapoverflow-Ap4BitStream_cpp
heap-based buffer overflow in AP4_BitStream::ReadBytes (Ap4BitStream.cpp)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/179/comments
2
2017-09-07T09:42:06Z
2017-09-12T14:13:05Z
https://github.com/axiomatic-systems/Bento4/issues/179
255,877,129
179
[ "axiomatic-systems", "Bento4" ]
Running `mp4-dash.py --force --hls --no-split --profiles=on-demand foo.mp4` on r616 gives the above error (running on OSX 10.12.6). For my purposes, adding `self.track_key_infos = {}` directly to the `__init__` of `MediaSource` in `mp4utils.py` seems to work fine to fix it, but I'm new to the project so I won't claim to have looked at any implications of doing so.
MediaSource instance has no attribute 'track_key_infos'
https://api.github.com/repos/axiomatic-systems/Bento4/issues/178/comments
2
2017-09-06T14:13:25Z
2017-09-07T09:38:27Z
https://github.com/axiomatic-systems/Bento4/issues/178
255,618,908
178
[ "axiomatic-systems", "Bento4" ]
Hi, Thanks for the great work with this project. I am using it with an input that has keyframes every 2.5 seconds. When running mp4fragment using a `--fragment-duration 6000`, the fragment times alternate between 5 and 7.5 seconds. It would seem better to stick to one rather than alternating. ``` ➜ fragtest git:(master) ✗ mp4fragment --fragment-duration 6000 --verbosity 3 30fps.mp4 30fps.fmp4 fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 225 samples constant sample duration: yes fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 225 samples constant sample duration: yes fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 225 samples constant sample duration: yes fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 225 samples constant sample duration: yes fragment: track ID 1 150 samples constant sample duration: yes fragment: track ID 1 2 samples constant sample duration: yes ➜ fragtest git:(master) ✗ ``` Using the same mp4 with mp42hls produces segments with a consistent 7.5 seconds. Regards.
mp4fragment: inconsistent fragment duration
https://api.github.com/repos/axiomatic-systems/Bento4/issues/177/comments
3
2017-09-06T02:39:45Z
2017-09-18T04:31:43Z
https://github.com/axiomatic-systems/Bento4/issues/177
255,463,282
177
[ "axiomatic-systems", "Bento4" ]
I am working on building a POC using bento4 and would like to know how to add 608 or 708 caption track to the h264 or h265 video codec. I can't seem to find any resources online for the process.
Caption Support
https://api.github.com/repos/axiomatic-systems/Bento4/issues/176/comments
1
2017-08-25T13:42:12Z
2017-10-12T16:55:14Z
https://github.com/axiomatic-systems/Bento4/issues/176
252,904,680
176
[ "axiomatic-systems", "Bento4" ]
Is there any place in the SDK where there is an implementation of a TS chunk reader? I see the TS writer that is used for most of the converter code, but wondering if there was anywhere I should look in the SDK if I wanted to pass in/parse a MpegTS file instead of an MP4.
MpegTS Reader?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/175/comments
4
2017-08-22T00:39:34Z
2020-05-06T05:07:42Z
https://github.com/axiomatic-systems/Bento4/issues/175
251,806,678
175
[ "axiomatic-systems", "Bento4" ]
I can't seem to find how to patch live streams with id3 tags for timed metadata. Is this not possible here?
Timed metadata id3
https://api.github.com/repos/axiomatic-systems/Bento4/issues/174/comments
2
2017-08-11T12:21:57Z
2017-08-21T10:43:07Z
https://github.com/axiomatic-systems/Bento4/issues/174
249,619,324
174
[ "axiomatic-systems", "Bento4" ]
Was wondering if there is currently any way to do "content conditioning" for HLS and/or DASH for Dynamic Ad Insertion with any of the Bento4 tools or any interest in adding support for this. In this regard, what I am looking for is the ability to pass in a list of ad break times, and have the segments/fragments split apart at the closest keyframes to the times listed. Some documentation on content preconditioning for Google DAI, https://support.google.com/dfp_premium/answer/7295798#ensure-your-content-is-conditioned As well as splitting the segments, Google expects #EXT-X-PLACEMENT-OPPORTUNITY tags to be inserted in the manifests.
Content Conditioning for Dynamic Ad Insertion
https://api.github.com/repos/axiomatic-systems/Bento4/issues/173/comments
3
2017-08-10T00:55:09Z
2019-09-23T00:36:58Z
https://github.com/axiomatic-systems/Bento4/issues/173
249,202,944
173
[ "axiomatic-systems", "Bento4" ]
We are trying to get encrypted fmp4 with HLS work with Bento4. I uncovered a bug while doing this. However I was able to get some outputs but not able to correctly play them on safari. I am using pre-built bento : http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-1-5-0-615.universal-apple-macosx.zip Source Media: http://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_5mb.mp4 Fragment: ``` $ mp4fragment --fragment-duration 10000 --debug --force-i-frame-sync all --index SampleVideo_720x480_5mb.mp4 fragmented.mp4 Using track ID 1 as anchor ==== Track ID 1 - dts=0, target=128000, start=0, end=210/774 ---- Track ID 2 - dts=0, target=403200, start=0, end=394/1453 ==== Track ID 1 - dts=107520, target=256000, start=210, end=543/774 ---- Track ID 2 - dts=403456, target=1042560, start=394, end=1018/1453 ==== Track ID 1 - dts=278016, target=384000, start=543, end=774/774 [Track ID 1 has reached the end] ---- Track ID 2 - dts=1042432, target=1486080, start=1018, end=1451/1453 +++ New anchor: Track ID 2 ==== Track ID 2 - dts=1485824, target=1920000, start=1451, end=1453/1453 [Track ID 2 has reached the end] ``` Fragmented successfully but gets error when creating playlist: ``` $ mp4dash --hls --encryption-cenc-scheme cbcs --encryption-key 11111111111111111111111111111111:11111111111111111111111111111111 --profiles=on-demand --no-split fragmented.mp4 Parsing media file 1: fragmented.mp4 Extracting track 2 from fragmented.mp4 Extracting track 1 from fragmented.mp4 Encrypting track IDs [2] in tmp9wFaSe = Extracted[track 2 from fragmented.mp4] Encrypting track IDs [1] in tmpSOq6hf = Extracted[track 1 from fragmented.mp4] Parsing media file 1: tmpPP39ON = Encrypted[tmp9wFaSe = Extracted[track 2 from fragmented.mp4]] Parsing media file 2: tmpT5eLU8 = Encrypted[tmpSOq6hf = Extracted[track 1 from fragmented.mp4]] Processing and Copying media file tmpT5eLU8 = Encrypted[tmpSOq6hf = Extracted[track 1 from fragmented.mp4]] Processing and Copying media file tmpPP39ON = Encrypted[tmp9wFaSe = Extracted[track 2 from fragmented.mp4]] ERROR: 'NoneType' object has no attribute '__getitem__' ``` However, when we try video only, we can successfully create output: ``` $ mp4fragment --fragment-duration 10000 --debug --force-i-frame-sync all --index --track video SampleVideo_720x480_5mb.mp4 fragmented_video_only.mp4 Using track ID 1 as anchor ==== Track ID 1 - dts=0, target=128000, start=0, end=210/774 ==== Track ID 1 - dts=107520, target=256000, start=210, end=543/774 ==== Track ID 1 - dts=278016, target=384000, start=543, end=774/774 ``` ``` $ mp4dash --hls --encryption-cenc-scheme cbcs --encryption-key 11111111111111111111111111111111:11111111111111111111111111111111 --profiles=on-demand --no-split fragmented_video_only.mp4 Parsing media file 1: fragmented_video_only.mp4 Extracting track 1 from fragmented_video_only.mp4 Encrypting track IDs [1] in tmphSj31b = Extracted[track 1 from fragmented_video_only.mp4] Parsing media file 1: tmpcG3JvU = Encrypted[tmphSj31b = Extracted[track 1 from fragmented_video_only.mp4]] Processing and Copying media file tmpcG3JvU = Encrypted[tmphSj31b = Extracted[track 1 from fragmented_video_only.mp4]] ``` Now the created output has `#EXT-X-VERSION:6` I think it should be 7 ( this is minor) `key.bin` is created with `11111111111111111111111111111111` as used in `--encryption-key `, in binary Here is the complete output: [Output.zip](https://github.com/axiomatic-systems/Bento4/files/1212981/Output.zip) And when I play this content, Its not exactly coming out right <img width="662" alt="decoded_video" src="https://user-images.githubusercontent.com/17299167/29145456-12786948-7d12-11e7-8b1b-643ba5562bd3.png"> Anything we are missing in this? Thanks Abhijith
fmp4 encryption with HLS
https://api.github.com/repos/axiomatic-systems/Bento4/issues/172/comments
14
2017-08-09T21:52:59Z
2018-01-02T18:38:04Z
https://github.com/axiomatic-systems/Bento4/issues/172
249,173,183
172
[ "axiomatic-systems", "Bento4" ]
I was wondering what the current state of support was for doing HLS with fMP4 segments, with FairPlay DRM? I can see that mp4-dash.py supports the 'cbcs' mode for CENC but for hls there seems to be only `--hls` and `--hls-key-url`. I can't see any way to set the key format. With mp4-hls.py it seems like there is only support for TS output, and not fMP4. Is there something I am missing or any plans to support this use case?
Support for HLS fMP4 with FairPlay
https://api.github.com/repos/axiomatic-systems/Bento4/issues/171/comments
19
2017-08-09T20:42:27Z
2019-03-23T02:02:33Z
https://github.com/axiomatic-systems/Bento4/issues/171
249,155,298
171
[ "axiomatic-systems", "Bento4" ]
How do we exactly find the encrypted blocks? How do we handle video and audio streams separately?
How do we decrypt the AES-CBC encrypted fMP4 content ?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/170/comments
4
2017-08-07T23:34:02Z
2017-12-17T23:44:18Z
https://github.com/axiomatic-systems/Bento4/issues/170
248,559,967
170
[ "axiomatic-systems", "Bento4" ]
Hi, have got error trying to create smooth stream from individually encrypted tracks - _ERROR: Values instance has no attribute 'track_key_infos'_: `mp4encrypt --global-option 'mpeg-cenc.piff-compatible:true' --method MPEG-CENC --key 1:395a3609b167c1147d32b694a6ac11eb:random --property 1:KID:ce5b460dab334e879ec446a7a18bf175 v.mp4 v.e.mp4` `mp4encrypt --global-option 'mpeg-cenc.piff-compatible:true' --method MPEG-CENC --key 1:395a3609b167c1147d32b694a6ac11eb:random --property 1:KID:ce5b460dab334e879ec446a7a18bf175 a.mp4 a.e.mp4` `mp4dash --verbose --smooth --playready-header='LA_URL:http://test.playready.microsoft.com/service/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1' v.e.mp4 a.e.mp4` ``` Profiles: urn:mpeg:dash:profile:isoff-live:2011 Parsing media file 1: v.e.mp4 Parsing media file 2: a.e.mp4 Audio: {('audio', 'en', u'mp4a'): [File 2#1]} Video: {('video', u'avc1'): [File 1#1]} Subtitles: {} INFO: adjusting segment duration for audio track File 2#1 to 10.0 to match the video audio track: File 2#1 - language=en, max bitrate=137705, avg bitrate=136648, req bandwidth=136002, codec=mp4a.40.2 video track: File 1#1 - language=en, max bitrate=6183481, avg bitrate=5305269, req bandwidth=5810041, codec=avc1.640028 Processing and Copying media file v.e.mp4 Processing and Copying media file a.e.mp4 ERROR: Values instance has no attribute 'track_key_infos' ```
ERROR: Values instance has no attribute 'track_key_infos'
https://api.github.com/repos/axiomatic-systems/Bento4/issues/169/comments
9
2017-08-05T02:12:12Z
2018-02-27T12:16:24Z
https://github.com/axiomatic-systems/Bento4/issues/169
248,151,309
169
[ "axiomatic-systems", "Bento4" ]
When creating an encrypted smooth streaming package with Dolby Digital Plus tracks using mp4-dash.py I get `ERROR: 'dolby_digital_info'`. So is not able to fill the `QualityLevel fields` in the client manifest. This error happens because `track.info['sample_descriptions'][0]` does not contains `['dolby_digital_info']`. I found that is missing a case for `AP4_ATOM_TYPE_EC_3` in `AP4_EncaSampleEntry::ToTargetSampleDescription` at _Ap4proessor.cpp_ which should returns the content of `dec3` box, just like the MP4A case with the `esds` box. So, `desc = prot_desc->GetOriginalSampleDescription()` in `ShowSampleDescription_Text` at `Mp4Info.cpp` there is not `dec3` box. I tried to implement it but I always get` dec3 = NULL` after `AP4_Dec3Atom* dec3 = AP4_DYNAMIC_CAST(AP4_Dec3Atom, GetChild(AP4_ATOM_TYPE_DEC3));`. It should be easy because the box structure when on the clear and encrypted is pretty similar: EC-3 on the clear bytes (9.isma) ``` EC-3 on the clear size ec-3 ec-3 Payload size dec3 payload 0031 65632d33 000000000000000100000000000000000002001000000000bb8000000000 000d 64656333 1200200f00 EC-3 encrypted size enca enca Payload size dec3 payload 0081 656e6361 000000000000000100000000000000000002001000000000bb8000000000 000d 64656333 1200200f00 ``` But, at this moment, I am not able to get a proper solution by myself although I will keep working on this. By other hand, I found that the number of channels is not correctly parsed in DASH and Smooth. I think is for the same issue so it returns always 2 channels by default. Thank you Gilles in advance
Dolby Digital Plus generation broken with Smooth + Encryption
https://api.github.com/repos/axiomatic-systems/Bento4/issues/168/comments
2
2017-08-04T09:14:54Z
2017-08-21T07:19:33Z
https://github.com/axiomatic-systems/Bento4/issues/168
247,948,415
168
[ "axiomatic-systems", "Bento4" ]
Hi, This seems like a great library! Just wanted to know if it would be possible to add [colr](https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-125526) and gama atom support to this library? It is a common task for us to need to add / edit / remove these atoms from quicktimes/mp4s. Thanks!
COLR and GAMA atom support?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/167/comments
4
2017-08-03T16:45:21Z
2018-09-01T12:37:58Z
https://github.com/axiomatic-systems/Bento4/issues/167
247,768,511
167
[ "axiomatic-systems", "Bento4" ]
hi! when we have some mpd file is there any way to obtain the complete full mp4 files? (or maybe the links of them) in another hand, once you have the complete mp4 encrypted file and it plays well from internet streaming, is possible to get the key someway? maybe its stored in some cache or similar?
questions about mpd
https://api.github.com/repos/axiomatic-systems/Bento4/issues/166/comments
1
2017-08-02T05:52:57Z
2017-09-10T00:14:53Z
https://github.com/axiomatic-systems/Bento4/issues/166
247,280,448
166
[ "axiomatic-systems", "Bento4" ]
For easier installation by both users and package distributors (in our case, Homebrew for macOS), could you please provide an `install` target for installation through makefiles (`Build/Targets/any-gnu-gcc `) or cmake? This would be more robust that installing all binaries one by one, if you add new ones or remove any in the future.
No install target in makefiles or cmake
https://api.github.com/repos/axiomatic-systems/Bento4/issues/165/comments
2
2017-07-20T08:49:32Z
2021-08-04T08:24:29Z
https://github.com/axiomatic-systems/Bento4/issues/165
244,288,307
165
[ "axiomatic-systems", "Bento4" ]
Hello, as far as I know currently mp4fragment automatically generates two moof(/mdat) if its given an mp4 with video and audio tracks. I guess this behavior is similar to ffmpeg with -movflags frag_keyframe+**separate_moof** option (https://ffmpeg.org/ffmpeg-formats.html). In my use case I would like to generate single moof with mp4fragment; is there a way to do this, or any plan to support such behavior? Thanks
mp4fragment: generating single moof/mdat for mp4 with video and audio tracks
https://api.github.com/repos/axiomatic-systems/Bento4/issues/164/comments
5
2017-07-20T05:27:02Z
2021-09-13T19:02:47Z
https://github.com/axiomatic-systems/Bento4/issues/164
244,248,983
164
[ "axiomatic-systems", "Bento4" ]
Hello, Is there any known issues with bento packaged hls and Safari on MacOS? We tried different players and different packaging tools, with the same source video, all worked fine but the one we produced with bento failed to play. for example hls.js, and apple native player with Shaka produced hls worked fine. here is the command we've been using; >mp4-hls.py --hls-version=4 --segment-duration={{segment_length}} --debug --force --output-dir="{{output_folder}}" --master-playlist-name={{asset_id}}.m3u8 {{input_file_group}}
Bento packaged hls not playing on macOS Safari
https://api.github.com/repos/axiomatic-systems/Bento4/issues/163/comments
4
2017-07-17T02:17:33Z
2017-12-17T23:45:07Z
https://github.com/axiomatic-systems/Bento4/issues/163
243,284,332
163
[ "axiomatic-systems", "Bento4" ]
Hi, There is a pointer to AP4_MoovAtom declared [here](https://github.com/axiomatic-systems/Bento4/blob/ce01e533ffe4b06668473406ab286a9afc5fbe76/Source/C%2B%2B/Core/Ap4Processor.cpp#L433), the atom object is created [here](https://github.com/axiomatic-systems/Bento4/blob/ce01e533ffe4b06668473406ab286a9afc5fbe76/Source/C%2B%2B/Core/Ap4Processor.cpp#L441) and assigned to that pointer [here](https://github.com/axiomatic-systems/Bento4/blob/ce01e533ffe4b06668473406ab286a9afc5fbe76/Source/C%2B%2B/Core/Ap4Processor.cpp#L447). But then the moov atom is never deleted. I think, "delete moov" is missed after [this line](https://github.com/axiomatic-systems/Bento4/blob/ce01e533ffe4b06668473406ab286a9afc5fbe76/Source/C%2B%2B/Core/Ap4Processor.cpp#L741). Best regards, Michael Chelnokov.
Memory leak (moov atom) in AP4_Processor::Process
https://api.github.com/repos/axiomatic-systems/Bento4/issues/162/comments
2
2017-07-13T08:07:51Z
2017-12-17T00:55:39Z
https://github.com/axiomatic-systems/Bento4/issues/162
242,618,602
162
[ "axiomatic-systems", "Bento4" ]
I am running Bento4 Mp4Dash to convert my fragmented video files into MPEG-DASH streaming videos. However I seem to get this error > ERROR: unsupported input file, more than one "traf" box in fragment but only if I have audio enabled. I have found that if I run -an in FFMPEG (to ignore the audio tracks) my MP4Dash command runs just fine, any ideas as to why this would happen? *Edit* here is my debug output and command ``` osboxes@osboxes tmp]$ /externalHome/bento4/bin/mp4dash test.mp4 -o test --debug Parsing media file 1: test.mp4 Processing MP4 file test.mp4 found 1 segments COMMAND: ['/externalHome/bento4/utils/../bin/mp4info', '--fast', '--format', 'json', 'test.mp4'] COMMAND: ['/externalHome/bento4/utils/../bin/mp4dump', '--verbosity', '1', '--format', 'json', 'test.mp4'] ERROR: unsupported input file, more than one "traf" box in fragment ```
MP4Dash command fails with audio?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/159/comments
2
2017-06-29T17:00:12Z
2017-07-02T12:50:13Z
https://github.com/axiomatic-systems/Bento4/issues/159
239,547,592
159
[ "axiomatic-systems", "Bento4" ]
Hi, We have created ABR Mpeg-Dash stream in four profiles (650Kbps, 1200Kbps, 2400Kbps and 4800Kbps). After packaging the manifest file video adaptation set looks like below and sample manifest file is attached > "AdaptationSet maxHeight="720" maxWidth="1280" mimeType="video/mp4" minHeight="288" minWidth="512" segmentAlignment="true" startWithSAP="1"><SegmentTemplate duration="4004" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="1000"/><Representation bandwidth="531064" codecs="avc1.4D4015" frameRate="24000/1001" height="288" id="video/1" scanType="progressive" width="512"/><Representation bandwidth="1173760" codecs="avc1.4D401F" frameRate="24000/1001" height="576" id="video/2" scanType="progressive" width="1024"/><Representation bandwidth="2594265" codecs="avc1.4D401F" frameRate="24000/1001" height="720" id="video/3" scanType="progressive" width="1280"/><Representation bandwidth="5425530" codecs="avc1.4D401F" frameRate="24000/1001" height="720" id="video/4" scanType="progressive" > width="1280"/></AdaptationSet>" In Manifest file the Representation bandwidth value is higher than what we mention while encoding. The Mediainfo and FFmpeg gives the bitrate value as 4489kb/s after encoding. So, How the bandwidth of the encoded file is calculated and being represented in manifest file for playback ? Due to higher bandwidth value mentioned in manifest file, The client player will get playback problem over internet ? For testing purpose we have created manifest file with single bit-rate representations too which will be played by restricting the bandwidth as high 5000kbps. When it comes to 4800kbps single profile playback test with bandwidth restriction of 5000kbps, the manifest file has representation higher than 5000kbps. Will it cause playback problem ? [Support_Issue_Mpd.txt](https://github.com/axiomatic-systems/Bento4/files/1107711/Support_Issue_Mpd.txt)
How Bandwidth is calculated and written in Manifest file
https://api.github.com/repos/axiomatic-systems/Bento4/issues/158/comments
2
2017-06-28T06:09:09Z
2018-08-16T17:04:23Z
https://github.com/axiomatic-systems/Bento4/issues/158
239,061,819
158
[ "axiomatic-systems", "Bento4" ]
So I was reading in the docs about the -f --force option and I can't seem to get it to work at all. This is the direct quote from the docs > -f, --force Allow output to an existing directory But if you try and actually run that with -o (specifying your output directory) you get ```[Errno 21] Is a directory: 'outputfolder'``` Any idea?
Force option not working?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/157/comments
5
2017-06-23T19:37:12Z
2017-07-28T05:14:23Z
https://github.com/axiomatic-systems/Bento4/issues/157
238,234,804
157
[ "axiomatic-systems", "Bento4" ]
I am using FFMPEG to output a video file in many resolutions (360, 480, 720, 1080, 1440 and 2160) and each with a high medium and low bitrate. If I then try and run mp4dash on them it works perfectly. However if the video has a 4k variant it does not work. I can run my command with any number of files seemingly without issue but whenever I add a 4k option it fails. Any idea why this could be? The same command is getting run on ffmpeg with the only variable being bitrate and resolution.
4k video saying "Video tracks are not aligned"
https://api.github.com/repos/axiomatic-systems/Bento4/issues/156/comments
4
2017-06-23T18:42:22Z
2017-06-29T16:59:27Z
https://github.com/axiomatic-systems/Bento4/issues/156
238,222,896
156
[ "axiomatic-systems", "Bento4" ]
Proposed implementation : fix/mp4-dash.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fix/mp4-dash.py b/fix/mp4-dash.py index 3b39b5d..651cadd 100644 --- a/mp4-dash.py +++ b/mp4-dash.py @@ -715,6 +715,11 @@ def OutputHls(options, set_attributes, audio_sets, video_sets, subtitles_sets, s OutputHlsTrack(options, video_track, media_subdir, media_playlist_name, media_file_name) + if len(subtitles_files): + master_playlist_file.write('# Subtitles\r\n') + for subtitles_file in subtitles_files: + master_playlist_file.write('''#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="{0:s}",DEFAULT=NO,AUTOSELECT=YES,FORCED=YES,LANGUAGE="{0:s}",URI="subtitles/{0:s}/{1:s}"\r\n'''.format(subtitles_file.language,subtitles_file.media_name)) + ############################################# def OutputSmooth(options, audio_tracks, video_tracks): # compute the total duration (we take the duration of the video)
[mp4dash.py] no subtitles in HLS output
https://api.github.com/repos/axiomatic-systems/Bento4/issues/154/comments
0
2017-06-20T21:30:18Z
2017-12-17T23:47:03Z
https://github.com/axiomatic-systems/Bento4/issues/154
237,351,309
154
[ "axiomatic-systems", "Bento4" ]
Hello, With mp4hls, is there a way to specify subdirectory names? For example, when I run something this: ./mp4hls --hls-version 4 -f --output-single-file -o ./67890 ./transcoded/67890_360pf.mp4 ./transcoded/67890_480pf.mp4 ./transcoded/67890_720pf.mp4 ./transcoded/67890_1080pf.mp4 It generates a structure like this: ``` 67890 ├── master.m3u8 ├── media-1/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 ├── media-2/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 ├── media-3/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 └── media-4/ ├── iframes.m3u8 ├── media.ts └── stream.m3u8 ``` ..however, I would like to specify output directories for the input files so I can come up with something like this: ``` 67890 ├── master.m3u8 ├── 360p/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 ├── 480p/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 ├── 720p/ │   ├── iframes.m3u8 │   ├── media.ts │   └── stream.m3u8 └── 1080p/ ├── iframes.m3u8 ├── media.ts └── stream.m3u8 ``` I can't seem to find it and --segment-filename-template and --segment-url-template don't work with mp4hls.
Specify subdirectory names with mp4hls
https://api.github.com/repos/axiomatic-systems/Bento4/issues/153/comments
1
2017-06-19T19:21:48Z
2017-07-28T05:12:17Z
https://github.com/axiomatic-systems/Bento4/issues/153
236,994,853
153
[ "axiomatic-systems", "Bento4" ]
I am trying to create DRM dash content and would like to have PSSH objects both in manifest and init.mp4 files. Playready PSSH box is not found in init files so am doing something wrong with a command line arguments? This is a simplified version just Playready only. Final result should use Playready, Widevine and Marlin pssh. Tried both KEY:VALUE pairs and @FILENAME.xml syntax. "--playready-header=LA_URL:https://pr-gen.test.expressplay.com" "--playready-header=@./playready-object.xml" **mp4-dash.py command** VERSION = "1.8.0" SDK_REVISION = '615' ``` %python% "%bento%\utils\mp4-dash.py" --exec-dir="%bento%\bin" ^ --always-output-lang --use-segment-timeline ^ --output-dir=./output --force --mpd-name=manifest.mpd ^ --encryption-key=43215678123412341234123412341234:12341234123412341234123412341234 ^ "--playready-header=LA_URL:https://pr-gen.test.expressplay.com" ^ .\temp-720p_frg.mp4 ^ .\temp-128k_frg.mp4 ``` **Playready object in manifest.mpd** ``` <mspr:pro>bgIAAAEAAQBkAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AZQBGAFkAaABRAHoAUQBTAE4AQgBJAFMATgBCAEkAMABFAGoAUQBTAE4AQQA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBtAHUAaABqAFQAOQB1AEMAYQBzAHMAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwBwAHIALQBnAGUAbgAuAHQAZQBzAHQALgBlAHgAcAByAGUAcwBzAHAAbABhAHkALgBjAG8AbQA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==</mspr:pro> ``` **Base64 decoded mspr value** ``` <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0"><DATA><PROTECTINFO><KEYLEN>16</KEYLEN><ALGID>AESCTR</ALGID></PROTECTINFO><KID>eFYhQzQSNBISNBI0EjQSNA==</KID><CHECKSUM>muhjT9uCass=</CHECKSUM><LA_URL>https://pr-gen.test.expressplay.com</LA_URL></DATA></WRMHEADER> ``` ps: Ignore laurl value its not the working license request url.
PSSH object not added to init.mp4 segments (playready)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/151/comments
3
2017-06-16T09:35:38Z
2017-07-28T05:15:12Z
https://github.com/axiomatic-systems/Bento4/issues/151
236,431,219
151
[ "axiomatic-systems", "Bento4" ]
Example: mp4dash --verbose --subtitles video.mp4 [+format=webvtt,+language=eng]subs.vtt Subtitle files are simply dropped in mp4-dash.py Proposed fix: Source/Python/utils/mp4-dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Python/utils/mp4-dash.py b/Source/Python/utils/mp4-dash.py index 18df29d..3b39b5d 100755 --- a/Source/Python/utils/mp4-dash.py +++ b/Source/Python/utils/mp4-dash.py @@ -1389,7 +1389,7 @@ def main(): # for on-demand, we need to first extract tracks into individual media files if options.on_demand: (audio_sets, video_sets, subtitles_sets, mp4_files) = SelectTracks(options, media_sources) - media_sources = [] + media_sources = filter(lambda x: x.format == "webvtt", media_sources) #Keep subtitles for track in sum(audio_sets.values()+video_sets.values(), []): print 'Extracting track', track.id, 'from', GetMappedFileName(track.parent.media_source.filename) track_file = tempfile.NamedTemporaryFile(dir = options.output_dir, delete=False)
Subtitles from external webvtt files are ignored for on-demand profile
https://api.github.com/repos/axiomatic-systems/Bento4/issues/150/comments
0
2017-06-16T09:15:54Z
2017-06-16T09:16:19Z
https://github.com/axiomatic-systems/Bento4/issues/150
236,426,342
150
[ "axiomatic-systems", "Bento4" ]
Hi! I'm getting error when i'm trying to decrypt mp4 file with key. ``` mp4decrypt.exe ddp-192.mp4 ddp-192_final.mp4 --key 58b58c58-400b-11e7-a009-842b2b5247fa ``` In the output i'm getting "**ERROR: invalid argument for --key option**" My manifest.mpd file is: ``` <?xml version="1.0" ?><!--com.castlabs.drmtoday.encrypter dashencrypter 2.0.127--><!--isoparser-1.1.21--><MPD mediaPresentationDuration="PT41M56S" minBufferTime="PT2S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:mspr="urn:microsoft:playready"> <ProgramInformation moreInformationURL="www.castLabs.com"/> <Period duration="PT41M56S" id="0" start="PT0S"> <AdaptationSet bitstreamSwitching="true" frameRate="24000/1001" height="480" id="1" maxBandwidth="1705900" mimeType="video/mp4" minBandwidth="745500" par="853:480" sar="1:1" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1" width="853"> <ContentProtection cenc:default_KID="58b58c58-400b-11e7-a009-842b2b5247fa" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/> <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"> <cenc:pssh>AAACunBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAApqaAgAAAQABAJACPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAHkAUgBlAGEAZAB5AEgAZQBhAGQAZQByACIAIAB2AGUAcgBzAGkAbwBuAD0AIgA0AC4AMAAuADAALgAwACIAPgA8AEQAQQBUAEEAPgA8AFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBFAFkATABFAE4APgAxADYAPAAvAEsARQBZAEwARQBOAD4APABBAEwARwBJAEQAPgBBAEUAUwBDAFQAUgA8AC8AQQBMAEcASQBEAD4APAAvAFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBJAEQAPgBXAEkAeQAxAFcAQQB0AEEANQB4AEcAZwBDAFkAUQByAEsAMQBKAEgAKwBnAD0APQA8AC8ASwBJAEQAPgA8AEwAQQBfAFUAUgBMAD4AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAHYAdQBkAHUALgBjAG8AbQA8AC8ATABBAF8AVQBSAEwAPgA8AEwAVQBJAF8AVQBSAEwAPgBoAHQAdABwADoALwAvAHcAdwB3AC4AdgB1AGQAdQAuAGMAbwBtADwALwBMAFUASQBfAFUAUgBMAD4APABDAEgARQBDAEsAUwBVAE0APgB0AGMAdgBrAE4AMwBlAE0AVQBJAE0APQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APAAvAEQAQQBUAEEAPgA8AC8AVwBSAE0ASABFAEEARABFAFIAPgA=</cenc:pssh> <mspr:pro>mgIAAAEAAQCQAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AVwBJAHkAMQBXAEEAdABBADUAeABHAGcAQwBZAFEAcgBLADEASgBIACsAZwA9AD0APAAvAEsASQBEAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAOgAvAC8AdwB3AHcALgB2AHUAZAB1AC4AYwBvAG0APAAvAEwAQQBfAFUAUgBMAD4APABMAFUASQBfAFUAUgBMAD4AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAHYAdQBkAHUALgBjAG8AbQA8AC8ATABVAEkAXwBVAFIATAA+ADwAQwBIAEUAQwBLAFMAVQBNAD4AdABjAHYAawBOADMAZQBNAFUASQBNAD0APAAvAEMASABFAEMASwBTAFUATQA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A</mspr:pro> </ContentProtection> <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cenc:pssh>AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwIARIQWLWMWEALEeegCYQrK1JH+hoMY2FzdGxhYnN2dWR1IhBYtYxYQAsR56AJhCsrUkf6KgJTRDICIiI=</cenc:pssh> </ContentProtection> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/> <Representation bandwidth="756645" codecs="avc1.640029" id="h264-1000.mp4"> <BaseURL>h264-1000.mp4</BaseURL> <SegmentBase indexRange="1598-9201" indexRangeExact="true" timescale="90000"> <Initialization range="0-1597"/> </SegmentBase> </Representation> <Representation bandwidth="1235041" codecs="avc1.640029" id="h264-1500.mp4"> <BaseURL>h264-1500.mp4</BaseURL> <SegmentBase indexRange="1598-9201" indexRangeExact="true" timescale="90000"> <Initialization range="0-1597"/> </SegmentBase> </Representation> <Representation bandwidth="1711795" codecs="avc1.640029" id="h264-2000.mp4"> <BaseURL>h264-2000.mp4</BaseURL> <SegmentBase indexRange="1598-9201" indexRangeExact="true" timescale="90000"> <Initialization range="0-1597"/> </SegmentBase> </Representation> </AdaptationSet> <AdaptationSet bitstreamSwitching="true" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1"> <ContentProtection cenc:default_KID="58b58c58-400b-11e7-a009-842b2b5247fa" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/> <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"> <cenc:pssh>AAACunBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAApqaAgAAAQABAJACPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAH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AQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AVwBJAHkAMQBXAEEAdABBADUAeABHAGcAQwBZAFEAcgBLADEASgBIACsAZwA9AD0APAAvAEsASQBEAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAOgAvAC8AdwB3AHcALgB2AHUAZAB1AC4AYwBvAG0APAAvAEwAQQBfAFUAUgBMAD4APABMAFUASQBfAFUAUgBMAD4AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAHYAdQBkAHUALgBjAG8AbQA8AC8ATABVAEkAXwBVAFIATAA+ADwAQwBIAEUAQwBLAFMAVQBNAD4AdABjAHYAawBOADMAZQBNAFUASQBNAD0APAAvAEMASABFAEMASwBTAFUATQA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A</mspr:pro> </ContentProtection> <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cenc:pssh>AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwIARIQWLWMWEALEeegCYQrK1JH+hoMY2FzdGxhYnN2dWR1IhBYtYxYQAsR56AJhCsrUkf6KgJTRDICIiI=</cenc:pssh> </ContentProtection> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/> <Representation audioSamplingRate="48000" bandwidth="134220" codecs="mp4a.40.2" id="aac-128.mp4"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> <BaseURL>aac-128.mp4</BaseURL> <SegmentBase indexRange="1514-5325" indexRangeExact="true" timescale="48000"> <Initialization range="0-1513"/> </SegmentBase> </Representation> </AdaptationSet> <AdaptationSet bitstreamSwitching="true" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1"> <ContentProtection cenc:default_KID="58b58c58-400b-11e7-a009-842b2b5247fa" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/> <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"> <cenc:pssh>AAACunBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAApqaAgAAAQABAJACPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAHkAUgBlAGEAZAB5AEgAZQBhAGQAZQByACIAIAB2AGUAcgBzAGkAbwBuAD0AIgA0AC4AMAAuADAALgAwACIAPgA8AEQAQQBUAEEAPgA8AFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBFAFkATABFAE4APgAxADYAPAAvAEsARQBZAEwARQBOAD4APABBAEwARwBJAEQAPgBBAEUAUwBDAFQAUgA8AC8AQQBMAEcASQBEAD4APAAvAFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBJAEQAPgBXAEkAeQAxAFcAQQB0AEEANQB4AEcAZwBDAFkAUQByAEsAMQBKAEgAKwBnAD0APQA8AC8ASwBJAEQAPgA8AEwAQQBfAFUAUgBMAD4AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAHYAdQBkAHUALgBjAG8AbQA8AC8ATABBAF8AVQBSAEwAPgA8AEwAVQBJAF8AVQBSAEwAPgBoAHQAdABwADoALwAvAHcAdwB3AC4AdgB1AGQAdQAuAGMAbwBtADwALwBMAFUASQBfAFUAUgBMAD4APABDAEgARQBDAEsAUwBVAE0APgB0AGMAdgBrAE4AMwBlAE0AVQBJAE0APQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APAAvAEQAQQBUAEEAPgA8AC8AVwBSAE0ASABFAEEARABFAFIAPgA=</cenc:pssh> <mspr:pro>mgIAAAEAAQCQAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AVwBJAHkAMQBXAEEAdABBADUAeABHAGcAQwBZAFEAcgBLADEASgBIACsAZwA9AD0APAAvAEsASQBEAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAOgAvAC8AdwB3AHcALgB2AHUAZAB1AC4AYwBvAG0APAAvAEwAQQBfAFUAUgBMAD4APABMAFUASQBfAFUAUgBMAD4AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAHYAdQBkAHUALgBjAG8AbQA8AC8ATABVAEkAXwBVAFIATAA+ADwAQwBIAEUAQwBLAFMAVQBNAD4AdABjAHYAawBOADMAZQBNAFUASQBNAD0APAAvAEMASABFAEMASwBTAFUATQA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A</mspr:pro> </ContentProtection> <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cenc:pssh>AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwIARIQWLWMWEALEeegCYQrK1JH+hoMY2FzdGxhYnN2dWR1IhBYtYxYQAsR56AJhCsrUkf6KgJTRDICIiI=</cenc:pssh> </ContentProtection> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/> <Representation audioSamplingRate="48000" bandwidth="196211" codecs="ec-3" id="ddp-192.mp4"> <AudioChannelConfiguration schemeIdUri="urn:dolby:dash:audio_channel_configuration:2011" value="F801"/> <BaseURL>ddp-192.mp4</BaseURL> <SegmentBase indexRange="1488-5299" indexRangeExact="true" timescale="48000"> <Initialization range="0-1487"/> </SegmentBase> </Representation> </AdaptationSet> </Period> </MPD> ``` Here is also info from mp4info ``` File: major brand: iso6 minor version: 1 compatible brand: mp42 compatible brand: dash compatible brand: msdh compatible brand: msix compatible brand: iso6 compatible brand: avc1 compatible brand: isom fast start: yes Movie: duration: 0 ms time scale: 48000 fragments: yes Found 1 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Audio duration: 0 ms language: und media: sample count: 0 timescale: 48000 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 192.000 Kbps sample count with fragments: 78620 duration with fragments: 120760320 duration with fragments: 2515840 (ms) Sample Description 0 [ENCRYPTED] Coding: enca Scheme Type: cenc Scheme Version: 65536 Scheme URI: Protection System Details: [schi] size=8+32 [tenc] size=12+20 default_isProtected = 1 default_Per_Sample_IV_Size = 8 default_KID = [58 b5 8c 58 40 0b 11 e7 a0 09 84 2b 2b 52 47 fa] Bytes: 000000000000000100000000000000000002001000000000bb8000000000000d646563330600200f000000005073696e660000000c66726d6165632d33000000147363686d0000000063656e630001000000000028736368690000002074656e63000000000000010858b58c58400b11e7a009842b2b5247fa Coding: ec-3 (Dolby Digital Plus (Enhanced AC-3)) Sample Rate: 48000 Sample Size: 16 Channels: 2 ```
Can't decrypt mp4 in offline
https://api.github.com/repos/axiomatic-systems/Bento4/issues/149/comments
1
2017-06-14T01:54:20Z
2017-07-28T05:14:38Z
https://github.com/axiomatic-systems/Bento4/issues/149
235,740,522
149
[ "axiomatic-systems", "Bento4" ]
Hi, Kudos for this wonderful product Is there any documentation on how to create dual DASH/HLS output? I couldn't find this on the site or this repository
documentation on how to create dual DASH/HLS output
https://api.github.com/repos/axiomatic-systems/Bento4/issues/148/comments
5
2017-06-06T11:36:39Z
2017-09-05T07:32:30Z
https://github.com/axiomatic-systems/Bento4/issues/148
233,863,005
148
[ "axiomatic-systems", "Bento4" ]
I didn't see a way to provide KEY/IV pair for Widevine for AES-CBC. Is it possible?
Can I do MPEG DASH Widevine with AES-CBC?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/147/comments
1
2017-06-02T18:01:31Z
2017-12-17T23:46:31Z
https://github.com/axiomatic-systems/Bento4/issues/147
233,256,779
147
[ "axiomatic-systems", "Bento4" ]
We've been having an issue where the HLS master manifest generated by `mp4-dash` (not `mp4-hls`) is empty, example: ``` #EXTM3U # Created with Bento4 mp4-dash.py, VERSION=1.7.0-614 # #EXT-X-VERSION:6 # Media Playlists # Audio # Video ``` ``` #EXTM3U # Created with Bento4 mp4-dash.py, VERSION=1.8.0-614 # #EXT-X-VERSION:6 # Media Playlists # Audio # Video ``` The DASH manifest works correctly. This manifest was generated via the command: ```bash mp4-dash --verbose --debug -o mp4-dash-output --mpd-name=master.mpd --profiles=on-demand --rename-media --media-prefix 51777258 --no-split --hls --hls-master-playlist-name=master.m3u8 *.f.mp4 ``` Here are the full samples attached: - [sample.zip](https://github.com/axiomatic-systems/Bento4/files/1020513/sample.zip) (7fffc8a) - [sample2.zip](https://github.com/axiomatic-systems/Bento4/files/1020531/sample2.zip) (9a27e41) Any ideas?
Empty master HLS manifest
https://api.github.com/repos/axiomatic-systems/Bento4/issues/145/comments
3
2017-05-22T23:49:53Z
2017-05-27T18:32:09Z
https://github.com/axiomatic-systems/Bento4/issues/145
230,549,590
145
[ "axiomatic-systems", "Bento4" ]
I'm chasing the elusive goal on a single fMP4 file per rendition -- to be delivered either as progressive download, to HLS or to DASH. Currently, this can be achieved for progressive and dash using `mp4dash --no-split --hls ...`, but the generated HLS manifest relies on mp4 files split for every track: ```$ mp4fragment video.mp4 video.fmp4 $ mp4dash --no-split --profiles=on-demand --hls video.fmp4 Parsing media file 1: video.fmp4 Extracting track 2 from video.fmp4 Extracting track 1 from video.fmp4 Parsing media file 1: tmp5j3pQA = Extracted[track 2 from video.fmp4] Parsing media file 2: tmpbwwPqS = Extracted[track 1 from video.fmp4] Processing and Copying media file tmp5j3pQA = Extracted[track 2 from video.fmp4] Processing and Copying media file tmpbwwPqS = Extracted[track 1 from video.fmp4] $ ls -al output/ 4096 May 23 00:38 . 4096 May 23 00:38 .. 415 May 23 00:38 master.m3u8 415 May 23 00:38 media-audio-en-mp4a.m3u8 274149 May 23 00:38 media-audio-en-mp4a.mp4 408 May 23 00:38 media-video-avc1.m3u8 1578452 May 23 00:38 media-video-avc1.mp4 1339 May 23 00:38 stream.mpd ``` Is this due to an inherent constraint in how fragmented mp4s work with HLS, or are there any plans to support this for HLS as well?
A single, shared fMP4 file for HLS and DASH manifests
https://api.github.com/repos/axiomatic-systems/Bento4/issues/144/comments
5
2017-05-22T22:43:33Z
2018-04-04T10:20:56Z
https://github.com/axiomatic-systems/Bento4/issues/144
230,539,676
144
[ "axiomatic-systems", "Bento4" ]
Hi I have a video I got from a dash stream. I used the key and mp4decrypt to take off the encryption and it removed. However when I try to play the output in a media player it is scrambled: ![capture](https://cloud.githubusercontent.com/assets/4706460/26258475/bd4701e2-3c92-11e7-9860-46791a5e631d.JPG) Is there any way to fix this so I can watch the video?
Mp4decrypt takes off encryption; videos corrupted
https://api.github.com/repos/axiomatic-systems/Bento4/issues/143/comments
2
2017-05-19T16:58:49Z
2017-05-27T18:50:55Z
https://github.com/axiomatic-systems/Bento4/issues/143
230,032,641
143
[ "axiomatic-systems", "Bento4" ]
Hi, I'm creating MP4 video init segment which contains contains Sample Table Box. According to ISO spec stbl must contain following boxes: stsd, stts, stsc, stsz, stco in order specified. See below, please. "ISO 14496-12 Section 6.2.3 Box Order says 4) It is recommended that the boxes within the Sample Table Box be in the following order: Sample Description, Time to Sample, Sample to Chunk, Sample Size, Chunk Offset." The problem is that AP4_SampleTable::GenerateStblAtom() method generates boxes in different order(stsd, STSZ, stsc, STTS, stco). Can you fix the box order or advice how to create stbl using different method(which generates boxes in right ), please ?
Wrong box order in sample table box
https://api.github.com/repos/axiomatic-systems/Bento4/issues/142/comments
2
2017-05-12T07:07:00Z
2017-05-27T19:55:04Z
https://github.com/axiomatic-systems/Bento4/issues/142
228,205,681
142
[ "axiomatic-systems", "Bento4" ]
There are corner cases that the height and width is not computed correctly from the h264 SPS because the chroma_format_idc is not taken into account. See https://chromium.googlesource.com/external/webrtc/trunk/webrtc/+/master/common_video/h264/sps_parser.cc for more information about the correct handling
SPS's height/width parsing is not completely correct
https://api.github.com/repos/axiomatic-systems/Bento4/issues/141/comments
1
2017-04-21T17:35:45Z
2017-05-27T18:51:55Z
https://github.com/axiomatic-systems/Bento4/issues/141
223,449,100
141
[ "axiomatic-systems", "Bento4" ]
I have this video file: ```Found 4 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Video duration: 1668167 ms language: und media: sample count: 0 timescale: 30000 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 602.164 Kbps display width: 224.000000 display height: 168.000000 Sample Description 0 Coding: avc1 (H.264) Width: 224 Height: 168 Depth: 24 AVC Profile: 77 (Main) AVC Profile Compat: 40 AVC Level: 13 AVC NALU Length Size: 4 AVC SPS: [674d400d95a0e17f97011000003e90000ea608f1c2aa] AVC PPS: [68ee3c80] Codecs String: avc1.4D400D Track 2: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 2 type: Audio duration: 1667963 ms language: und media: sample count: 0 timescale: 48000 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 128.001 Kbps Sample Description 0 Coding: mp4a (MPEG-4 Audio) Stream Type: Audio Object Type: MPEG-4 Audio Max Bitrate: 128000 Avg Bitrate: 128000 Buffer Size: 0 Codecs String: mp4a.40.2 MPEG-4 Audio Object Type: 2 (AAC Low Complexity) MPEG-4 Audio Decoder Config: Sampling Frequency: 48000 Channels: 2 Sample Rate: 48000 Sample Size: 16 Channels: 2 Track 3: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 3 type: Audio duration: 1668096 ms language: und media: sample count: 0 timescale: 44100 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 128.000 Kbps Sample Description 0 Coding: mp4a (MPEG-4 Audio) Stream Type: Audio Object Type: MPEG-4 Audio Max Bitrate: 128000 Avg Bitrate: 128000 Buffer Size: 0 Codecs String: mp4a.40.2 MPEG-4 Audio Object Type: 2 (AAC Low Complexity) MPEG-4 Audio Decoder Config: Sampling Frequency: 44100 Channels: 2 Sample Rate: 44100 Sample Size: 16 Channels: 2 Track 4: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 4 type: Audio duration: 1669171 ms language: und media: sample count: 0 timescale: 48000 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 128.001 Kbps Sample Description 0 Coding: mp4a (MPEG-4 Audio) Stream Type: Audio Object Type: MPEG-4 Audio Max Bitrate: 128001 Avg Bitrate: 128001 Buffer Size: 0 Codecs String: mp4a.40.2 MPEG-4 Audio Object Type: 2 (AAC Low Complexity) MPEG-4 Audio Decoder Config: Sampling Frequency: 48000 Channels: 2 Sample Rate: 48000 Sample Size: 16 Channels: 2 ``` Although, it doesn't output all the other video tracks: ``` > mp4dash.bat --use-segment-list --always-output-lang -o OUT/FINAL OUT/video_00500.mp4 OUT/video_02500.mp4 [+format=webvtt,+language=eng]OUT/eng.vtt [+format=webvtt,+language=rus]OUT/rus.vtt Parsing media file 1: OUT/video_00500.mp4 Parsing media file 2: OUT/video_02500.mp4 Splitting media file (audio) OUT/video_00500.mp4 Splitting media file (video) OUT/video_00500.mp4 Splitting media file (video) OUT/video_02500.mp4 Processing and Copying subtitles file OUT/eng.vtt Processing and Copying subtitles file OUT/rus.vtt ```
Mp4Dash Multi-Audio
https://api.github.com/repos/axiomatic-systems/Bento4/issues/140/comments
0
2017-04-20T02:27:25Z
2017-04-20T02:53:04Z
https://github.com/axiomatic-systems/Bento4/issues/140
222,929,953
140
[ "axiomatic-systems", "Bento4" ]
``` D:\1\bin>mp4hls --encryption-key MHlubUt0UU9RY2VtN1lZQStvTnhTZz09 --output-encryption-key 123.mp4 File "D:\1\bin\..\utils\mp4-hls.py", line 101 print 'Parsing media file', media_file ^ SyntaxError: Missing parentheses in call to 'print' ``` ``` D:\1\bin>mp42avc --key 1:MHlubUt0UU9RY2VtN1lZQStvTnhTZz09 d:\123.mp4 d:\out.mp4 Video Track: duration: 0 ms sample count: 0 ERROR: unable to create decrypter ``` Can You help?
print 'Parsing media file', media_file
https://api.github.com/repos/axiomatic-systems/Bento4/issues/139/comments
1
2017-04-17T12:49:05Z
2017-05-27T18:52:32Z
https://github.com/axiomatic-systems/Bento4/issues/139
222,126,605
139
[ "axiomatic-systems", "Bento4" ]
In Source/C++/Apps/Mp4Info/Mp4Info.cpp by line 1564 the 'input' smart pointer is released. However, it is reused shortly after (lines 1578/1580). (A common practice to avoid this kind of issues is to assign 'NULL' to smart pointers after releasing them)
Smart pointer referenced after release
https://api.github.com/repos/axiomatic-systems/Bento4/issues/138/comments
1
2017-04-13T12:25:16Z
2017-04-16T04:23:15Z
https://github.com/axiomatic-systems/Bento4/issues/138
221,547,961
138
[ "axiomatic-systems", "Bento4" ]
The visual studio project file (vcproj) does not include the file 'Ap4DvccAtom.cpp' in library file. it seems manually export
VS2012 project file
https://api.github.com/repos/axiomatic-systems/Bento4/issues/137/comments
0
2017-04-06T18:35:42Z
2017-05-27T18:52:58Z
https://github.com/axiomatic-systems/Bento4/issues/137
219,992,405
137
[ "axiomatic-systems", "Bento4" ]
Header files should be updated: ``` RPMLINT report: =============== bento4-devel.x86_64: W: no-dependency-on bento4*/bento4-libs/libbento4* bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4DescriptorFactory.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4KeyWrap.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SdpAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Processor.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IsfmAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4BlocAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TkhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Constants.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IsmaCryp.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TrunAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StszAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StreamCipher.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SencAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MehdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IkmsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4ContainerAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4UrlAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4EsDescriptor.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TrexAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SthdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4RtpHint.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StscAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4GrpiAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4DrefAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SchmAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Types.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Piff.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4String.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4VmhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4OddaAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4AtomFactory.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IproAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SttsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SyntheticSampleTable.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4OdheAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IsltAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4EsdsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4DvccAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4RtpAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StssAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MdhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FileCopier.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TfraAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Descriptor.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Array.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StsdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SbgpAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SmhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4ByteStream.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4DataBuffer.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Hmac.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4AvccAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4List.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Results.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FtypAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4UuidAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FileWriter.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SLConfigDescriptor.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Ipmp.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TrakAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TrefTypeAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4HintTrackReader.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SgpdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MovieFragment.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SaioAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4OhdrAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MfhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SampleTable.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SaizAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4HdlrAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Command.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Expandable.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MfroAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4NmhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4PdinAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SampleEntry.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FragmentSampleTable.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Stz2Atom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap48bdlAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Sample.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4LinearReader.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Movie.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TimsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MoovAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4File.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FrmaAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Debug.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4AtomSampleTable.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TfdtAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Interfaces.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Co64Atom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SampleDescription.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4OdafAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4ObjectDescriptor.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MvhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Track.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4HvccAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4CommandFactory.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Atom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SidxAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TencAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4MetaData.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4HmhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4TfhdAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SampleSource.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4StcoAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Mpeg2Ts.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4CttsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4AinfAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4SegmentBuilder.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4FileByteStream.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Dec3Atom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4OmaDcf.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4IodsAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4Utils.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4ElstAtom.h bento4-devel.x86_64: W: incorrect-fsf-address /usr/include/ap4/Ap4PsshAtom.h The Free Software Foundation address in this file seems to be outdated or misspelled. Ask upstream to update the address, or if this is a license file, possibly the entire file with a new copy available from the FSF. ```
Minor rpmlint complaint
https://api.github.com/repos/axiomatic-systems/Bento4/issues/136/comments
1
2017-04-04T17:04:59Z
2017-05-27T18:53:30Z
https://github.com/axiomatic-systems/Bento4/issues/136
219,318,813
136
[ "axiomatic-systems", "Bento4" ]
Bonjour! I've been trying to dive a bit into the protocol to see how it works, by decrypting stuff. I have noticed that the KID is base64'ed, and when decoded and hex'd, it's only 32-bit long. Here is the `ContentHeader` of the PlayReady header ```xml <ContentHeader> <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0"> <DATA> <PROTECTINFO> <KEYLEN>16</KEYLEN> <ALGID>AESCTR</ALGID> </PROTECTINFO> <KID>Cofu3FaCfjuAJNqKod80iw==</KID> <LA_URL>-snip-</LA_URL> <LUI_URL>-snip-</LUI_URL> <CHECKSUM>2u+jpp0wDIk=</CHECKSUM> </DATA> </WRMHEADER> </ContentHeader> ``` When I then query the server to get a license, it's also base64'ed, but this time, it's too long: ```xml <Response xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages"> <LicenseResponse xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData"> <Version>1</Version> <Licenses> <License>WE1SAAAAAAPilZCea+iiSJcxSckKlApVAAMAAQAAAVIAAgAEAAAACAADAAIAAAA0AAAAEwAAAAxY4wihAAEAMgAAAAwAAAAgAAEANAAAAAoH0AAAADMAAAAKAAEAAwAJAAAA8gABAAoAAACeCofu3FaCfjuAJNqKod80iwABAAMAgGMvE6IonFm3mAsyfarTiq4eXv12vyVadt2/NNLru64CmYG1Tqp99qh4yFz5DWo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8+mVPWT8TSmXsZXFd/e/4vp8XUekHO3g/HqsSEtm9fWc4creL9P1TlAAACAM0d13P6iIdFkoybUizDzLm5QfInUr+PNNpZTi9EoyFFde1HWSvvOyYxDOF8tSuCj4leP4Mn83XJm8MLDEZ8RiZDRVJUAAAAAQAAAbAAAAEgAAEAAQAAAFiaCgs2MrtFMaNrM41ZkfRvAAAAAAAAAAAAAAAE9ohU9a1KaJyI9bUwqwaVxBOo7R4xS+gG8Hv0ESdBtnz/////AAAAAAAAAAAAAAAAAAAAAAABAAUAAAAMAAAAAAABAAYAAABgAAAAAQABAgAAAAAAzR3Xc/qIh0WSjJtSLMPMublB8idSv4802llOL0SjIUV17UdZK+87JjEM4Xy1K4KPiV4/gyfzdcmbwwsMRnxGJgAAAAIAAAABAAAADwAAAAcAAABMAAAAAAAAAApNaWNyb3NvZnQAAAAAAAAdUGxheVJlYWR5IFNMMCBTZXJ2ZXIgUm9vdCBDQQAAAAAAAAAIMS4wLjAuMQAAAQAIAAAAkAABAEA6OPlVasx9gd4f7dnZoS2EoWubrKGikufmx2HD30bycFu5p31Yw69YLVkeSVF2GEO1/TtRL9juw0D2wEtCl9/zAAACAIZNYc/yJW5CLFaLPCgAHPs+FSdlhYS6BSG3mxgo2TbeHYJqj8Pm5/p6kNXKKUbx9kou+59dz/5+Q060QpP6xas=</SigningCertificateChain> </LicenseResponse> ``` Is there a way to make it work, or does Bento not support such functionality? (Decrypting the content) Thanks!
PlayReady KID
https://api.github.com/repos/axiomatic-systems/Bento4/issues/135/comments
5
2017-04-04T03:07:51Z
2017-04-20T02:22:42Z
https://github.com/axiomatic-systems/Bento4/issues/135
219,128,652
135
[ "axiomatic-systems", "Bento4" ]
Using: ``` ffmpeg - version 3.2.2 mp4fragment - version 1.6.0 (Bento4 Version 1.5.0.0) mp4-dash - version 1.7.0 r614 dash.js - version 2.4.1 chromium - version 57.0.2987.133 ``` I'm using the following commands: ```bash ffmpeg -i lego.mp4 -f mp4 -ar 44100 -ab 96k -pix_fmt yuv420p -filter:a aformat=s16:44100:stereo -vcodec libx264 -crf 25 -g 250 -r 25 -coder 1 -flags +loop -filter:v scale=min(640\,iw):trunc(ow/a/2)*2 -strict -2 lego-transcoded.mp4 mp4fragment lego-transcoded.mp4 lego-fragmented.mp4 mp4-dash --force --profiles=on-demand --output-dir=output --encryption-key=aa9555190e5e41cfa08b8b688fb6e5ea:D241E2386B5A91E567389AC2E29A6D09 lego-fragmented.mp4 ``` The first one to transcode the video in a web-friendly way (in this case it is not needed but we have to work with any kind of video). The second and third should be self-explanatory. Result MPD is of the form: ```xml <?xml version="1.0"?> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" mediaPresentationDuration="PT5.600S" minBufferTime="PT5.60S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static"> <!-- Created with Bento4 mp4-dash.py, VERSION=1.7.0-614 --> <Period> <!-- Video --> <AdaptationSet maxHeight="320" maxWidth="560" mimeType="video/mp4" minHeight="320" minWidth="560" segmentAlignment="true" startWithSAP="1"> <!-- MPEG Common Encryption --> <ContentProtection cenc:default_KID="aa955519-0e5e-41cf-a08b-8b688fb6e5ea" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" /> <Representation bandwidth="159215" codecs="avc1.640015" frameRate="25" height="320" id="video-avc1" scanType="progressive" width="560"> <BaseURL>/api/objects/lego-drmVideoStream.mp4</BaseURL> <SegmentBase indexRange="811-854"> <Initialization range="0-810" /> </SegmentBase> </Representation> </AdaptationSet> <!-- Audio --> <AdaptationSet lang="en" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1"> <!-- MPEG Common Encryption --> <ContentProtection cenc:default_KID="aa955519-0e5e-41cf-a08b-8b688fb6e5ea" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" /> <Representation audioSamplingRate="44100" bandwidth="108106" codecs="mp4a.40.2" id="audio-en-mp4a"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" /> <BaseURL>/api/objects/lego-drmAudioStream.mp4</BaseURL> <SegmentBase indexRange="751-818"> <Initialization range="0-750" /> </SegmentBase> </Representation> </AdaptationSet> </Period> </MPD> ``` But then when I try playing this in `dash.js`, only a black screen is shown and the video doesn't play. Logs from `dash.js`: ``` [10] [dash.js 2.4.1] MediaPlayer has been initialized [13] EME detected on this user agent! (ProtectionModel_21Jan2015) [20] Playback Initialized [534] Parsing complete: ( xml2json: 5.55ms, objectiron: 2.19ms, total: 0.00774s) [547] MediaSource attached to element. Waiting on open... [548] Manifest has been refreshed at Sun Apr 02 2017 09:51:30 GMT+0300 (EEST)[1491115890.189] [989] MediaSource is open! [990] Duration successfully set to: 5.6 [991] Added 0 inline events [992] video codec: video/mp4;codecs="avc1.640015" [1005] Schedule controller stopping for video [1009] Perform SIDX load: http://192.168.88.111:4200/api/objects/lego-drmVideoStream.mp4 [1009] audio codec: audio/mp4;codecs="mp4a.40.2" [1015] Schedule controller stopping for audio [1016] Perform SIDX load: http://192.168.88.111:4200/api/objects/lego-drmAudioStream.mp4 [1017] No text data. [1018] No fragmentedText data. [1018] No embeddedText data. [1018] No muxed data. [1021] Start Event Controller [1189] Parsing segments from SIDX. [1199] Parsing segments from SIDX. [1202] Schedule controller starting for video [1204] Schedule controller starting for audio [1259] Init fragment finished loading saving to audio's init cache [1263] Init fragment finished loading saving to video's init cache [1270] Native video element event: loadedmetadata [1279] Seeking to: 0 [1283] Top qualityaudio index has changed from undefined to 0 [1286] AbrController (audio) stay on 0/0 (buffer: 0) [1287] Getting the request for audio time : 0 [1288] SegmentBase: 0 / 5.6 [1292] Top qualityvideo index has changed from undefined to 0 [1293] AbrController (video) stay on 0/0 (buffer: 0) [1293] Getting the request for video time : 0 [1294] SegmentBase: 0 / 5.6 [1330] Buffered Range for type: audio : 0.001882 - 1.996915 [1333] Got enough buffer to start. [1334] Requesting seek to time: 0.001882 [1346] Seeking to: 0.001882 [1354] ThroughputRule requesting switch to index: 0 type: audio Average throughput 5815 kbps [1355] AbrController (audio) stay on 0/0 (buffer: 1.995) [1356] Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end. 0.001882 was changed to 1.996915 [1356] Getting the request for audio time : 1.996915 [1357] SegmentBase: 0 / 5.6 [1358] Getting the next request at index: 1 [1359] SegmentBase: 1.9969160997732427 / 5.6 [1364] Got enough buffer to start. [1373] Buffered Range for type: video : 0 - 5.6 [1380] ThroughputRule requesting switch to index: 0 type: video Average throughput 221192 kbps [1380] AbrController (video) stay on 0/0 (buffer: 5.598) [1381] Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end. 0.001882 was changed to 5.6 [1381] Getting the request for video time : 5.6 [1381] SegmentBase: 0 / 5.6 [1381] Getting the next request at index: 1 [1382] Signal complete. [1382] Schedule controller stopping for video [1383] Stream is complete [1423] Buffered Range for type: audio : 0.001882 - 3.993831 [1426] ThroughputRule requesting switch to index: 0 type: audio Average throughput 3439 kbps [1427] AbrController (audio) stay on 0/0 (buffer: 3.992) [1427] Getting the request for audio time : 3.9938321995464854 [1428] Index for audio time 3.9938321995464854 is 1 [1428] SegmentBase: 1.9969160997732427 / 5.6 [1428] Getting the next request at index: 2 [1428] SegmentBase: 3.9938321995464854 / 5.6 [1460] Buffered Range for type: audio : 0.001882 - 5.569886 [1462] ThroughputRule requesting switch to index: 0 type: audio Average throughput 5707 kbps [1463] AbrController (audio) stay on 0/0 (buffer: 5.568) [1463] Getting the request for audio time : 5.569886621315193 [1463] Index for audio time 5.569886621315193 is 2 [1464] SegmentBase: 3.9938321995464854 / 5.6 [1464] Getting the next request at index: 3 [1465] Signal complete. [1465] Schedule controller stopping for audio [1466] Stream is complete [2752] Native video element event: play [6720] Native video element event: pause ``` When using the same file with `MP4Box` it plays fine (so I think the configuration of `dash.js` is correct - however we have some video files for which `MP4Box` generates a broken MPD file and that's why we switched to `Bento4`). The commands we use there: ``` ... extract video and audio streams with ffmpeg from lego-transcoded.mp4 in lego-video-stream.mp4 and lego-audio-stream.mp4 MP4Box -crypt drm.key lego-video-stream.mp4 -out lego-encrypted.mp4 MP4Box -dash 10000 -profile onDemand -out lego.mpd lego-encrypted.mp4 lego-audio-stream.mp4 ``` We use it slightly differently here - we encode only the video stream and include an unencrypted audio stream but otherwise I think it should be the same. And the MPD generated: ```xml <?xml version="1.0"?> <!-- MPD file Generated with GPAC version 0.6.1-revrelease at 2017-04-02T07:10:07.321Z--> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H0M5.601S" maxSegmentDuration="PT0H0M5.600S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264"> <ProgramInformation moreInformationURL="http://gpac.sourceforge.net"> <Title>lego.mpd generated by GPAC</Title> </ProgramInformation> <Period duration="PT0H0M5.601S"> <AdaptationSet segmentAlignment="true" maxWidth="560" maxHeight="320" maxFrameRate="25" par="560:320" lang="und" subsegmentAlignment="true" subsegmentStartsWithSAP="1"> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="70f13f28-611b-4484-9d9b-679b1b68e4e6" /> <Representation id="1" mimeType="video/mp4" codecs="avc1.640015" width="560" height="320" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="157277"> <BaseURL>/api/objects/lego-drmVideoStream.mp4</BaseURL> <SegmentBase indexRangeExact="true" indexRange="1091-1134"> <Initialization range="0-1090" /> </SegmentBase> </Representation> </AdaptationSet> <AdaptationSet segmentAlignment="true" lang="eng" subsegmentAlignment="true" subsegmentStartsWithSAP="1"> <Representation id="2" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="44100" startWithSAP="1" bandwidth="99536"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" /> <BaseURL>/api/objects/lego-audio-stream.mp4</BaseURL> <SegmentBase indexRangeExact="true" indexRange="835-902"> <Initialization range="0-834" /> </SegmentBase> </Representation> </AdaptationSet> </Period> </MPD> ``` I could upload the test video and any other code/configuration/commands that we use if needed. What are we doing wrong? P.S. Forgot to mention - we're using clearkey encryption with `video.js`, `dash.js` and `videojs-contrib-dash` - all are the latest versions. Sample code: ```coffee clearkeys = {} drmKeys.forEach (drmKey) => kid = @_toBase64(drmKey.kid.replace(/-/g, '')) key = @_toBase64(drmKey.k) clearkeys[kid] = key mplayer.src src: '/api/objects/lego-dashDrmContent.mpd' type: 'application/dash+xml' keySystemOptions: [ name: 'org.w3.clearkey', options: { clearkeys } ] ```
Cannot play encoded video in dash.js
https://api.github.com/repos/axiomatic-systems/Bento4/issues/134/comments
4
2017-04-02T07:35:39Z
2017-06-10T18:06:23Z
https://github.com/axiomatic-systems/Bento4/issues/134
218,747,943
134
[ "axiomatic-systems", "Bento4" ]
I create 5 videos using mp4-dash-encode.py. Then I use these 5 videos as the input to mp4-hls.py. This normally works without any issue. However, there seems to be a video for which calling mp4-hls.py with it results in "ERROR: failed to write samples (-23)". Looking at a little C++ source I see -23 means AP4_ERROR_NOT_ENOUGH_SPACE. Do you have any recommendations to resolve this? the same source video can go into a DASH manifest via mp4-dash.py with no problem and normally I don't have this issue with hls manifest generation.
mp4-hls.py: ERROR: failed to write samples (-23)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/133/comments
4
2017-03-29T01:53:04Z
2019-11-09T20:16:15Z
https://github.com/axiomatic-systems/Bento4/issues/133
217,742,085
133
[ "axiomatic-systems", "Bento4" ]
I was trying to create multiple resolutions of an mp4 fragmented video using mp4-dash-decode.py, and it kept giving me this error: `Unknown encoder 'libfaac'` which is the audio codec for ffmpeg. Accoring to [this question](http://stackoverflow.com/questions/19774975/unknown-encoder-libfaac) on stackoverflow, ffmpeg removed the support for libfaac. However, it is still hardcoded in mp4-dash-encode, line 111 as the default audio encoder. For those having the same error, you can change line 111 to: `parser.add_option('--audio-codec', dest='audio_codec', default='aac',`
mp4-dash-encode uses outdated audio codec
https://api.github.com/repos/axiomatic-systems/Bento4/issues/132/comments
2
2017-03-20T10:07:50Z
2017-05-27T18:53:45Z
https://github.com/axiomatic-systems/Bento4/issues/132
215,374,283
132
[ "axiomatic-systems", "Bento4" ]
Hello, I can extract `udta` atom running a command in Linux terminal, e.g. `mp4extract moov/udta 'media/data/Family Pictures/2016/2016-10/20161030/20161030_174720.mp4' 'media/data/Family Pictures/2016/2016-10/20161030/20161030_174720.txt` but when I am trying to do the same using a bash script ``` cd "$sourcedir" for filelist in *.mp4; do mp4extract moov/udta "$sourcedir/$filelist" "$sourcedir/${filelist%.*}.txt" done ``` I get this error: ``` mp4extract version -r mp4extract: unknown options specified, ignoring: /media/data/Family Pictures/2016/2016-10/20161030/20161030_174720.mp4 /media/data/Family Pictures/2016/2016-10/20161030/20161030_174720.txt Open: open(moov/udta) failed (src/mp4file.cpp,398) ``` Am I doing anything wrong? Same code works for ffmpeg and other tools. I am using a static build.
Cannot extract atom using bash script
https://api.github.com/repos/axiomatic-systems/Bento4/issues/131/comments
1
2017-03-06T05:37:38Z
2017-05-27T18:54:30Z
https://github.com/axiomatic-systems/Bento4/issues/131
212,028,473
131
[ "axiomatic-systems", "Bento4" ]
Here are some sample files encrypted by playready: http://playready.azurewebsites.net/Home/AdaptiveTests I tried to use mp4decrypt the following file http://playready.eastus2.cloudapp.azure.com/smoothstreaming/SSWSS720H264PR/SuperSpeedway_720_230.ismv with this content key given on the page 09E367028F33436CA5DD60FFE6671E70 but the resultant output was NOT decrypted properly. Does bento4 support playready encryption/decryption?
Failed to decrypt a PLAYREADY-encrypted smooth streaming fMP4 with the given content key
https://api.github.com/repos/axiomatic-systems/Bento4/issues/130/comments
2
2017-03-05T23:44:54Z
2017-05-27T18:54:52Z
https://github.com/axiomatic-systems/Bento4/issues/130
211,995,461
130
[ "axiomatic-systems", "Bento4" ]
whats i am doing wrong in it ! ![image](https://cloud.githubusercontent.com/assets/6615261/23498617/531a4fce-fedd-11e6-8546-ee68fc79837f.png) and thanks in Advance For any advice !
I am getting error during encode video !
https://api.github.com/repos/axiomatic-systems/Bento4/issues/129/comments
2
2017-03-02T08:15:58Z
2017-05-27T18:55:47Z
https://github.com/axiomatic-systems/Bento4/issues/129
211,319,012
129
[ "axiomatic-systems", "Bento4" ]
When encrypting a long audio file (I had one that was 108300 seconds that did this - some smaller ones were fine), the `#EXT-X-TARGETDURATION` is buggered up, and instead of showing up as 6 (the default value and what I'm using), it shows up as a large negative number. When I looked closer, the final `#EXTINF` header was also using the same large negative number. It smells like an overflow, but it's been a decade since I've been useful in C++ code. :-/
Large audio files with fairplay encryption
https://api.github.com/repos/axiomatic-systems/Bento4/issues/128/comments
1
2017-02-23T23:46:16Z
2017-05-27T18:56:57Z
https://github.com/axiomatic-systems/Bento4/issues/128
209,919,124
128
[ "axiomatic-systems", "Bento4" ]
[EDIT] I believe I've determined the root cause of the issue below. When using the single file option and trying to encrypt with AES the chunk ranges are not always divisible by 16. It appears that `mp4hls` does not add the padding to each chunk of the single file when doing the encryption. The lack of padding causes web players to choke on the audio decode. [ORIGINAL] I'm using `mp4hls` to create encrypted single-output HLS files. When I play these streams using any of the common browser players I get errors decoding the audio which results in the audio drifting significantly from the video. Examples: [here](http://output.jsbin.com/fagituguba]) or [here](http://dailymotion.github.io/hls.js/demo/?src=https%3A%2F%2Fstorage.googleapis.com%2Frush-externalresources%2Fbbb_test.m3u8&enableStreaming=true&autoRecoverError=true&enableWorker=true&dumpfMP4=false&levelCapping=-1&defaultAudioCodec=undefined) bento command `mp4hls --output-single-file --encryption-key="{key}" --encryption-iv-mode=random -encryption-key-uri=XX_KEY_URL_XX -o "{output_dir}" "{mp4_path}"` chrome://media-internals output ``` 00:00:23 568 debug Dropping audio frame which failed decode with timestamp: 23040000 us, duration: 21333 us, packet size: 349 bytes 00:00:33 967 debug Dropping audio frame which failed decode with timestamp: 33450666 us, duration: 21333 us, packet size: 344 bytes 00:00:33 967 error Large timestamp gap detected; may cause AV sync to drift. time:33472000us expected:33407999us delta:64001us ```
`mp4hls` single-file and AES encryption options are incompatible.
https://api.github.com/repos/axiomatic-systems/Bento4/issues/127/comments
6
2017-02-16T01:44:31Z
2022-03-18T13:39:20Z
https://github.com/axiomatic-systems/Bento4/issues/127
207,988,054
127
[ "axiomatic-systems", "Bento4" ]
hi i am using bento4 for generating dash streaming...everything works perfect.But now i need to play subclip of video by providing start time and end time in the url .Please suggest me how can i achieve this.Thanks
How to play virtual subclip of dash streaming
https://api.github.com/repos/axiomatic-systems/Bento4/issues/126/comments
2
2017-01-29T10:50:36Z
2017-05-27T18:57:11Z
https://github.com/axiomatic-systems/Bento4/issues/126
203,863,005
126
[ "axiomatic-systems", "Bento4" ]
AP4_FragmentSampleTable::m_Duration should be initialized with 0
https://api.github.com/repos/axiomatic-systems/Bento4/issues/125/comments
1
2017-01-24T18:16:23Z
2017-02-22T22:53:37Z
https://github.com/axiomatic-systems/Bento4/issues/125
202,897,905
125
[ "axiomatic-systems", "Bento4" ]
Should have flag "EXT-X-SESSION-KEY" present in a master playlist as in: https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-4.3.4.5
Packaging HLS for Fairplay supported offline usage
https://api.github.com/repos/axiomatic-systems/Bento4/issues/124/comments
4
2017-01-17T13:41:34Z
2018-10-26T16:20:38Z
https://github.com/axiomatic-systems/Bento4/issues/124
201,287,204
124
[ "axiomatic-systems", "Bento4" ]
Guys, I'm experiencing a big issue here. Even i'm encryption my videos using mp4dash for widevine and playready. If I use http://www.dash-downloader.com/ I can download normaly and see the videos. Any tip?
mp4dash: even with cryptography, everyone can see the videos using dashdownloader
https://api.github.com/repos/axiomatic-systems/Bento4/issues/123/comments
1
2017-01-16T17:01:30Z
2017-05-27T18:56:03Z
https://github.com/axiomatic-systems/Bento4/issues/123
201,072,839
123
[ "axiomatic-systems", "Bento4" ]
Hi, Just FYI, I found that when you fragment a mp4 with mp4fragment, every frame in video track becomes a random access point instead of only I frames. RAP indicator becomes the same as for an audio track. I found this looking for a way to correct videos encoded with Elemental that had the same behavior (Elemental said it was a bug soon to be corrected). Then, if you expect to seek frame by frame with the video, it fails (at least on videojs, vlc and other desktop video players do not seem to rely on RAP indicator) Note: You can get RAP indicator with command : MP4Box -dts video.mp4 (Maybe there is a bento command to get it too). BR,
mp4fragment : bad random access points
https://api.github.com/repos/axiomatic-systems/Bento4/issues/121/comments
1
2017-01-04T20:45:43Z
2017-05-27T18:56:19Z
https://github.com/axiomatic-systems/Bento4/issues/121
198,806,471
121
[ "axiomatic-systems", "Bento4" ]
In my testing, the mp4hls tool doesn't seem to work consistently with HE-AAC audio files. I'm trying to use it to create FPS content from files encoded with both "Dolby Media Generator 3.6.0" and fdk-aac, but in both cases, the output is not playable. In the case of the "Dolby Media Generator 3.6.0" content, it sounds like one of the tracks is getting dropped when played back on iOS. On Safari, it seems to work adequately. In the case of the fdk-aac content, iOS playback doesn't do anything (but the scrubber moves in the player like it's playing) and on Safari, it plays, but it stutters terribly.
HE-AAC support?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/120/comments
1
2016-12-29T21:03:53Z
2016-12-29T22:26:30Z
https://github.com/axiomatic-systems/Bento4/issues/120
198,068,327
120
[ "axiomatic-systems", "Bento4" ]
Hey folks, I just started looking a Bento4, and in the doc one of the included tools is mp42avc, looks perfect for me to debug some of the segments that I'm building to feed to a MSE, but it isn't included in the current built binaries for win32. Perhaps the doc is wrong and the tool is no longer made, either way the doc or the build is out of sync. thanks.
mp42avc missing from latest built binaries for win32
https://api.github.com/repos/axiomatic-systems/Bento4/issues/117/comments
3
2016-12-16T15:34:35Z
2017-05-27T18:57:45Z
https://github.com/axiomatic-systems/Bento4/issues/117
196,085,621
117
[ "axiomatic-systems", "Bento4" ]
When creating an HLS stream using the same fMP4 files as the DASH version, the subtitles are not added to the master.m3u8 file. The DASH MPD includes the sidecar subtitles and plays them back fine. When using mp4hls the sidecar WebVTT subtitles are added. `mp4dash --output-dir=fmp4 --force --use-segment-template-number-padding --hls [+format=webvtt,+language=eng]pets.vtt pets-224x168-200k-frag.mp4 pets-448x336-400k-frag.mp4 pets-640x480-800k-frag.mp4 pets-720x540-1000k-frag.mp4 [+language=eng]pets-audio-frag.m4a`
mp4dash with --hls option does not add subtitles to master.m3u8
https://api.github.com/repos/axiomatic-systems/Bento4/issues/116/comments
2
2016-12-10T18:24:57Z
2017-05-27T18:58:30Z
https://github.com/axiomatic-systems/Bento4/issues/116
194,784,916
116
[ "axiomatic-systems", "Bento4" ]
When I try to create a MPD with multiple video AdaptationSets, mp4dash.py will generate something like this: [GoogleCast.mpd](https://drive.google.com/file/d/0B2c0s1M2EOS7cXltTWxHbV9IcmM/view?usp=sharing) This is obviously wrong. Here is the command I use: mp4dash -o dashtest --mpd-name=GoogleCast.mpd --use-segment-list -f video_00100.mp4 video_00300.mp4 hevc-video_00100.mp4 hevc-video_00300.mp4 The only difference between [video_00100.mp4, video_00300.mp4] and [hevc-video_00100.mp4, hevc-video_00300.mp4] is their video codec.
mp4dash.py Does't support multiple video AdaptationSets
https://api.github.com/repos/axiomatic-systems/Bento4/issues/115/comments
0
2016-12-09T14:37:28Z
2017-05-27T18:59:06Z
https://github.com/axiomatic-systems/Bento4/issues/115
194,611,231
115
[ "axiomatic-systems", "Bento4" ]
[sample_bento.txt](https://github.com/axiomatic-systems/Bento4/files/636604/sample_bento.txt) i am having 10 mp4 files with different a/v bitrates and resolutions i want to generate 2 mpd files - one - with profile 1,2,3,4,5,6,7 second one - with profiles - 2,3,4,5,6,7,8,9,10 please find the attached sample script file here im doing duplicate parsing,splitting, and copy for 2,3,4,5,6,7 profiles is there any way to create these two mpd files without doing this duplication processing ======================================================= i tried to run the script with --no-media option, but not able to generate the mpd file and getting below message Parsing media file 1: /mnt/APNAS/temp/126/126.qvga1frag.mp4 Parsing media file 2: /mnt/APNAS/temp/126/126.sd1frag.mp4 Parsing media file 3: /mnt/APNAS/temp/126/126.sd2frag.mp4 Parsing media file 4: /mnt/APNAS/temp/126/126.sd3frag.mp4 Parsing media file 5: /mnt/APNAS/temp/126/126.sd4frag.mp4 Parsing media file 6: /mnt/APNAS/temp/126/126.sd5frag.mp4 Parsing media file 7: /mnt/APNAS/temp/126/126.sd6frag.mp4 ERROR: no encryption info found in track File 1#1 just want to know the input parameters for with --no-media option should i pass the fragmented files as a input (subset of profiles) or should we pass the Splitting media files (video/audio) location? thanks in advance
MPD file : generating multiple mpd files from master mpd files
https://api.github.com/repos/axiomatic-systems/Bento4/issues/114/comments
0
2016-12-07T12:53:30Z
2017-05-27T18:59:32Z
https://github.com/axiomatic-systems/Bento4/issues/114
194,042,066
114
[ "axiomatic-systems", "Bento4" ]
I'm using this to create some fairplay content, and I'm seeing that if I call the command from a script in a loop, the open files on my system continue to increase. Looking in mp4-hls.py, I see where the file is opened (line 85) and written to (through line 127), but it's never closed.
mp4-hls.py - master playlist not closed?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/113/comments
1
2016-12-05T16:09:17Z
2016-12-05T16:45:56Z
https://github.com/axiomatic-systems/Bento4/issues/113
193,539,527
113
[ "axiomatic-systems", "Bento4" ]
Hi, We are using Bento4 tools for dash packaging. First we are fragmenting the audio and video files using mp4fragment and then creating the DASH files using mp4 dash. We are using marlin format for DASH and the DASH files are encrypted. We are playing the DASH files using expressplay marlin SDK in mobile. Marlin SDK is not playing some of the files because the audio and video segment duration is not same in the DASH package. Below are the files we are using: https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashAudioStream.mp4 https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashHighQualityVideoStream.mp4 https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashMediumQualityVideoStream.mp4 First we are fragmenting the file using the mp4fragment like below: mp4fragment input output after that we are creating dash package using the following command(We are creating both marlin and widevine complaint DASH package) mp4dash --encryption-key=$9:$10 --marlin --widevine --widevine-header=provider:intertrust#content_id:$9 fragmentedAudio.mp4 fragmentedVideo1.mp4 fragmentedvidoe2.mp4 -o outdir The output is generated and the DASH has different segment duration for audio and video. audio has 2 sec segment duration and video has 6 seconds duration <SegmentTemplate duration="2001" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="1000"/> <SegmentTemplate duration="6000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="1000"/> Some of the DASH players are not playing if the segment duration is not matching. Can you please help in resolving this issue
Regarding MP4 DASH packaging
https://api.github.com/repos/axiomatic-systems/Bento4/issues/112/comments
1
2016-12-03T12:59:45Z
2017-05-27T19:00:08Z
https://github.com/axiomatic-systems/Bento4/issues/112
193,285,607
112
[ "axiomatic-systems", "Bento4" ]
Hi, We are using Bento4 tools for dash packaging. First we are fragmenting the audio and video files using mp4fragment and then creating the DASH files using mp4 dash. We are using marlin format for DASH and the DASH files are encrypted. We are playing the DASH files using expressplay marlin SDK in mobile. Marlin SDK is not playing some of the files because the audio and video segment duration is not same in the DASH package. Below are the files we are using: https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashAudioStream.mp4 https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashHighQualityVideoStream.mp4 https://s3-ap-southeast-1.amazonaws.com/learnyst/schools/1247/drm_courses/9310/orig/42306/smallfiledashMediumQualityVideoStream.mp4 First we are fragmenting the file using the mp4fragment like below: mp4fragment input output after that we are creating dash package using the following command(We are creating both marlin and widevine complaint DASH package) mp4dash --encryption-key=$9:$10 --marlin --widevine --widevine-header=provider:intertrust#content_id:$9 fragmentedAudio.mp4 fragmentedVideo1.mp4 fragmentedvidoe2.mp4 -o outdir
Regarding MP4 DASH packaging
https://api.github.com/repos/axiomatic-systems/Bento4/issues/111/comments
0
2016-12-03T12:56:58Z
2016-12-03T12:57:30Z
https://github.com/axiomatic-systems/Bento4/issues/111
193,285,499
111
[ "axiomatic-systems", "Bento4" ]
Hello, `mp4-dash-encode.py` gets as parameter a filename. If the filename happens to contain " or maybe other special characters, it is not working. For python2 there exists: [pipes.quote](https://docs.python.org/2/library/pipes.html) which takes care of everything. ```diff diff --git a/Source/Python/utils/mp4-dash-encode.py b/Source/Python/utils/mp4-dash-encode.py index a17e86a..a576722 100644 --- a/Source/Python/utils/mp4-dash-encode.py +++ b/Source/Python/utils/mp4-dash-encode.py @@ -4,6 +4,7 @@ from subprocess import check_output, CalledProcessError import os import json import math +from pipes import quote # setup main options VERSION = "1.0.0" @@ -62,7 +63,7 @@ class MediaSource: else: quiet = '' - command = 'ffprobe -of json -loglevel quiet -show_format -show_streams '+quiet+'"'+filename+'"' + command = 'ffprobe -of json -loglevel quiet -show_format -show_streams '+quiet + quote(filename) json_probe = run_command(options, command) self.json_info = json.loads(json_probe, strict=False) @@ -160,7 +161,7 @@ def main(): for i in range(options.bitrates): output_filename = os.path.join(options.output_dir, 'video_%05d.mp4' % int(bitrates[i])) temp_filename = output_filename+'_' - base_cmd = 'ffmpeg -i "%s" -strict experimental -codec:a libfdk_aac -ac 2 -ab %dk -preset slow -map_metadata -1 -codec:v %s' % (args[0], options.audio_bitrate, options.video_codec) + base_cmd = 'ffmpeg -i %s -strict experimental -codec:a libfdk_aac -ac 2 -ab %dk -preset slow -map_metadata -1 -codec:v %s' % (quote(args[0]), options.audio_bitrate, options.video_codec) if options.video_codec == 'libx264': base_cmd += ' -profile:v baseline' if options.text_overlay: ``` PS: thanks a lot for Bento4 - I found it to be the best open source project for this
mp4-dash-encode.py - does not escape input
https://api.github.com/repos/axiomatic-systems/Bento4/issues/108/comments
2
2016-11-24T08:57:51Z
2017-01-02T22:03:20Z
https://github.com/axiomatic-systems/Bento4/issues/108
191,464,407
108
[ "axiomatic-systems", "Bento4" ]
I am trying to use this tool. I see that documentation mentions that all of the options of MP42HLS are also available in Mp4HLS. === https://www.bento4.com/documentation/mp4hls/ This tool uses the mp42hls low level tool internally, so all the options supported by that low level tool are also available. === When Run the command it give me error. $ ./mp4hls --force --master-playlist-name=testinghls.m3u8 --segment-duration 2 test-1.mp4 test-2.mp4 Usage: mp4-hls.py [options] <media-file> [<media-file> ...] mp4-hls.py: error: no such option: --segment-duration Am I missing something?
Mp4HLS Options
https://api.github.com/repos/axiomatic-systems/Bento4/issues/106/comments
4
2016-11-22T03:57:44Z
2018-02-11T00:54:03Z
https://github.com/axiomatic-systems/Bento4/issues/106
190,901,663
106
[ "axiomatic-systems", "Bento4" ]
Bento4 seems to have no way to set or even detect faststart (moov before mdat). Please resolve, thank you.
read faststart
https://api.github.com/repos/axiomatic-systems/Bento4/issues/105/comments
5
2016-11-14T03:04:50Z
2018-02-19T03:39:04Z
https://github.com/axiomatic-systems/Bento4/issues/105
189,019,096
105
[ "axiomatic-systems", "Bento4" ]
I have been using the [TagEditor project][te]: ~~~sh tageditor -s cover= --max-padding 100000 -f ki.mp4 ~~~ However I noticed that Bento4 does not work on files in place: ~~~sh $ mp4tag --remove Cover ki.mp4 ERROR: output file name missing ~~~ Please add in place file support, thank you. [te]://github.com/Martchus/tageditor
mp4tag: in place support
https://api.github.com/repos/axiomatic-systems/Bento4/issues/104/comments
2
2016-11-13T03:35:20Z
2017-07-28T05:15:41Z
https://github.com/axiomatic-systems/Bento4/issues/104
188,949,945
104
[ "axiomatic-systems", "Bento4" ]
It should be possible for mp4dash to define the contentType of an Adaptation Set which is visible in the Manifest file. This could be achieved with a flag for mp4dash to differentiate between video and audio adaptation sets.
ContentType specification in mp4dash
https://api.github.com/repos/axiomatic-systems/Bento4/issues/103/comments
2
2016-11-12T17:36:27Z
2016-11-15T07:46:32Z
https://github.com/axiomatic-systems/Bento4/issues/103
188,923,857
103
[ "axiomatic-systems", "Bento4" ]
Hi, Currently mp4-dash packager accepts either explicit encryption attributes (drm type, key, keyid..etc) Or the 'key-system specific' PSSH data (e.g PlayReady PRO, Widevine protobuf) as input arguments when adding DRM to a stream. However, the CPIXF key management spec states that compliant systems should output the FULL PSSH box and the FULL PSSH mpd tag (both base64 encoded) during key ingest/response. I would be great if the Bento tool could accept the output from a conforming key management system without any extra processing / extraction being necessary by the custom application. Thanks,
Enhancement to support accepting full PSSH boxes and mpd tags as input attributes when applying DRM
https://api.github.com/repos/axiomatic-systems/Bento4/issues/102/comments
1
2016-11-09T11:18:44Z
2017-05-27T19:11:43Z
https://github.com/axiomatic-systems/Bento4/issues/102
188,222,966
102
[ "axiomatic-systems", "Bento4" ]
Hi, I've noticed that <mspr:pro> element in generated mpd file has no checksum for audio adaptation set, but it has a checksum for video adaptation set.
Playready DASH element has no checksum for audio adaptation set
https://api.github.com/repos/axiomatic-systems/Bento4/issues/101/comments
0
2016-11-04T19:56:23Z
2016-11-04T19:56:23Z
https://github.com/axiomatic-systems/Bento4/issues/101
187,424,565
101
[ "axiomatic-systems", "Bento4" ]
I sent a ticket for this also. Is it possible to have a build target for FreeBSD ? I had to install via ports gmake and g++ but then make symlinks to them as it looked like gmake-49 etc. In the release directory sits the shared libraries and the binaries. It seems to run the binaries but possibly met with segfaults. I had to run my command for now within the any-gnu-gcc like ``` gmake AP4_BUILD_CONFIG=Release ``` at the end I get this ``` AP4_MpegAudioSampleDescription* audio_desc = AP4_DYNAMIC_CAST(AP4_MpegAudioSampleDescription, sample_description); ^ ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:924:33: note: shadowed declaration is here AP4_AudioSampleDescription* audio_desc = AP4_DYNAMIC_CAST(AP4_AudioSampleDescription, sample_description); ^ ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp: In function 'AP4_Result WriteSamples(AP4_Mpeg2TsWriter*, PackedAudioWriter*, AP4_Track*, SampleReader*, AP4_Mpeg2TsWriter::SampleStream*, AP4_Track*, SampleReader*, AP4_Mpeg2TsWriter::SampleStream*, unsigned int, AP4_UI08)': ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1173:36: warning: declaration of 'result' shadows a previous local [-Wshadow] AP4_Result result = MakeSampleAesAudioDescriptor(descriptor, audio_track->GetSampleDescription(0), audio_sample_data); ^ ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1030:29: note: shadowed declaration is here AP4_Result result = AP4_SUCCESS; ^ ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1178:36: warning: declaration of 'result' shadows a previous local [-Wshadow] AP4_Result result = MakeSampleAesVideoDescriptor(descriptor); ^ ../../../../Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1030:29: note: shadowed declaration is here AP4_Result result = AP4_SUCCESS; ^ ``` There is also no install target for the makefile. Scons is not usable on FreeeBSD because no build target for freebsd11. That is the platform name.
Build target for FreeBSD 11
https://api.github.com/repos/axiomatic-systems/Bento4/issues/100/comments
5
2016-11-03T05:22:20Z
2019-02-21T17:14:14Z
https://github.com/axiomatic-systems/Bento4/issues/100
186,980,806
100
[ "axiomatic-systems", "Bento4" ]
I used mp4fragment to generate .mp4 files from .ismv and when i try to use mp4dash, it gives me an error ```Parsing media file 1: AsterixAndObelix1080-E_230-fragmented.mp4 Processing MP4 file AsterixAndObelix1080-E_230-fragmented.mp4 found 216292 segments COMMAND: ['/Applications/XAMPP/xamppfiles/htdocs/video/bento/utils/../bin/mp4info', '--fast', '--format', 'json', 'AsterixAndObelix1080-E_230-fragmented.mp4'] Traceback (most recent call last): File "./../utils/mp4-dash.py", line 1655, in <module> main() File "./../utils/mp4-dash.py", line 1424, in main (audio_sets, video_sets, subtitles_sets, mp4_files) = SelectTracks(options, media_sources) File "./../utils/mp4-dash.py", line 878, in SelectTracks mp4_file = Mp4File(Options, media_source) File "/Applications/XAMPP/xamppfiles/htdocs/video/bento/utils/mp4utils.py", line 502, in __init__ self.tracks[track['id']] = Mp4Track(self, track) File "/Applications/XAMPP/xamppfiles/htdocs/video/bento/utils/mp4utils.py", line 410, in __init__ self.sample_rate = sample_desc['sample_rate'] KeyError: 'sample_rate' ``` Any suggestions?
sample_rate Error?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/99/comments
2
2016-11-02T18:58:27Z
2016-11-04T01:12:55Z
https://github.com/axiomatic-systems/Bento4/issues/99
186,890,929
99
[ "axiomatic-systems", "Bento4" ]
HI, Is it possible to convert the Real Time Live HLS streams to PlayReady Encrypted Mpeg-Dash stream by using Bento4 scripts ?
Live HLS to Mpeg Dash
https://api.github.com/repos/axiomatic-systems/Bento4/issues/98/comments
0
2016-10-31T06:29:56Z
2017-05-27T19:10:42Z
https://github.com/axiomatic-systems/Bento4/issues/98
186,214,679
98
[ "axiomatic-systems", "Bento4" ]
While running the following command: mp4Tag --add "foo.baz.bar/encoder:S:123" ${HOME}/Desktop/input.m4a ${HOME}/Desktop/output.m4a I ran into some issues while trying to write the new atom to the output file. I got the following ERROR: ERROR: atom size mismatch (declared size=19, actual size=272) while writing [data] while writing [----] while writing [ilst] while writing [meta] while writing [udta] while writing [moov] Assertion failed: (after-before == atom_size), function Write, file /Users/nguyevt/workplace/Gapless/Bento4/Source/C++/Core/Ap4Atom.cpp, line 249. Am I running the command incorrectly? Or is there a bug when trying to set my own custom atoms?
ERROR while writing atoms to output file
https://api.github.com/repos/axiomatic-systems/Bento4/issues/97/comments
3
2016-10-14T01:26:22Z
2016-10-14T18:49:07Z
https://github.com/axiomatic-systems/Bento4/issues/97
182,942,673
97
[ "axiomatic-systems", "Bento4" ]
I have encoded 3 versions of a video. All with this: -force_key_frames 'expr:eq(mod(n,72),0)' -x264opts rc-lookahead=72 for ffmpeg Thinking this would be perfect for a gop of 3 I then ran mp4fragment --fragment-duration 3 (fails with or withough fragment duration) an all three files and tried to run mp4dash on those What am I doing wrong?
Getting video tracks are not aligned
https://api.github.com/repos/axiomatic-systems/Bento4/issues/95/comments
0
2016-09-18T14:34:44Z
2017-05-27T19:04:43Z
https://github.com/axiomatic-systems/Bento4/issues/95
177,655,241
95
[ "axiomatic-systems", "Bento4" ]
I want to get frame by frame pixel data so that i can use in OpenGL texture (playing mp4 in opengl kinda stuff), is it possible with this library. Any small example will be awesome cool.
How to read frame by frame pixel data of mp4 file?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/93/comments
3
2016-09-06T10:35:00Z
2016-09-13T07:21:05Z
https://github.com/axiomatic-systems/Bento4/issues/93
175,214,268
93
[ "axiomatic-systems", "Bento4" ]
I type `scons -u build_config=Release target=arm-android-linux` It cant find stdio.h by default `Source/C++/Apps/Aac2Mp4/Aac2Mp4.cpp:32:19: fatal error: stdio.h: No such file or directory #include <stdio.h> ^` so I download gcc-arm-none-eabi and change to this CCFLAGS = ['-I'+'/Users/lioliy/mv/11/20150925/arm-none-eabi/include','-I'+'/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3','-I'+'/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3/arm-none-eabi' But a minute later still build failed `arm-linux-androideabi-g++ -o Build/Targets/arm-android-linux/Release/C++/Crypto/Ap4StreamCipher.o -c -fno-exceptions -fno-rtti -Wall -D_REENTRANT -O3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3/arm-none-eabi --sysroot /Users/lioliy/Library/Android/sdk/ndk-bundle/platforms/android-3/arch-arm -msoft-float -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D_REENTRANT -DANDROID -DNPT_CONFIG_HAVE_SYSTEM_LOG_CONFIG -ISource/C++/Core -ISource/C++/Crypto -ISource/C++/MetaData -ISource/C++/Codecs -ISource/Config Source/C++/Crypto/Ap4StreamCipher.cpp arm-linux-androideabi-g++ -o Build/Targets/arm-android-linux/Release/C++/MetaData/Ap4MetaData.o -c -fno-exceptions -fno-rtti -Wall -D_REENTRANT -O3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3/arm-none-eabi --sysroot /Users/lioliy/Library/Android/sdk/ndk-bundle/platforms/android-3/arch-arm -msoft-float -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D_REENTRANT -DANDROID -DNPT_CONFIG_HAVE_SYSTEM_LOG_CONFIG -ISource/C++/Core -ISource/C++/Crypto -ISource/C++/MetaData -ISource/C++/Codecs -ISource/Config Source/C++/MetaData/Ap4MetaData.cpp arm-linux-androideabi-g++ -o Build/Targets/arm-android-linux/Release/C++/System/Android/Ap4AndroidFileByteStream.o -c -fno-exceptions -fno-rtti -Wall -D_REENTRANT -O3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3 -I/Users/lioliy/mv/11/20150925/arm-none-eabi/include/c++/4.9.3/arm-none-eabi --sysroot /Users/lioliy/Library/Android/sdk/ndk-bundle/platforms/android-3/arch-arm -msoft-float -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D_REENTRANT -DANDROID -DNPT_CONFIG_HAVE_SYSTEM_LOG_CONFIG -ISource/C++/Core -ISource/C++/Crypto -ISource/C++/MetaData -ISource/C++/Codecs -ISource/Config Source/C++/System/Android/Ap4AndroidFileByteStream.cpp Source/C++/System/Android/Ap4AndroidFileByteStream.cpp: In member function 'virtual AP4_Result AP4_AndroidFileByteStream::Seek(AP4_Position)': Source/C++/System/Android/Ap4AndroidFileByteStream.cpp:255:5: error: 'off64_t' was not declared in this scope off64_t result = lseek64(m_FD, position, SEEK_SET); ^ Source/C++/System/Android/Ap4AndroidFileByteStream.cpp:256:9: error: 'result' was not declared in this scope if (result >= 0) { ^ Source/C++/System/Android/Ap4AndroidFileByteStream.cpp:262:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ scons: *** [Build/Targets/arm-android-linux/Release/C++/System/Android/Ap4AndroidFileByteStream.o] Error 1 scons: building terminated because of errors.` I tried to build debug version `scons -u target=arm-android-linux` but still this problem How to fix this.Help me please.
android build failed with NDK v12 on mac
https://api.github.com/repos/axiomatic-systems/Bento4/issues/92/comments
2
2016-08-20T16:22:07Z
2016-10-22T11:38:57Z
https://github.com/axiomatic-systems/Bento4/issues/92
172,278,466
92
[ "axiomatic-systems", "Bento4" ]
I am currently seeing an error while trying to generate a manifest for pre-encrypted content (using mp4encrypt). This problem doesn't appear in 1.4.3 and was found while testing an upgrade to 1.5.0 ``` $ mp4encrypt --method MPEG-CENC --key 1:[key]:[iv]--property 1:KID:[keyid] input/test-720p.mp4 encrypted/encrypted-test-720p.mp4 $ mp4encrypt --method MPEG-CENC --key 1:[key]:[iv]--property 1:KID:[keyid] input/test-480p.mp4 encrypted/encrypted-test-480p.mp4 $ mp4dash --output out --widevine --widevine-header=#[winevine pssh] --playready --playready-header=#[playready pssh] --verbose encrypted/encrypted-test-720p.mp4 encrypted/encrypted-test-480p.mp4 Profiles: urn:mpeg:dash:profile:isoff-live:2011 Parsing media file 1: encrypted/encrypted-test-720p.mp4 Parsing media file 2: encrypted/encrypted-test-480p.mp4 Audio: {} Video: {('video', u'avc1'): [File 1#1, File 2#1]} Subtitles: {} video track: File 1#1 - language=en, max bitrate=2908824, avg bitrate=2452476, req bandwidth=1987157, codec=avc1.64001F video track: File 2#1 - language=en, max bitrate=1571682, avg bitrate=1237498, req bandwidth=981488, codec=avc1.64001E Processing and Copying media file encrypted/encrypted-test-720p.mp4 Processing and Copying media file encrypted/encrypted-test-480p.mp4 ERROR: Values instance has no attribute 'track_key_infos' ``` After taking a quick look at the `mp4-dash.py` source, it looks like `track_key_infos` is only generated when `mp4dash` is actually doing the encryption (via the `--encryption-key` argument). I think the fallback logic to use KID from the track(s) is in there it's just bombing on `key_info = options.track_key_infos.get(tracks[0].id)` before it can fallback to the `track.kid`. I am happy to submit an pull request with a fix. I just wanted to get the communities take on best practice. I see two options: 1. Add a try/except to catch an `AttributeError` and in the catch set the `default_kid` to the `kid` on the track. 2. Add a `hasattr` on `track_key_infos` before trying to call `get()` on it. Thanks!
Error while running mp4dash with pre-encrypted content (v1.5.0-613)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/90/comments
1
2016-08-17T00:24:53Z
2017-05-27T19:06:32Z
https://github.com/axiomatic-systems/Bento4/issues/90
171,548,372
90
[ "axiomatic-systems", "Bento4" ]
It would seem the Initialization range described in the mpd becomes one byte too small (say 0-1500 while it actually is 0-1501) in generated DASH OnDemand representations.
mp4-dash - The Initialization range gets too small while creating On-Demand DASH representations
https://api.github.com/repos/axiomatic-systems/Bento4/issues/89/comments
2
2016-08-11T08:26:38Z
2016-08-12T05:56:05Z
https://github.com/axiomatic-systems/Bento4/issues/89
170,593,702
89
[ "axiomatic-systems", "Bento4" ]
Enabling verbose and debug mode in mp4dash prints out average segment bitrate, max segment bitrate and required bandwidth for each video representation. This **required bandwidth** equals bandwidth under each representation in the manifest created by mp4dash. **How is this value calculated?** This should be documented. Thanks in advance.
mp4dash: Definition of required bandwidth
https://api.github.com/repos/axiomatic-systems/Bento4/issues/88/comments
1
2016-08-10T17:10:11Z
2018-07-16T07:57:56Z
https://github.com/axiomatic-systems/Bento4/issues/88
170,469,312
88
[ "axiomatic-systems", "Bento4" ]
With this command when it reaches the end it fails with an error. therefore mp4-hls.py will end and not continue to other files. I'm not sure how else to debug this ? ``` /usr/local/bento4/bin/mp42hls --index-filename out2/media-1/stream.m3u8 --segment-url-template segment-%d.ts --segment-filename-template out2/media-1/segment-%d.ts --verbose out3/video_00500.mp4 ``` A more verbose output ``` I-Frame: 55648@376, t=870.000000 I-Frame: 51324@345168, t=873.000000 Segment 145, duration=6.00, 281 audio samples, 144 video samples, 683380 bytes @0 I-Frame: 47752@376, t=876.000000 I-Frame: 52640@340844, t=879.000000 Segment 146, duration=6.00, 281 audio samples, 144 video samples, 680748 bytes @0 I-Frame: 47564@376, t=882.000000 I-Frame: 10340@237632, t=885.000000 Segment 147, duration=5.96, 286 audio samples, 144 video samples, 315840 bytes @0 Segmentation fault: 11 ```
Segmentation fault: 11 for mp4hls on OSX
https://api.github.com/repos/axiomatic-systems/Bento4/issues/87/comments
11
2016-08-09T16:05:51Z
2016-11-23T10:06:36Z
https://github.com/axiomatic-systems/Bento4/issues/87
170,206,538
87
[ "axiomatic-systems", "Bento4" ]
Hi, When I try to convert mp4 to m3u8 with many .ts files using --segment-duration 4 ( 4 seconds of each ts file ). It ignore the small --segment-duration setting. The file size of .ts are also the same of --segment-duration = 5 or 6. Is there a minimum on --segment-duration option? Thanks
Small segment-duration in mp42hls does not work
https://api.github.com/repos/axiomatic-systems/Bento4/issues/86/comments
7
2016-07-31T07:47:34Z
2021-07-03T20:04:01Z
https://github.com/axiomatic-systems/Bento4/issues/86
168,506,688
86
[ "axiomatic-systems", "Bento4" ]
I'm trying to run `mp4dash` with two inputs representing the same video in different size: ``` mp4dash video-small.mp4 video-large-2.mp4 --no-split --no-media --verbose --use-segment-list ``` It fails with `ERROR: video tracks are not aligned` I've tracked down that error that is raised [here](https://github.com/axiomatic-systems/Bento4/blob/master/Source/Python/utils/mp4-dash.py#L1456) Apparently, some sample counts differ. Sample counts are generated [here](https://github.com/axiomatic-systems/Bento4/blob/master/Source/Python/utils/mp4utils.py#L549) and I have honestly no idea what they correspond to. The large and small videos have been previously fragmented with `mp4fragment` (no particular settings) and the original versions have been created with ffmeg using the same original video as input and simply changing size settings.
video tracks are not aligned
https://api.github.com/repos/axiomatic-systems/Bento4/issues/85/comments
6
2016-07-28T03:28:16Z
2023-11-25T13:12:04Z
https://github.com/axiomatic-systems/Bento4/issues/85
168,006,463
85
[ "axiomatic-systems", "Bento4" ]
Is there any plan to support "Inband Event Signalling" (ISO IEC 23009-1 5.10.3) ? I would like to add `emsg` box into specific fragment, so the player like [BITMOVIN](https://bitmovin.com) can detect the event.
Inband Event Signalling support ?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/84/comments
2
2016-07-22T08:44:26Z
2018-07-23T01:47:55Z
https://github.com/axiomatic-systems/Bento4/issues/84
166,997,892
84
[ "axiomatic-systems", "Bento4" ]
Now that Apple have added fragmented MP4 along with MPEG-CENC support to HLS for iOS 10, are there plans to expand the mp4-dash tool to generate a HLS manifest for the content as well?
Support for HLS with fragmented MP4
https://api.github.com/repos/axiomatic-systems/Bento4/issues/80/comments
34
2016-06-26T18:53:24Z
2019-09-16T09:15:05Z
https://github.com/axiomatic-systems/Bento4/issues/80
162,341,640
80
[ "axiomatic-systems", "Bento4" ]
mp4-hls.py line 198 ``` # we only need alternate audio tracks if there are more than one if not audio_only and len(audio_tracks) == 1: audio_tracks = [] ``` this prevents `mp4hls audioonly.mp4 videoonly1.mp4 videoonly2.mp4` to work. commenting it works, but I assume it might add duplicate audio entries in the m3u8 in other scenarios, thus not appropriate.
single audio elementary stream not supported in hls muxing
https://api.github.com/repos/axiomatic-systems/Bento4/issues/79/comments
1
2016-06-23T20:12:41Z
2017-05-27T19:03:05Z
https://github.com/axiomatic-systems/Bento4/issues/79
162,012,532
79
[ "axiomatic-systems", "Bento4" ]
Hello, I'm getting an error while trying to process an mp4 file with AC3 audio in it. Is that an expected behavior? The error that I'm getting is AC3 support not fully implemented yet. Regards, Max
AC3 support not fully implemented yet
https://api.github.com/repos/axiomatic-systems/Bento4/issues/78/comments
29
2016-06-23T03:52:07Z
2017-05-27T19:12:07Z
https://github.com/axiomatic-systems/Bento4/issues/78
161,834,870
78
[ "axiomatic-systems", "Bento4" ]
I write a h264 stream file and a aac stream file,then use mp4muxto merg the two files to one mp4 file. on my PC it works well,but on some others pc the video track only show the first Frame.the audio track looks fine. how it could be?
Video only have one Frame
https://api.github.com/repos/axiomatic-systems/Bento4/issues/77/comments
1
2016-06-20T08:27:31Z
2017-05-27T19:06:48Z
https://github.com/axiomatic-systems/Bento4/issues/77
161,141,400
77
[ "axiomatic-systems", "Bento4" ]
When mp4fragment timescale option is used (for example, --timescale 10000000), it computes segment durations according to requested timescale, but then writes sidx.timescale given from original track info.
mp4fragment incorrect timescale in sidx box
https://api.github.com/repos/axiomatic-systems/Bento4/issues/76/comments
2
2016-06-04T08:01:43Z
2016-08-29T05:26:07Z
https://github.com/axiomatic-systems/Bento4/issues/76
158,493,606
76