raymod2
5th January 2006, 08:12
I can't seek past 7 minutes in the video files I create using the method described in the following thread:
http://forum.doom9.org/showthread.php?t=104478
The mp4dump output is as follows (most of it is from a terse dump but I cut and pasted the table entries for the stts box from a verbose dump):
$ mp4dump video.mp4
C:\msys\1.0\home\dan\bin\mp4dump.exe version 1.4.1
Dumping video.mp4 meta-information...
type ftyp
majorBrand = avc1
minorVersion = 0 (0x00000000)
<table entries suppressed>
type mdat
type free
type moov
type mvhd
version = 0 (0x00)
flags = 0 (0x000000)
creationTime = 3219038696 (0xbfdea1e8)
modificationTime = 3219038696 (0xbfdea1e8)
timeScale = 600 (0x00000258)
duration = 766086 (0x000bb086)
rate = 1.000000
volume = 1.000000
reserved1 = <70 bytes>
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
nextTrackId = 2 (0x00000002)
type iods
version = 0 (0x00)
flags = 0 (0x000000)
objectDescriptorId = 1 (0x001) <10 bits>
URLFlag = 0 (0x0) <1 bits>
includeInlineProfileLevelFlag = 0 (0x0) <1 bits>
reserved = 15 (0xf) <4 bits>
ODProfileLevelId = 255 (0xff)
sceneProfileLevelId = 255 (0xff)
audioProfileLevelId = 255 (0xff)
visualProfileLevelId = 21 (0x15)
graphicsProfileLevelId = 255 (0xff)
esIds
ociDescr
ipmpDescrPtr
extDescr
type trak
type tkhd
version = 0 (0x00)
flags = 1 (0x000001)
creationTime = 3219038696 (0xbfdea1e8)
modificationTime = 3219050920 (0xbfded1a8)
trackId = 1 (0x00000001)
reserved1 = <4 bytes> 00 00 00 00
duration = 766086 (0x000bb086)
reserved2 = <12 bytes> 00 00 00 00 00 00 00 00 00 00 00 00
volume = 0.000000
reserved3 = <38 bytes>
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 40 00 00 00
width = 720.000000
height = 400.000000
type mdia
type mdhd
version = 1 (0x01)
flags = 0 (0x000000)
creationTime = 3219038696 (0x00000000bfdea1e8)
modificationTime = 3219050920 (0x00000000bfded1a8)
timeScale = 10000000 (0x00989680)
duration = 12768101422 (0x00000002f909c42e)
language = 21956 (0x55c4)
reserved = <2 bytes> 00 00
type hdlr
version = 0 (0x00)
flags = 0 (0x000000)
reserved1 = <4 bytes> 00 00 00 00
handlerType = vide
reserved2 = <12 bytes> 00 00 00 00 00 00 00 00 00 00 00 00
name = GPAC ISO Video Handler
type minf
type vmhd
version = 0 (0x00)
flags = 1 (0x000001)
reserved = <8 bytes> 00 00 00 00 00 00 00 00
type dinf
type dref
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
type url
version = 0 (0x00)
flags = 1 (0x000001)
location = (null)
type stbl
type stsd
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
type avc1
reserved1 = <6 bytes> 00 00 00 00 00 00
dataReferenceIndex = 1 (0x0001)
reserved2 = <16 bytes> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
width = 720 (0x02d0)
height = 400 (0x0190)
reserved3 = <14 bytes> 00 48 00 00 00 48 00 00 00 00 00 00 00 01
compressorName =
reserved4 = <4 bytes> 00 18 ff ff
type avcC
configurationVersion = 1 (0x01)
AVCProfileIndication = 100 (0x64)
profile_compatibility = 0 (0x00)
AVCLevelIndication = 51 (0x33)
reserved = 63 (0x3f) <6 bits>
lengthSizeMinusOne = 3 (0x3) <2 bits>
reserved1 = 7 (0x7) <3 bits>
numOfSequenceParameterSets = 1 (0x01) <5 bits>
<table entries suppressed>
numOfPictureParameterSets = 1 (0x01)
<table entries suppressed>
type btrt
bufferSizeDB = 40699 (0x00009efb)
avgBitrate = 1848088 (0x001c3318)
maxBitrate = 750048 (0x000b71e0)
type stts
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
sampleCount = 38266 (0x0000957a)
sampleDelta = 333667 (0x00051763)
type ctts
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 12006 (0x00002ee6)
<table entries suppressed>
type stss
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 188 (0x000000bc)
<table entries suppressed>
type stsc
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 2 (0x00000002)
<table entries suppressed>
type stsz
version = 0 (0x00)
flags = 0 (0x000000)
sampleSize = 0 (0x00000000)
sampleCount = 38266 (0x0000957a)
<table entries suppressed>
type stco
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 3827 (0x00000ef3)
<table entries suppressed>
$
There doesn't appear to be anything wrong with this file but it does use a large media timeScale (10,000,000 ticks per second) and a correspondingly large sampleDelta (333,667 ticks per sample). 10,000,000 / 333,667 seems to be an inefficient way of approximating the NTSC frame rate which is 30000 / 1001. Because of the large time scale I am guessing that my seeking problem is caused by an integer overflow somewhere. With 10,000,000 ticks per second you can only represent 429 seconds (a little over 7 minutes) in a 32-bit integer.
The seeking problem occurs during playback in BSPlayer v1.37 and Media Player Classic v6.4.8.4. However there is no problem during playback in VLC media player 0.8.4.a. Since VLC doesn't use DirectShow I'm wondering if the problem is with Haali Media Splitter? Is that where seeking is handled for DirectShow?
http://forum.doom9.org/showthread.php?t=104478
The mp4dump output is as follows (most of it is from a terse dump but I cut and pasted the table entries for the stts box from a verbose dump):
$ mp4dump video.mp4
C:\msys\1.0\home\dan\bin\mp4dump.exe version 1.4.1
Dumping video.mp4 meta-information...
type ftyp
majorBrand = avc1
minorVersion = 0 (0x00000000)
<table entries suppressed>
type mdat
type free
type moov
type mvhd
version = 0 (0x00)
flags = 0 (0x000000)
creationTime = 3219038696 (0xbfdea1e8)
modificationTime = 3219038696 (0xbfdea1e8)
timeScale = 600 (0x00000258)
duration = 766086 (0x000bb086)
rate = 1.000000
volume = 1.000000
reserved1 = <70 bytes>
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
nextTrackId = 2 (0x00000002)
type iods
version = 0 (0x00)
flags = 0 (0x000000)
objectDescriptorId = 1 (0x001) <10 bits>
URLFlag = 0 (0x0) <1 bits>
includeInlineProfileLevelFlag = 0 (0x0) <1 bits>
reserved = 15 (0xf) <4 bits>
ODProfileLevelId = 255 (0xff)
sceneProfileLevelId = 255 (0xff)
audioProfileLevelId = 255 (0xff)
visualProfileLevelId = 21 (0x15)
graphicsProfileLevelId = 255 (0xff)
esIds
ociDescr
ipmpDescrPtr
extDescr
type trak
type tkhd
version = 0 (0x00)
flags = 1 (0x000001)
creationTime = 3219038696 (0xbfdea1e8)
modificationTime = 3219050920 (0xbfded1a8)
trackId = 1 (0x00000001)
reserved1 = <4 bytes> 00 00 00 00
duration = 766086 (0x000bb086)
reserved2 = <12 bytes> 00 00 00 00 00 00 00 00 00 00 00 00
volume = 0.000000
reserved3 = <38 bytes>
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 40 00 00 00
width = 720.000000
height = 400.000000
type mdia
type mdhd
version = 1 (0x01)
flags = 0 (0x000000)
creationTime = 3219038696 (0x00000000bfdea1e8)
modificationTime = 3219050920 (0x00000000bfded1a8)
timeScale = 10000000 (0x00989680)
duration = 12768101422 (0x00000002f909c42e)
language = 21956 (0x55c4)
reserved = <2 bytes> 00 00
type hdlr
version = 0 (0x00)
flags = 0 (0x000000)
reserved1 = <4 bytes> 00 00 00 00
handlerType = vide
reserved2 = <12 bytes> 00 00 00 00 00 00 00 00 00 00 00 00
name = GPAC ISO Video Handler
type minf
type vmhd
version = 0 (0x00)
flags = 1 (0x000001)
reserved = <8 bytes> 00 00 00 00 00 00 00 00
type dinf
type dref
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
type url
version = 0 (0x00)
flags = 1 (0x000001)
location = (null)
type stbl
type stsd
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
type avc1
reserved1 = <6 bytes> 00 00 00 00 00 00
dataReferenceIndex = 1 (0x0001)
reserved2 = <16 bytes> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
width = 720 (0x02d0)
height = 400 (0x0190)
reserved3 = <14 bytes> 00 48 00 00 00 48 00 00 00 00 00 00 00 01
compressorName =
reserved4 = <4 bytes> 00 18 ff ff
type avcC
configurationVersion = 1 (0x01)
AVCProfileIndication = 100 (0x64)
profile_compatibility = 0 (0x00)
AVCLevelIndication = 51 (0x33)
reserved = 63 (0x3f) <6 bits>
lengthSizeMinusOne = 3 (0x3) <2 bits>
reserved1 = 7 (0x7) <3 bits>
numOfSequenceParameterSets = 1 (0x01) <5 bits>
<table entries suppressed>
numOfPictureParameterSets = 1 (0x01)
<table entries suppressed>
type btrt
bufferSizeDB = 40699 (0x00009efb)
avgBitrate = 1848088 (0x001c3318)
maxBitrate = 750048 (0x000b71e0)
type stts
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 1 (0x00000001)
sampleCount = 38266 (0x0000957a)
sampleDelta = 333667 (0x00051763)
type ctts
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 12006 (0x00002ee6)
<table entries suppressed>
type stss
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 188 (0x000000bc)
<table entries suppressed>
type stsc
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 2 (0x00000002)
<table entries suppressed>
type stsz
version = 0 (0x00)
flags = 0 (0x000000)
sampleSize = 0 (0x00000000)
sampleCount = 38266 (0x0000957a)
<table entries suppressed>
type stco
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 3827 (0x00000ef3)
<table entries suppressed>
$
There doesn't appear to be anything wrong with this file but it does use a large media timeScale (10,000,000 ticks per second) and a correspondingly large sampleDelta (333,667 ticks per sample). 10,000,000 / 333,667 seems to be an inefficient way of approximating the NTSC frame rate which is 30000 / 1001. Because of the large time scale I am guessing that my seeking problem is caused by an integer overflow somewhere. With 10,000,000 ticks per second you can only represent 429 seconds (a little over 7 minutes) in a 32-bit integer.
The seeking problem occurs during playback in BSPlayer v1.37 and Media Player Classic v6.4.8.4. However there is no problem during playback in VLC media player 0.8.4.a. Since VLC doesn't use DirectShow I'm wondering if the problem is with Haali Media Splitter? Is that where seeking is handled for DirectShow?