Android: Build 1.11.0 validation of MP4 file

Chikkamath urchikkamath at yahoo.com
Thu Nov 17 14:34:37 UTC 2016


Hello Sebastian,

Here more details about issue:
 
mp4 file captured from Android camera, contains video as first trak (track
(element) box) and audio as second trak, after transcoding Gstreamer mp4mux
will create mp4 file whereas audio trak is first track i.e trak id = 1 and
video as second track trak id = 2. Here if you want to change rotation of
video track i.e trak id = 2  we have to parse audio track box followed by
video track box.
Now bug is audio trak has 8 bytes box/atom called 'mp4a' . Out of 8 bytes, 4
bytes description length followed by 4 bytes description audio format. 

Native or Original mp4 file has mp4a box size equal to 75 bytes, where as
transcoded mp4 file from gstreamer pipeline has mp4a box size equal to 7658
bytes and entire sample (framing info) table box 'stbl' of audio track
configured wrongly. Importantly we do only video transcoding audio will
bypass and mux to transcoded video.

Please find below system logs of parsing fails for mp4a box.

Exception in thread "main" java.lang.RuntimeException: ' ' with 'mp4a' as
parent has length == 0. That's not supported
    at
com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:89)
    at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:155)
    at
com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:131)
    at com.googlecode.mp4parser.util.LazyList.blowup(LazyList.java:30)
    at com.googlecode.mp4parser.util.LazyList.size(LazyList.java:77)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:59)
    at
com.coremedia.iso.boxes.sampleentry.AudioSampleEntry.getSize(AudioSampleEntry.java:329)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.coremedia.iso.boxes.SampleDescriptionBox.getSize(SampleDescriptionBox.java:112)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:58)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:58)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:58)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:58)
    at
com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:62)
    at
com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:58)
    at
com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder$InterleaveChunkMdat.getDataOffset(DefaultMp4Builder.java:458)
    at
com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.build(DefaultMp4Builder.java:128)
    at Test.rotation(Test.java:101)
    at Test.main(Test.java:83)


One more important observation we found. Height and Width of video
parameters configured wrongly in transcoded video(1920x1080) i.e 'tkhd'
track (element) header box height =9.0 and width=16.0 

Thanks in advance 




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Android-Build-1-11-0-validation-of-MP4-file-tp4680643p4680736.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list