Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequential mode not seekable on windows #14

Open
rhwu opened this issue Feb 20, 2020 · 4 comments
Open

sequential mode not seekable on windows #14

rhwu opened this issue Feb 20, 2020 · 4 comments

Comments

@rhwu
Copy link

rhwu commented Feb 20, 2020

./minimp4_x86 -m stream.h264 stream.mp4
./minimp4_x86 -m -s stream.h264 stream-s.mp4
./minimp4_x86 -m -f stream.h264 stream-f.mp4

All of them are seakable with quicktime player on Mac. But stream-f.mp4 is not seekable with windows media player.

Is this something that can be improve?

Thanks!

@lieff
Copy link
Owner

lieff commented Feb 20, 2020

Hmm, I've always used the K-Lite codec pack and Media Player Classic on the windows.. Otherwise there problems with many media files.

If default mp4 splitter do not prints anything to debug output, then we cant use it to debug this. Other media validators should be used in this case (I do not have any currently).

@lieff
Copy link
Owner

lieff commented Feb 21, 2020

Without k-lite pack I do not see any generic mp4 demuxers available in directshow. There only DTV-DVD decoder and I can reproduce issue with it:

image

So it may be just not intended to use with media files instead of DTV-DVD. Any splitter/demuxer from K-Lite works fine.

@rhwu
Copy link
Author

rhwu commented Feb 22, 2020

The default mode and sequential mode seem be playing fine though.

It will be ideal if there's a mode that combines the benefit of both sequential mode and fragmentation mode, i.e. decoding can start right away but at the same time with something at the end for duration/seeking.

Don't know much about the mp4 spec, maybe this is not possible. Either way, thanks for looking into this!

@lieff
Copy link
Owner

lieff commented Feb 22, 2020

Yes, I've checked also default and fragmentation modes and it's played fine with DTV-DVD decoder, so it's looks like what enabled on your side.

It will be ideal if there's a mode that combines the benefit of both sequential mode and fragmentation mode

Fragmentation mode already sequential, but it's even less efficient because indexes flushed many times.
Default mode and sequential combine is not possible:
default

In non sequential mode each MP4E_put_sample will put new frame in this one big mdat chunk. When we ready to stop and write indexes - we need go back write correct mdat chunk size (it's located at beginning of chunk). Technically it's possible if we know all frames size we will write at start (and for all tracks), and then write exactly this amount, but this rarely the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants