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 23rd February 2010, 19:17   #21  |  Link
popper
Registered User
 
Join Date: Mar 2006
Posts: 272
roozhou thanks very much, cheers

im sure that ref option will be very useful for many users devices.

Last edited by popper; 23rd February 2010 at 19:31.
popper is offline   Reply With Quote
Old 23rd February 2010, 19:48   #22  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
thanks a lot...

Quote:
Now ref frames can be modified.
i think this will lead to stream decoding corruption...
_
b66pak is offline   Reply With Quote
Old 24th February 2010, 00:51   #23  |  Link
ExSport
Registered User
 
Join Date: Jul 2002
Posts: 91
Quote:
Originally Posted by b66pak View Post
i think this will lead to stream decoding corruption...
Same opinion. Also I remember that same trick tried to use roman76r, main coder of tsMuxeR with same results=corruption when ref frames were changed to compatible l4.1
ExSport is offline   Reply With Quote
Old 24th February 2010, 03:02   #24  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by b66pak View Post
i think this will lead to stream decoding corruption...
_
Yes. I changed a 16ref L5.1 stream to 8ref L4.1. DXVA can be used but shows a lot of artifacts.
roozhou is offline   Reply With Quote
Old 25th February 2010, 14:52   #25  |  Link
popper
Registered User
 
Join Date: Mar 2006
Posts: 272
Quote:
Originally Posted by roozhou View Post
Yes. I changed a 16ref L5.1 stream to 8ref L4.1. DXVA can be used but shows a lot of artifacts.
ohh well thanks for trying it anyway, it's the same on the 360 as well, also putting the resulting ref=3 file through AVInaptic DRF analysis it goes so far through then says unknown format, and if i leave it streaming from ps3ms to the 360 it comes back 'unplayable content' after a little time, i assume as it hits the same problem part as AVInaptic gets to.

at least we now know for sure changing on the fly ref doesnt work, now how to stop average people using crazy refs and levels for the encoding general non PC hardware cases perhaps the tools they use need far better defaults and warnings to drum it into average end users heads, bigger numbers does not mean better quality in the average ref's and level's case.

it might be interesting to understand why changing ref to a lower Number in the sps H264 bitstream shows a lot of artifacts though,(and the unknown format so far into the file oc), after all your not adding any new ref's just using less of whats already there.

again, thanks for trying it anyway.

Last edited by popper; 25th February 2010 at 15:20.
popper is offline   Reply With Quote
Old 25th February 2010, 15:29   #26  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by popper View Post
it might be interesting to understand why changing ref to a lower Number shows a lot of artifacts though,(and the unknown format so far into the file oc), after all your not adding any new ref's just using less of whats already there.
If you change the number, you are telling one thing and doing another: the stream still uses the same number of references as before.

This is only helpful if the decoder is actually capable of buffering higher number of references but there is some kind of a gatekeeper that checks the stream properties and drops it if they exceed L4.1 limits. For example, Nvidia's hardware decoder can handle streams with 16 references, but most DXVA filters refuse to even try if the stream announces that it exceeds L4.1. In this case lying about the number of references will help, but usually it doesn't.
nm is offline   Reply With Quote
Old 25th February 2010, 15:41   #27  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by popper View Post
now how to stop average people using crazy refs and levels for the encoding general non PC hardware cases perhaps the tools they use need far better defaults and warnings to drum it into average end users heads, bigger numbers does not mean better quality in the average ref's and level's case.
IMO this is perhaps doom9's fault. People are encouraged to buy expensive machines, use insane settings, encode at 0.xx fps and finally produce a file with "maximum" quality but cannot play on many devices. Well I would encourage people to increase bitrate by 5% and use default settings.
roozhou is offline   Reply With Quote
Old 27th February 2010, 02:45   #28  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
This is a very nice tool, thanks.

Is there a chance that this tool could be extended to be able to modify or insert the full range, color primaries, transfer characteristics, and color matrix flags?

The reason I ask is that there are several consumer-level player devices on the market that have bugs with unflagged H.264 streams. The Western Digital TV, NMT Popcorn Hour A-100, A-110, and A-200 all will render H.264 streams with ITU601 color decoding when the H.264 stream is unflagged, regardless of the resolution. For HD streams, this is incorrect, as the rendering should be with ITU709 color decoding.

If the streams are flagged, then the incorrect color decoding does not occur.

I have several streams made from my own Blu-Rays that are unflagged. It would be most convenient/helpful if I could insert the correct color flags into these streams rather than either 1) reencode from the source, or 2) wait for Western Digital/NMT to issue firmware updates. The bugs have been raised to both companies for over a year, and they have not yet issued firmware updates.
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 27th February 2010, 16:01   #29  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
i second this request...
_
b66pak is offline   Reply With Quote
Old 5th March 2010, 03:07   #30  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
New build available
Fixed bugs on flv demuxing

@SomeJoe & b66pak
Can you provide default settings for those VUI options?
roozhou is offline   Reply With Quote
Old 6th March 2010, 06:33   #31  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
@roozhou:

I believe that the default within the H.264 stream would be that those values aren't present at all.

See this post over at the MNT Popcorn Hour forum. It shows a difference between what the flags look like when the color transfer information is present and when it's not:

Code:
-------- H264 Video BT.709 ---------               -------- H264 Video no colour description --
video_signal_type_present_flag         : 1         video_signal_type_present_flag         : 1  
video_format                           : 5         video_format                           : 5  
video_full_range_flag                  : 1         video_full_range_flag                  : 1  
colour_description_present_flag        : 1         colour_description_present_flag        : 0  
colour_primaries                       : 1              
transfer_characteristics               : 1              
matrix_coefficients                    : 1              
chroma_loc_info_present_flag           : 0         chroma_loc_info_present_flag           : 0  
timing_info_present_flag               : 1         timing_info_present_flag               : 1

I unfortunately am not familiar with the construction of an H.264 stream, so I don't know where in the stream these flags reside. I assume they're in one of the packet headers somewhere, but that's a wild guess.

You may also want to look at the whole thread over there at the NMT forum, as there's a fair amount of analysis by a few of the developers.

In x264, the command line switches that would insert these flags are:

--colorprim [undef|bt709|bt470m|bt470bg|smpte170m|smpte240m|film]

--transfer [undef|bt709|bt470m|bt470bg|linear|log100|log316|smpte170m|smpte240m]

--colormatrix [undef|bt709|fcc|bt470bg|smpte170m|smpte240m|GBR|YCgCo]
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 23rd March 2010, 10:26   #32  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
New build available.
Quote:
Originally Posted by SomeJoe View Post
Is there a chance that this tool could be extended to be able to modify or insert the full range, color primaries, transfer characteristics, and color matrix flags?
They are supported now. Well if there is no VUI in sps I cannot generate a new one.


And muxing AVC and AAC to AVI is working. The non-monotone timestamps error in mkv->mp4 muxing is fixed as well.
roozhou is offline   Reply With Quote
Old 23rd March 2010, 18:58   #33  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
thanks a lot...
_
b66pak is offline   Reply With Quote
Old 2nd April 2010, 00:54   #34  |  Link
HELLFISH
Registered User
 
Join Date: Jan 2002
Posts: 18
Finally!!! This is tool is so awesome. Thank you so very much for releasing it.
THANK YOU!

Last edited by HELLFISH; 7th April 2010 at 04:48.
HELLFISH is offline   Reply With Quote
Old 13th April 2010, 03:48   #35  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
New build available.
A bug in avi index writing is fixed. There are no longer problems in seeking.
Also added a new option "-bom utf-8", which adds the EF BB BF startcode before extracted text. It seems many windows programs(including MPC-HC) cannot recognize utf-8 encoded text without BOM so this option will fix it.
roozhou is offline   Reply With Quote
Old 13th April 2010, 19:58   #36  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
thanks a lot...
_
b66pak is offline   Reply With Quote
Old 8th May 2010, 17:41   #37  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
New build available.
1) Compiled with GCC 4.4.4.
2) PTS/DTS error in audio streams will be ignored.
roozhou is offline   Reply With Quote
Old 16th May 2010, 11:25   #38  |  Link
TheShadowRunner
Registered User
 
TheShadowRunner's Avatar
 
Join Date: Feb 2004
Posts: 399
Great app, thank you very much!
(I needed to set video_full_range_flag back to 0 in a .TS)
TheShadowRunner is offline   Reply With Quote
Old 29th July 2010, 08:29   #39  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
New build 24573 available.
1) Fixed two bugs in bitstream modifier, which may produce bad extradata for mp4/mkv/flv
2) Added two new option to h264_changesps: removesei and removedupheader. removesei can be used to strip x264 user data and timing info from BD. removedupheader can be used to remove duplicated sps/pps in I frames. Both are designed to reduce overhead of bitstream.
roozhou is offline   Reply With Quote
Old 29th July 2010, 18:55   #40  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
thanks a lot...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak 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 00:54.


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