Dear All,
I have attempted to generate DASH content with negative Composition Time Offset, but the version of the "trun" box after DASHing, is showing the wrong version number.
In the following link the files used can be found: https://app.box.com/s/j764n3r1mfuh9nve0ycp
Here the details:
I are working with 16 seconds length movie, 25 fps, H.264, closed GOP of 100 frames length, 4 seconds onDemand Segments for DASH.
The Representation Generation commands are the following:
ffmpeg -i ~\ContentSources\big_buck_bunny_720p_stereo.avi -t 16 -f mp4 -vcodec libx264 -profile:v main -level:v 3.1 -s 1280x720 -aspect 16:9 -b:v 2000k -an -maxrate 2008k -bufsize 4216k -keyint_min 100 -g 100 -flags +cgop -r 25 -sc_threshold 0 -pix_fmt yuv420p -threads 0 -y ~\ContentSources\big_buck_bunny_720p_2M_16Secs.mp4
ffmpeg -i ~\ContentSources\big_buck_bunny_720p_stereo.avi -t 16 -f mp4 -vcodec libx264 -profile:v main -level:v 3.1 -s 1280x720 -aspect 16:9 -b:v 1000k -an -maxrate 1008k -bufsize 2016k -keyint_min 100 -g 100 -flags +cgop -r 25 -sc_threshold 0 -pix_fmt yuv420p -threads 0 -y ~\ContentSources\big_buck_bunny_720p_1M_16Secs.mp4
ffmpeg -i ~\ContentSources\big_buck_bunny_720p_stereo.avi -t 16 -vn -b:a 32k -ar 48000 -ac 2 -acodec libvo_aacenc -profile:a aac_he_v2 -threads 0 -y ~\ContentSources\big_buck_bunny_32k_Audio_16Secs.mp4
In order to have negative Composition Time Offset in the samples, I have used the following commands:
These ones are working since the "ctts" box shows negative offsets and version is equal to "1" (correct according to 8.6.1.3 Composition Time to Sample Box of ISO/IEC 14496-12 4th edition).
MP4Box -raw 1 ~\ContentSources\big_buck_bunny_720p_2M_16Secs.mp4
MP4Box -add ~\ContentSources\big_buck_bunny_720p_2M_16Secs_track1.h264:negctts -new ~\big_buck_bunny_720p_2M_16Secs_ext.mp4MP4Box -raw 1 ~\ContentSources\big_buck_bunny_720p_1M_16Secs.mp4
MP4Box -add ~\ContentSources\big_buck_bunny_720p_1M_16Secs_track1.h264:negctts -new ~\ContentSources\big_buck_bunny_720p_1M_16Secs_ext.mp4MP4Box -raw 1 ~\ContentSources\big_buck_bunny_32k_Audio_16Secs.mp4
MP4Box -add ~\ContentSources\big_buck_bunny_32k_Audio_16Secs_track1.aac -new ~\ContentSources\big_buck_bunny_32k_Audio_16Secs_ext.mp4
The following it the DASHing command for the obtained representations:
MP4Box -dash 4000 -profile onDemand -rap -frag-rap -url-template -out ~\Dashcontent\BBB_H264_16Secs_negctts\BBB_H264_16Secs_negctts.mpd -segment-name %s_ -segment-ext mp4 ~\ContentSources\big_buck_bunny_720p_2M_16Secs_ext.mp4 ~\big_buck_bunny_720p_1M_16Secs_ext.mp4 ~\ContentSources\big_buck_bunny_32k_Audio_16Secs_ext.mp4
At this point, the segments shows negative Composition Time offsets in the "trun" box, but the version is equal to "0". According to "8.8.8 Track Fragment Run Box" of the same specification, this shall be equal to "1" (please find attached an screenshot that shows the situation):
if (version == 0)
{
unsigned int(32) sample_composition_time_offset;
}else
{
signed int(32) sample_composition_time_offset;
}
We have used isoviewer-1.0.0.jar for reading the mp4 boxes.
We have used the following MP4Box and ffmpeg versions, running in Windows 7 32 bits:
MP4Box - GPAC version 0.5.1-DEV-rev5407
GPAC Copyright (c) Telecom ParisTech 2000-2012
GPAC Configuration: (static configuration file)
Features: GPAC_HAS_SSL GPAC_HAS_SPIDERMONKEY GPAC_HAS_JPEG GPAC_HAS_PNGffmpeg version N-66222-g1b5ccae Copyright (c) 2000-2
built on Sep 10 2014 01:14:21 with gcc 4.8.3 (GCC)
I appreciate your assistance,
Regards
Diff: