Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th February 2011, 10:51   #1  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
Jumping to a frame in MP4

Hi,
I created xxx.mp4 with raw H.264.
The file created successfully and played well.

The only one problem is it's showing dirty pixel blocks or distortion of the image when I jump to a time position.

Someone guessed it's a problem about finding key frames, but doesn't know the solution.

I use MP4Box to create MP4 files
but I have no idea to create an MP4
showing clean image on jumping to a position.

Do I need to modify some option of MP4Box?
or is there any way to remove those dirty effect on
frame jump?

Thanks in advance for your help.
mars2010 is offline   Reply With Quote
Old 9th February 2011, 11:17   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Are you playing the video in VLC by any chance?
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 10th February 2011, 01:15   #3  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
Hi,
I use KMPlayer and can see the distortion on frame jump.

I tried with VLC and didn't see any distortion.
But the problem is it takes one moment to jump to
another frame position.

For other movie files not created by me,
the frame position movement was very fast.
There was no distorted frame or suspension time.

So I think it's not a problem of player.
Perhaps something wrong in the MP4 container...

Do you have any idea?

Thanks.
mars2010 is offline   Reply With Quote
Old 10th February 2011, 10:54   #4  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by mars2010 View Post
Hi,
I use KMPlayer and can see the distortion on frame jump.

I tried with VLC and didn't see any distortion.
But the problem is it takes one moment to jump to
another frame position.
If your video is encoded with large keyframe intervals, it will take some time to jump to an arbitrary frame position because all (non-B) frames between the previous keyframe and the chosen frame must be decoded. Your KMPlayer setup doesn't do this correctly and that's why the output is broken until next IDR frame is reached.

Both players should normally jump directly to known keyframe positions, so yes, maybe there's something wrong with your MP4 files. Try remuxing with some other MP4Box build.

Last edited by nm; 10th February 2011 at 11:00.
nm is offline   Reply With Quote
Old 11th February 2011, 03:35   #5  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
I tried with the newest version of MP4Box, rev 2485(December 2010),
but there was no better result.

Is there any possibility that the raw 264 file has a problem?
mars2010 is offline   Reply With Quote
Old 11th February 2011, 03:44   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
yes it could be the video

do you get the same behaviour in other containers? e.g. try mkv with mkvtoolnix

what about other players besides vlc and kmplayer? e.g. try mpchc ?
poisondeathray is offline   Reply With Quote
Old 11th February 2011, 07:19   #7  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
I created an MKV with mkvmerge GUI v4.5.0, downloaded from mkvtoolnix.
I put a .264 and .aac and muxed. There was no warning or error.

But the problem is the movie is totally not seekable; I should watch the movie from the beginning to the end.
mars2010 is offline   Reply With Quote
Old 11th February 2011, 11:06   #8  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Strange. How did you create the .264 stream? Can you split a 50 MB clip from the beginning and upload to MediaFire?
nm is offline   Reply With Quote
Old 12th February 2011, 04:19   #9  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
I uploaded .264 in my skydrive:
http://cid-5355d6c6ebf2200b.office.l...px/TI/480i.264

the .264 file created by other engineer using TI's processor and its library.

I have a doubt whether the .264 file has a problem or not.
I'll be very thankful if you could find some clue...

Thanks!
mars2010 is offline   Reply With Quote
Old 12th February 2011, 05:25   #10  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by mars2010 View Post
I uploaded .264 in my skydrive:
http://cid-5355d6c6ebf2200b.office.l...px/TI/480i.264

the .264 file created by other engineer using TI's processor and its library.

I have a doubt whether the .264 file has a problem or not.
I'll be very thankful if you could find some clue...

Thanks!
It seems your .264 sample have only one IDR-frame, so MP4Box cannot generate many sync sample signatures.
I think the file is enocoded with GDR feature options such as open-gop and/or intra-refresh in x264 terms.
Random access of these features are implemented by Roll Recovery, however there are no demuxers and standalone muxers that support it AFAIK.
Treating non-IDR-frame as sync sample is out-of-spec in MP4.
So if you want to use these feature, you should mux it into other containers.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software

Last edited by VFR maniac; 12th February 2011 at 05:33.
VFR maniac is offline   Reply With Quote
Old 14th February 2011, 09:42   #11  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
Does it mean that I need to generate more than one IDR frame in the .264 file?

I thought I-Frames are used for seeking.
mars2010 is offline   Reply With Quote
Old 14th February 2011, 13:51   #12  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by mars2010 View Post
I thought I-Frames are used for seeking.
In AVC case, that is false since AVC's delta-frames can refer to other frames jumping over non-IDR I-frames and decoders cannot decode and display them correctly immediately.
Of course, open-gop I-frames can be used for seeking, however these I-frames are not IDR.

About this, the following discussion might be useful.
http://sourceforge.net/projects/gpac.../topic/3784919
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 15th February 2011, 09:30   #13  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
what I understood is...

If I generate several IDR frames
there would be no problem in seeking in MP4 and MKV, right?
mars2010 is offline   Reply With Quote
Old 15th February 2011, 09:41   #14  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Yes, you can seek any IDR-frames immediately in mp4 and mkv.

Though I don't know spec of MKV, IDR-frames are definitely seekable point.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 16th February 2011, 11:03   #15  |  Link
mars2010
Registered User
 
Join Date: Dec 2010
Posts: 18
Now it's more clear for the IDR frame, thanks.

I am curious for one more thing.
Are the IDR frames related to A/V synchronization also?

The MP4 containing only one IDR frame is started in sync for a first few minutes,
but slightly out of sync during the play, and the gap is much grown at the end.

It would be nice if it's a totally different problem.

Thanks.
mars2010 is offline   Reply With Quote
Reply

Tags
mp4 frame jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.