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 8th July 2010, 23:50   #341  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by LoRd_MuldeR View Post
Well, if the I-Frame is a Non-IDR I-Frame, then we have to decode the frames before the I-Frame, as the None-IDR I-Frame doesn't flush the reference buffer and thus frames after the I-Frame (in display order) may reference to frames before the I-Frame. But that's nothing specific to OpenGOP. The same applies to all Non-IDR I-Frames, even when OpenGOP is not used.
That's why it was bugging me that some devs were talking about reading the previous gop as something special why from my understanding it was necessary all along.

Quote:
Originally Posted by LoRd_MuldeR View Post
Also, in my understanding, a GOP goes from an IDR-Frame to an IDR-Frame, i.e. None-IDR I-Frames are not GOP delimiters. Not sure what the "official" definition is here.
Then open-gop wouldn't really be open gop, would it? But ok, the term might just be a "tradition" coming from older standards.
sneaker_ger is offline   Reply With Quote
Old 9th July 2010, 14:17   #342  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
There are cases other than IDR where you do not have to go back a GOP. E.g.:

Recovery point SEI
non-IDR I picture
...

The sample posted earlier in the thread places recovery points before the non-IDR I pictures as above. In fact, in the very first post Trahald states that is what the "open GOP" patch does. I do not consider those to be open GOPs! For me a GOP is open if you have to go back a GOP to decode without errors.

The decision whether to go back is quite tricky. I see it like this (coding order):

IDR starts closed GOP.
RPS+I starts closed GOP.
I P B starts closed GOP. (This is the controversial one. Theoretically not so, but practically yes.)
I B P starts open GOP.

For me a GOP is just a sequence of pictures starting with IDR/I and it is seekable without going back if it is closed.

Last edited by Guest; 9th July 2010 at 14:48.
Guest is offline   Reply With Quote
Old 9th July 2010, 15:14   #343  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by neuron2 View Post
The decision whether to go back is quite tricky. I see it like this (coding order):

RPS+I starts closed GOP.
But the open-gop option of x264 uses recovery points on the open gops, so if you seek to a b-frame in a gop that starts with RPS+I we will still need information from the previous gop.

This hole debate is a real mess when we do not have a common opinion on the definition of a gop (and/or forget to mention whether we're talking coded or display order). Is there any definition in the h.264 standard?
sneaker_ger is offline   Reply With Quote
Old 9th July 2010, 15:42   #344  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by sneaker_ger View Post
But the open-gop option of x264 uses recovery points on the open gops, so if you seek to a b-frame in a gop that starts with RPS+I we will still need information from the previous gop.
The RPS declares that you do not need previous information.
Guest is offline   Reply With Quote
Old 9th July 2010, 17:52   #345  |  Link
Trahald
Wewkiee
 
Trahald's Avatar
 
Join Date: Feb 2002
Location: kashyyyk
Posts: 2,269
blurays definition of open-gop says this
1. the first frame in decode order must be a non-idr i frame and the frames that proceed it in display order are allowed to reference forward and backward. these frames cannot be correctly decoded during a random seek and are skipped.
2. frames after the non idr i-frame in display order must NOT reference frames prior to the i-frame in display order.

recovery points are not mentioned. (and there is plenty of room for a 'shall not' if that were the intent)

the frames in 1. are always b frames in x264. p frames that preceed the i-frame in display order (yet follow in coded order) are allowed but x264 doesnt generate p-frames in this condition. if b-frame decision decides that b-frames arent needed following the iframe in display order, that gop will essentially be closed (again based on blurays definition). The command open gop is ignored when --bframes == none.



blurays definition of open gop is the only one i know of. I modeled its behavior after AVC blurays.
__________________
...yeah...but...why on earth would I compare apples with apples?

Last edited by Trahald; 9th July 2010 at 18:00.
Trahald is offline   Reply With Quote
Old 3rd August 2010, 09:29   #346  |  Link
RBO
GPAC maintainer
 
Join Date: Jul 2010
Posts: 25
Quote:
Originally Posted by Audionut View Post
I'm going to go way out on a unfounded claim, and say it's an open-gop related issue.
FYI, h264 open-GOPs feature withing MP4 (MPEG4 part 12 spec) is not specified enough. There have been propositions at MPEG in 2010 to provide a solution. The problem comes from the collusion between RAP and sync points.

The compliant solution is implemented in GPAC. However it is not usable as seeking big files takes a lot of time. x264 (with GPAC MP4 support) marks all key frames as sync points, which is less compliant but practically allows you to seek within the file flawlessly.

Practically, I would advise you to create your MP4 files using x264, and then adding your audio with:
Code:
mp4box -add my_audio.xxx my_h264_muxed_with_x264.mp4
We are waiting the normalization decision from MPEG.

Romain
RBO is offline   Reply With Quote
Old 3rd August 2010, 17:31   #347  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
Quote:
Originally Posted by RBO View Post
Practically, I would advise you to create your MP4 files using x264, and then adding your audio with:
Code:
mp4box -add my_audio.xxx my_h264_muxed_with_x264.mp4
Are you suggesting to create raw H264 streams in x264? Because that's what I was doing since I started to work with x264 CLI.
kypec is offline   Reply With Quote
Old 3rd August 2010, 17:50   #348  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by RBO View Post
The compliant solution is implemented in GPAC. However it is not usable as seeking big files takes a lot of time. x264 (with GPAC MP4 support) marks all key frames as sync points, which is less compliant but practically allows you to seek within the file flawlessly.
Why should the container care about the underlying gop structure? Surely it's a job for the decoder to ignore b-frames from the previous gop.
kieranrk is offline   Reply With Quote
Old 3rd August 2010, 18:59   #349  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
According to 14496-15, sync samples are just IDR-pictures, so treating a I-picture as a sync sample is out-of-spec.
(Current x264's mp4 muxer module sets key-frame (IDR or I) as sync sample.)
I think it is the better solution using sdtp box (Independent and Disposable Samples Box) for marking random access point when Open-GOP is available.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 3rd August 2010, 19:40   #350  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Quote:
Are you suggesting to create raw H264 streams in x264?
No, he suggested to:
1st use x264s internal muxer to pack the videostream into a .mp4 file
2nd use mp4box to add additional streams

----

*snip*

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Trahald; 4th August 2010 at 00:32.
Selur is offline   Reply With Quote
Old 15th August 2010, 12:53   #351  |  Link
jethro
Registered User
 
Join Date: Mar 2006
Posts: 102
Quote:
Originally Posted by RBO View Post

Practically, I would advise you to create your MP4 files using x264, and then adding your audio with:
Code:
mp4box -add my_audio.xxx my_h264_muxed_with_x264.mp4
Romain
But it does not work, unless I'm doing something wrong.

Code:
>mp4box -add The Best of Science Fiction
Movies_audio.mp4  The Best of Science Fiction Movies_video.mp4
Code:
Error - 2 input names specified, please check usage

EDIT:
SOLVED
DOH, it needed quotes around filenames...

Last edited by jethro; 15th August 2010 at 13:00.
jethro is offline   Reply With Quote
Reply

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 23:07.


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