PDA

View Full Version : h264info alpha 0026 lite test


Trahald
13th March 2007, 18:45
This program lets you save nal info to disk from a h264 .es stream. it also will do pulldown and add sei time data. it is very alpha and not that tested. i havent had a chance to work on it for a while so im just putting it out there. at a minimum the info part seems to work and is very tested. i dont have alot of reference streams but the ones i have work fine. The program will add the data to allow a .es that is not accepted by scenarist to be accepted. when adding data it uses some dummy data so be careful. It is also slow.

http://batchccews.sourceforge.net/ is where you can get it under h264info package. source is included (although its not pretty.) Much of the parsing part is from mpeg4ip source rewritten. as such it is being released under the MPL. i fixed some parts from info i got from googling and aku's posts.

see sourceforge.net changelog for latest.

** Thanks to musicman2311 for help with testing

<0009> fixed variable change caused bad reconstructing of slice nal in some streams on 59.94/60 fps. (green blocks)

<0008> cpb removal delay calc revised to match reference encoders output. so far testing matches 100%. Result should be equal output durations.

<0007> split buffer period sei from pic timing sei into their own nalus. mimics characteristic of all reference encoders.

<0006> fixed error caused by me cutting and pasting one of my routines but not changing the variable. was a length variable so caused occasional crashing

<0005>
updated dpb_output_delay to be more accurate on 1080p w/pulldown sources.
added ability to set the level (no compliancy checking is done at this time)

<0004>
a little tweaking... 720p/480p(59.94fps with pulldown) seems ok but sca doesnt account for the pulldown so you get wrong timecodes and exceeds bitrate errors (since its muxing the frames too fast) it has the same prob with othersamples ive found so maybe its sca? anyways ...
1080p 29.97fps pulldown seems ok. waiting to hear :)

<0003>
fixed (hopefully) cpbremovaldelay values to get better timing on pulldown. also writing dpboutputdelay has been updated. for dpboutputdelay i use max values (0 for b frames and for all other types the max using max_dec_frame_buffering as reference

<0002>
added - allows for pulldown for ntsc 720p and 480p 24fps->59.94fps by using frame doubling and tripling.
(25p->50p PAL frame doubling support will be added later)

Sagittaire
13th March 2007, 19:41
Really interessing. Test in progress ... thx

Possible to add these flags:
- Change level and profil
- add sequence end code

b_squared
13th March 2007, 22:44
I know you can change the level easily (one of these days I should work on a patch for x264 that will automatically set the level according to the input stream size and desired bitrate, and not be user selectable), but I don't think you can change the profile without breaking some major stuff. Am I wrong?

Sagittaire
14th March 2007, 00:50
Well I test with x264 with hrd patch and this command line:

x264.exe --keyint 14 --min-keyint 1 --bitrate 4000 --vbv-maxrate 24000 --vbv-init 1.0 --vbv-bufsize 14745 --nal-hrd --mvrange 255 --level 4.1 --bframe 2 --b-rdo --bime --weightb --ref 3 --mixed-refs --direct auto --deblock -1:-1 --pass 3 --stats "x264_stat.log" --qcomp 0.75 --ipratio 1.10 --pbratio 1.30 --partitions "all" --8x8dct --me "hex" --subme 6 --trellis 1 --aud --sar 1:1 --progress -o H264_6Mbps.h264 Encodage_HD_NTSC.avs

Source is 1920*1080*23.976 with 2257 frames. I use h264info alpha 0001 for make pulldown flags.

I check the ES stream and I have a problem. The total duration for ES is not good. I obtain Tf = 24/30 * Ti.

Sagittaire
14th March 2007, 08:46
You want valide stream (with correct pulldown & framerate) to compare the result ... ???
The way for HDDVD/BD compatibility is really not far now.

bond
14th March 2007, 18:52
Possible to add these flags:
- Change level and profili dont think this should be doable. it will only lead to borked files

good would be a tool that checks the streams features and set automatically the lowest profile/level possible (or lets the user choose to set profiles/levels himself that fit the stream)

Trahald
14th March 2007, 21:57
@bond . yeah.. thats not a bad idea .. i can easily add changing the profile and level as the entire stream is rewritten, but avoided it for that reason (making a bad stream)

@sagittaire how far off is it? i used main concept to make my reference stream. but made only short ones as 1) pc was really slow then and 2) short streams easier to test. i have to make some bigger ones for reference as my pc now is a little less slow . as soon as i get some time.

b_squared
15th March 2007, 16:30
I have a PS3 and it is very picky about what it can play. If a stream is wrongly marked as level 5.1 (oh God why do people do that? That's for UltraHDTV or whatever it will be called), it will refuse to play it, even though it might perfectly capable of.

The only way of fixing this is by setting the level correctly. The PS3 will happily take anything up to level 4.1.

It would be very interesting though to see what if I got something that was marked High Profile and mislabeled it as Main Profile. Maybe the PS3's decoder is perfectly capable, but just refuses to take anything marked as High Profile. Obviously, somewhere in there there is code that decodes High Profile streams, as that's required for Blu-Ray discs. It could be just a silly limitation.

bond
24th March 2007, 16:55
Trahald

i am having another feature idea: generally merging two avc streams is only creating a new correct avc stream if the two parts use exactly the same encoding options

now merging two streams is also possible with different options BUT they need to have different sps ids (are there pps ids too?)! normally encoders always write the same ids (so you cant merge that streams), so it might be good to have a tool that lets you change the ids so you can create a spec compliant merged stream

Trahald
15th April 2007, 20:22
0002 binary available

bond
15th April 2007, 20:34
:thanks:

btw the standard extension for raw avc streams is .264 (as outputted by the reference encoder). you might want to add it to your list of extensions

Sagittaire
15th April 2007, 21:03
Unfortunaly always the same problem : after 23.976p@29.970i with pulldown flag convertion, Streameyes don't report the good duration for the stream. Importation in scenarist SCA will not report good duration too ...

Trahald
16th April 2007, 19:10
sag - k.. will probe further

Trahald
23rd April 2007, 01:44
0004 up.. will add level profile changing next.

Sagittaire
23rd April 2007, 12:38
a little tweaking... 720p/480p(59.94fps with pulldown) seems ok but sca doesnt account for the pulldown so you get wrong timecodes and exceeds bitrate errors (since its muxing the frames too fast) it has the same prob with othersamples ive found so maybe its sca? anyways ...
1080p 29.97fps pulldown seems ok. waiting to hear

Sorry for the delay but I make long test with complete 1080p encoding movie.

I think that pulldown for 59.94 fps must be pulldown for frame and not for field (progressive pulldown). I will make little 720p sample like for 1080p ...

Trahald
23rd April 2007, 19:39
for the 29.97, short tests seem to be ok. (ie scenarist has correct time.. buffer analyzer doesnt work at all for me in vista) .. im working on longer source too (but will be probably a 3-4 days or so before i have a full movie encoded.)

as per 59.94, i used a frame based source. scenarist gets it wrong.. but like i said.. i even fed it 59.94 straight from cinemaster and it gets the time wrong and ignores the flags during compile.

Sagittaire
23rd April 2007, 21:31
Well this time x264 in HDDVD NTSC work (1080p29.97 with pulldown flag).

I test x264 with this command line ...
x264.exe --keyint 14 --min-keyint 1 --vbv-maxrate 24000 --vbv-init 1.0 --vbv-bufsize 14745 --nal-hrd --mvrange 511 --level 4.1 --bframe 2 --b-rdo --bime --weightb --ref 3 --mixed-refs --direct auto --deblock -1:-1 --crf 24 --qcomp 0.75 --ipratio 1.10 --pbratio 1.10 --partitions "all" --8x8dct --me "hex" --subme 6 --trellis 1 --aud --sar 1:1 --cqmfile Sagittaire.cfg --deadzone-inter 6 --deadzone-intra 6 --aq-strength 0.25 --aq-sensitivity 5 --progress -o ED_24.h264 Encodage_HD_NTSC.avs

... and the mux in Scenarist SCA work really well. It's now possible to make NTSC HDDVD with x264.

Trahald
24th April 2007, 21:37
woohoo.. i only need 2 more days to finish encoding to compile my first. ;) if all works well after after a disk or 2 i may make a x264 binary from the hrd patch that also adds the pulldown flags for 1080p. until i figure out whats up with 720p i'll stick with 1080p

Sagittaire
24th April 2007, 22:42
Here little trailer with x264 and HDDVD NTSC:
http://dl.free.fr/F0pYxMwy/DiscImage.rar

Test on your HDDVD player ...

Sagittaire
25th April 2007, 01:27
i may make a x264 binary from the hrd patch that also adds the pulldown

Good idea ... :thanks:

Trahald
4th May 2007, 21:45
alpha 0005 available

Sagittaire
5th May 2007, 09:10
alpha 0005 available

I will test that. alpha 0004 work very well for 1080p23.976 source (test for complete movie at 200 000 frames).

woah!
13th June 2007, 12:44
thx for this :)

it seems multi cores doesnt work once the hrd cmd is used in my script :( 3 cores sitting idle is painful to see heh..

is it possible to even use this cmd on multicores?

ACA seemed to take a test encode just fine tho so it works here so far.

quantum
24th June 2007, 18:45
Scenarist ACA won't take a 1280x720 23.976 to 59.94 pulldown. However it takes 1280x720 23.976 to 29.97 pulldown and will mux and build despite h264info's warning message that its not HD-DVD compliant.

I could not get either 1280x720 23.976 to 59.94 or 23.976 to 29.97 to work in SCA.

woah!
27th June 2007, 06:12
i have a weird issue.

it seems after the pulldown is done, the file once imported into ACA has the right timeline except the frames at the end of the timeline are different.

eg:

orig vc1 file: [01:39:09:23]

orig ec3 file: [01:39:09:23]

pulled x264: [01:39:09:04]

encoded ac3 file : [01:39:09:23]

so even tho the time is correct the frames arent, does this maybe have something to do with non-drop and drop frames ??? when the pulldown is written does it do anything to that part of the file maybe??

its a weird one for sure and of course causes sync issues.


NOTE: if i mux the non-pulldown .264 with the ac3 file to mkv it is perfect in sync by the way.

survivant
25th July 2007, 15:03
I'm trying to create movies playable for the PS3. Sometime the file play well and sometime it's not. I'm using the same setting. The files are encoded with 4.1 level. 23.976 or 29.97 fps. I'm using the official x264 build.

there is something that I have to check to ensure that the movie will play fine ? (and suppose that the movie don't have sound, will be easier to test).

Trahald
26th July 2007, 18:39
@woah
0008 should match duration up closer if not right on.. let me know.

big warning tho.. if you used min key int of 1 then there is probably going to be duration issues that wont fix. it seems consecutive I frames mess up duration (thats even when using a pro app like cinevision)

@survivant
does the psp need files that have pulldown? i would assume that a native 23.976 should work fine which really means h264info isnt needed. I guess im not sure why you are using this app.

Trahald
31st July 2007, 07:27
0009alpha -- green blockies should be gone for 59.94/60 fps.

woah!
1st August 2007, 06:04
ok i will try to be understandable here :)

i tested your alpha 0009 and your 663G.x264.exe

1920x1080 @ 29.97 = works correctly on A2 player

1280x720 @ 29.97 = works correctly on A2 player <-- very nice result actually i am impressed. i might need this program to work correctly now heh...

1280x720 @ 59.94 = does not work on A2 player error code (408bc504) seems to mean it cant play this disc type or some sh*t.

only thing i see that "might" seem weird is that at 59.94 it chooses a 120000 time scale? the other 2 options its 60000

when i play back the 60fps pulldown output from h264info in powerDVD, it runs at 2x the speed it should.

woah!
1st August 2007, 06:21
hmm you know it could just be the a2 cant play this style of disc plain and simple. your program could well be working perfectly, as i can play the authored 60fps folder ok in powerdvd?

does a 720p 29.97fps really matter that much to me? it plays ok? maybe i will use this for long movies until more info is found out..

talking to myself here heh...

Trahald
1st August 2007, 07:07
hehe... well there was some bad code that needed fixing that caused green gobblies when 59.94 was used. (was reported in another thread) that was the only change..

120000 (/1001) is how we get 59.94 .. thats ok

and yeah.. if 29.97 works thats cool.. i'll keep tweaking 59.94 but dont kill too many dvd-9s on it if 29fps works.

Sagittaire
6th August 2007, 22:52
@ Trahald

you nal_hrd patch don't write correctly the hrd flag. StreamEyes (buffer analyser) report big overflow problem but I'am sure that the stream is vbv compliant.

Sergey A. Sablin
7th August 2007, 06:45
@ Trahald

you nal_hrd patch don't write correctly the hrd flag. StreamEyes (buffer analyser) report big overflow problem but I'am sure that the stream is vbv compliant.

if it is overflow in VBR mode, that this is 100% error with initial_cpb_removal_delay's/cpb_removal_delay's. If it is CBR, than it is absence of padding - in case of overflow in CBR case encoder shall write Filler SEI messages to prevent overflow.

Trahald
7th August 2007, 07:26
@ Trahald

you nal_hrd patch don't write correctly the hrd flag. StreamEyes (buffer analyser) report big overflow problem but I'am sure that the stream is vbv compliant.

not sure if you mean x264 patch or h264info. x264 hrd patch uses the max value (still Ian Caulfields original calc) for initial cpb removal delay. that value has the biggest effect on the buffer. during pulldown i only change cpb_removal_delay which has no effect... (to be specific, no matter the state of the buffer, cpb_removal_delay follows the same pattern strictly based on decode order/frame type.) hours of looking at pro apps output have confirmed this. dpb_output_delay also is strict to time and not buffer. i concede initial cpb removal delay is inaccurate (its set at the max value depending on bitrate but should adjust gop to gop and doesnt). ive only been tweaking the code i added to the patch.

h264info must be fed a stream with hrd there already, what it uses for values on streams w/out hrd were just fillers i put in when originally coding it.

can you make a stream available i can look at that will show the effects in buffer analyzer?

Sagittaire
8th August 2007, 15:07
not sure if you mean x264 patch or h264info. x264 hrd patch uses the max value (still Ian Caulfields original calc) for initial cpb removal delay. that value has the biggest effect on the buffer. during pulldown i only change cpb_removal_delay which has no effect... (to be specific, no matter the state of the buffer, cpb_removal_delay follows the same pattern strictly based on decode order/frame type.) hours of looking at pro apps output have confirmed this. dpb_output_delay also is strict to time and not buffer. i concede initial cpb removal delay is inaccurate (its set at the max value depending on bitrate but should adjust gop to gop and doesnt). ive only been tweaking the code i added to the patch.

h264info must be fed a stream with hrd there already, what it uses for values on streams w/out hrd were just fillers i put in when originally coding it.

can you make a stream available i can look at that will show the effects in buffer analyzer?


Well complete report:
- Your build x264_663g work perfectly now but not x264_663f
- Dark Shikari make x264 build for test SSIM optimisation with your patch but the NAL_HRD are not correct. There are big overflow problem exactly like for your x264_663f build (scan with Streameyes). Can you update your patch ?

Trahald
8th August 2007, 17:36
ahh.. ok... i'll have a 'g' patch out in an hour or so

bob0r
10th August 2007, 10:40
You found x264's G-spot?

Kurtnoise
10th August 2007, 11:53
:D



In fact, trahald uses a,b,c,d,e,f,g,....for his versioning.

Kurtnoise
26th September 2007, 09:29
Trahald: could you upload the sources of the last release please ?

Trahald
26th September 2007, 19:42
Are you sure? If you look at my code, youll go blind! :) Sure... give me a day or 2.. i dont really keep special copy so will be .11 with anything i coded since (not much)

Kurtnoise
26th September 2007, 21:40
Well...I'm not a MFC fanatic you know. It's just to implement command line args in it. If you have some time for this feature, that could be great.

Trahald
28th September 2007, 05:01
Source for 12 is up. will have binary available later.

lazyn00b
8th October 2007, 23:08
Hello Trahald, and thank you for h264info - I have been using it with success to apply pulldown to progressive streams encoded with x264. However, there seems to be a problem authoring these streams to Blu-Ray format with either Scenarist HDMV or Adobe Encore CS3. For example, if I encode a 480p23.976 source with x264, apply pulldown with h264info, and then attempt to author the stream with Scenarist, Scenarist accepts the file as an asset but complains that the file can not be authored as the "Primary" video stream. This is because Blu-Ray format allows 480i as the Primary Video Stream, while 480p is only allowed to be a Secondary stream (e.g. for PIP). Similarly, Adobe Encore accepts a pulldowned 480p stream as an asset, but refuses to author it without re-encoding first.

Out of curiousity, I re-encoded my source with the HC MPEG-2 encoder, which applied pulldown to make the m2v output file DVD compliant. This file was accepted by Scenarist HDMV, which had no problem muxing it as the Primary video stream. I looked at the properties of the m2v in Scenarist and noticed that it was flagged as "interlaced", whereas the x264 stream with pulldown applied by h264info was flagged as "progressive". This disparity is interesting because both streams were 23.976 fps progressive video with pulldown applied.

As a final test, I re-encoded with x264, but this time with interlaced encoding turned on. After applying pulldown to this stream, Scenarist and Encore were happy to mux it! However, this method of encoding is bad for quality and encoding efficiency.

This raises a question: is it possible to flag an H.264 stream as interlaced when you apply pulldown? If so, would it be possible to include this as an option in h264info?

Sagittaire
30th October 2007, 00:08
@ Trahald

You can make new patch for x264 with new PPS picture flag ... thx

woah!
30th October 2007, 02:45
Hello Trahald, and thank you for h264info - I have been using it with success to apply pulldown to progressive streams encoded with x264. However, there seems to be a problem authoring these streams to Blu-Ray format with either Scenarist HDMV or Adobe Encore CS3. For example, if I encode a 480p23.976 source with x264, apply pulldown with h264info, and then attempt to author the stream with Scenarist, Scenarist accepts the file as an asset but complains that the file can not be authored as the "Primary" video stream. This is because Blu-Ray format allows 480i as the Primary Video Stream, while 480p is only allowed to be a Secondary stream (e.g. for PIP). Similarly, Adobe Encore accepts a pulldowned 480p stream as an asset, but refuses to author it without re-encoding first.

Out of curiousity, I re-encoded my source with the HC MPEG-2 encoder, which applied pulldown to make the m2v output file DVD compliant. This file was accepted by Scenarist HDMV, which had no problem muxing it as the Primary video stream. I looked at the properties of the m2v in Scenarist and noticed that it was flagged as "interlaced", whereas the x264 stream with pulldown applied by h264info was flagged as "progressive". This disparity is interesting because both streams were 23.976 fps progressive video with pulldown applied.

As a final test, I re-encoded with x264, but this time with interlaced encoding turned on. After applying pulldown to this stream, Scenarist and Encore were happy to mux it! However, this method of encoding is bad for quality and encoding efficiency.

This raises a question: is it possible to flag an H.264 stream as interlaced when you apply pulldown? If so, would it be possible to include this as an option in h264info?

i would like an interlaced option added aswell, but to your other issues, why are you adding a pulldown to the 23.976fps video? in bluray (i believe) it doesnt need a pulldown as it reads 24fps and 23.976fps directly.

Trahald
30th October 2007, 14:33
@ Trahald

You can make new patch for x264 with new PPS picture flag ... thx

yeah i was planning on it... should have something out in the next few days.. (simple to code actually but computer acting up)

lazyn00b
30th October 2007, 20:21
i would like an interlaced option added aswell, but to your other issues, why are you adding a pulldown to the 23.976fps video? in bluray (i believe) it doesnt need a pulldown as it reads 24fps and 23.976fps directly.

Unfortunately, Blu-Ray supports 1080p at 23.976 fps, but not 480p. I thought applying pulldown to 480p23.976 would be enough, but apparently the stream must be flagged as "interlaced" as well to be a compliant Primary Video Stream. Secondary Video Streams allow 480p, but this doesn't help because you must have a Primary before you can author a Secondary :(

bond
4th November 2007, 10:44
trahald, can you please add the possibility to your tool to change the cropping values in the SPS? this way people can crop video streams without needing to reencode them

:thanks:

Trahald
5th November 2007, 03:30
hmm.... shouldnt be an issue. hopefully have some time this week.

Sagittaire
6th November 2007, 01:20
yeah i was planning on it... should have something out in the next few days.. (simple to code actually but computer acting up)

... some news ... :helpful:

liquidator87
24th November 2007, 20:40
Is command line supported?

Maxiuca
7th December 2007, 18:20
Would it be possible to add an option for patching the profile? (for example high->main)

buzzqw
7th December 2007, 18:32
@liquidator87

actually not.. but we never loose hope...

BHH

bond
30th December 2007, 12:20
any news? :)

XolocoTuxmaster
16th January 2008, 18:05
Trahald, could you add a pullup option, to do 29.97/59.94->23.976?

I'd also like to know if threre is a way to deinterlace without reencoding, to do 50i->25p

Trahald
17th January 2008, 01:11
Trahald, could you add a pullup option, to do 29.97/59.94->23.976? 29.97->23.976 is on the latest version (publically available but really im calling it a test version) 59.94->23.976 isnt done...but really the same thing..
I'd also like to know if threre is a way to deinterlace without reencoding, to do 50i->25p
if frames are truly stored as interlace.. i dont know of a way that exists to make them progressive w/out reencode

morpheus0815
17th January 2008, 01:34
29.97->23.976 is on the latest version (publically available but really im calling it a test version) 59.94->23.976 isnt done...but really the same thing..
if frames are truly stored as interlace.. i dont know of a way that exists to make them progressive w/out reencode

Trahald,
in addition to bonds request regarding cropping.... Can the same be done in the other direction? Meaning to make an 1280x720 stream out of a 1280x544 source? Since I'm using the files to create an AVCHD I could get around re-encoding existing 1280x544 movies, if it where possible!

Trahald
17th January 2008, 01:48
Trahald,
in addition to bonds request regarding cropping.... Can the same be done in the other direction? Meaning to make an 1280x720 stream out of a 1280x544 source? Since I'm using the files to create an AVCHD I could get around re-encoding existing 1280x544 movies, if it where possible!

hah.... guess that should work. i'll work on it.. i really need to write down these suggestions.. i loose track.

Sagittaire
17th January 2008, 11:16
Possible to have patch for direct x264 compilation ... ?

Trahald
17th January 2008, 16:28
Possible to have patch for direct x264 compilation ... ?

not sure what you mean by that.


.15 test is available. fixes issues that would effect parsing streams that use advanced features of h264. (cinevision and x264 seemed not to use these params)

XolocoTuxmaster
17th January 2008, 20:04
29.97->23.976 is on the latest version (publically available but really im calling it a test version) 59.94->23.976 isnt done...but really the same thing..
Ok thanks

Sagittaire
18th January 2008, 19:40
not sure what you mean by that.


.15 test is available. fixes issues that would effect parsing streams that use advanced features of h264. (cinevision and x264 seemed not to use these params)

x264_hrd_pulldown.xx.diff patch for x264 compilation.

CruNcher
18th January 2008, 20:28
Hi Trahald
you could add this workaround to it :)
http://forum.doom9.org/showthread.php?p=1083116#post1083116

This way people can in some situations prevent reencoding of such non Hardware Compatible Bitstreams :)

Trahald
23rd January 2008, 18:33
Hi Trahald
you could add this workaround to it :)
http://forum.doom9.org/showthread.php?p=1083116#post1083116

This way people can in some situations prevent reencoding of such non Hardware Compatible Bitstreams :)

lemme see if im reading it correctly.. are you just asking that i allow num_ref_frames to be set via the gui? if so.. no prob

for the bitrate i can also make it selectable. if none given and none in the stream then i would use max bitrate for current level.

Trahald
23rd January 2008, 22:07
about the adding borders without reencoding. i couldnt find anything that would let me do that. i was hoping negative values for cropping could be used to add size but they are stored as positive only values.

CruNcher
24th January 2008, 02:54
lemme see if im reading it correctly.. are you just asking that i allow num_ref_frames to be set via the gui? if so.. no prob

for the bitrate i can also make it selectable. if none given and none in the stream then i would use max bitrate for current level.

Yep exactly :)

XolocoTuxmaster
24th January 2008, 14:11
Nothing

bond
24th January 2008, 20:04
about the adding borders without reencoding. i couldnt find anything that would let me do that. i was hoping negative values for cropping could be used to add size but they are stored as positive only values.yes, my request was regarding being able to crop pictures, not to add borders

hope you can do it :)

Trahald
25th January 2008, 08:05
0018 test version is available. supports setting num_ref_frames and maxbitrate. for streams where there is no maxbitrate or cpb size setting, the max for that level is used for both (except for max bitrate when a size is supplied. ) maxbitrate is in kbps. commandline support also added.

cropping is next

Rectal Prolapse
31st January 2008, 19:40
Hi trahald. This segment crashes h264info - I hope you can figure it out! Thanks!

http://www.sendspace.com/file/rl63w1

This segment might be typical of Japanese HD-DVD h264 releases.

bozydar
3rd February 2008, 10:58
Is it possible to change levels from 16-236 to 0-255 (TV/Video space to PC-space)?

I try to put it in different words...

I have TS file with h264 track. I convert it to the MKV containter using GraphEdit (I connect Hali Media Splitter and Hali Matroska Muxer).

When I use the older version of the splitter for conversion, MKV file plays in Media Player Classic with PC-space levels (0-255), which is good IMHO.

When I use the newest version of the splitter for conversion, file plays in MPC with TV-space levels (16-235) - image is washed out...

So... I suspect, that newer splitter adds or removes something from the H264 stream during conversion...

The question is: Is it possible to correct this?

PHD_1976
6th February 2008, 07:22
Unfortunately, Scenarist HDMV gives an error while muxing H264 file demuxed from HD DVD and changed by H264info alpha 0018, something about zero GOP (can post it as it is if needed). Although MUI Generator if happy with this file.

I had very same type of error when cpb_removal_delay was calculated improperly (from Scenarist point of view). If cpb_removal_delay equals zero, except for the very first time, that is true Scenarist returns an error like "DTS of previous AU is no greater then xxx AU". So every zero cpb_removal_delay should be changed to a value of previous cpb_removal_delay plus two. In this case both MUI Generator & Scenarist are happy with file.
Trahald, what is you algorithm of recalculating cpb_removal_delay?

Creator1
6th February 2008, 21:08
Unfortunately, Scenarist HDMV gives an error while muxing H264 file demuxed from HD DVD and changed by H264info alpha 0018, something about zero GOP (can post it as it is if needed). Although MUI Generator if happy with this file.

I had very same type of error when cpb_removal_delay was calculated improperly (from Scenarist point of view). If cpb_removal_delay equals zero, except for the very first time, that is true Scenarist returns an error like "DTS of previous AU is no greater then xxx AU". So every zero cpb_removal_delay should be changed to a value of previous cpb_removal_delay plus two. In this case both MUI Generator & Scenarist are happy with file.
Trahald, what is you algorithm of recalculating cpb_removal_delay?

I had that error myself. I think it is something like "Program has a bug: - value of m_ptsOfGOP is empty". but I am pretty sure I got it wrong on the ptsOfGOP part, I am missing a part of the word.

In any case, I was able to mux a smaller AVC file after passing it through h264info (because the error seems to occur only on some part of files so a small one passed correctly) and the result was choppy playback. Every 2 seconds or something, the video skips. Seems like Scenarist is destroying something while muxing. If you do the same thing using the tsMuXER and tsremux guide the video plays back perfectly.

PHD_1976
7th February 2008, 06:51
I had that error myself. I think it is something like "Program has a bug: - value of m_ptsOfGOP is empty". but I am pretty sure I got it wrong on the ptsOfGOP part, I am missing a part of the word.

In any case, I was able to mux a smaller AVC file after passing it through h264info (because the error seems to occur only on some part of files so a small one passed correctly) and the result was choppy playback. Every 2 seconds or something, the video skips. Seems like Scenarist is destroying something while muxing. If you do the same thing using the tsMuXER and tsremux guide the video plays back perfectly.

Creator1,
you are right about success with smaller part avc muxing via Scenarist. When I had this error it occured in the parts where cpb_removal_delay equals to the previous value - and that gave me a choppy playback. In these cases value should be set to previous plus 2 (two) - and stuttering is gone.

I don't think we should blame Scenarist - he's doing his job very well, though it's very picky for file structure. -)

Trahald
7th February 2008, 15:25
The problem is some streams structures make it impossible (at least so far) to calculate dpb_output_delay properly doing only one pass. I am going to add a 2 pass option. but im trying to speed up the app as the regular 1pass is slow as is. i think scenarist is relying pretty heavily on dpb_output_delay and its causing muxing issues. tsremux is likely ignoring it and figuring out timings on its own.

if you look at a stream, cpb_removal_delay is pretty simple.. its just the field count from last iframe based on coded order (not display order). for non pulldown would be 0,2,4,6,8... with the next i-frame having the highest #, the following frame being 2 again then so on. pulldown would factor in the extra fake fields pulldown creates.

if i am doubling cpb_removal_delay then thats bad.. i'll look at it. (you can have repeat values when there are series of i frames, normally avoided with min gop being 2 frames) if you can make a short stream available that is doubling cpb_removal_delays id like to take a look.

Trahald
7th February 2008, 15:30
Hi trahald. This segment crashes h264info - I hope you can figure it out! Thanks!

http://www.sendspace.com/file/rl63w1

This segment might be typical of Japanese HD-DVD h264 releases.

ill have a look

Creator1
7th February 2008, 22:43
The problem is some streams structures make it impossible (at least so far) to calculate dpb_output_delay properly doing only one pass. I am going to add a 2 pass option. but im trying to speed up the app as the regular 1pass is slow as is. i think scenarist is relying pretty heavily on dpb_output_delay and its causing muxing issues. tsremux is likely ignoring it and figuring out timings on its own.

if you look at a stream, cpb_removal_delay is pretty simple.. its just the field count from last iframe based on coded order (not display order). for non pulldown would be 0,2,4,6,8... with the next i-frame having the highest #, the following frame being 2 again then so on. pulldown would factor in the extra fake fields pulldown creates.

if i am doubling cpb_removal_delay then thats bad.. i'll look at it. (you can have repeat values when there are series of i frames, normally avoided with min gop being 2 frames) if you can make a short stream available that is doubling cpb_removal_delays id like to take a look.

Trahald,

Thank you for looking into it. I am a programmer but all this is above my knowledge because I know nothing of the AVC structure (well, I know more than before I started looking into a stream but still am clueless on most fields meaning) so I hope you can figure out a patch to make Scenarist happy.

Do you know if the other error about "ptsOfNextGOP is empty" is related to the same thing we are discussing now?

I still kinda get what you explained about cpb_removal_delay though so thanks for the info.

If PHD_1976 does not provide a stream that skips for you to analyze then I will do it.

One question though: do "remove pulldown" in h264info supposed to work correctly for 1080i 25fps AVC PAL streams too (comes from HDTV)? I am currently trying to make a blu-ray with that kind of source without re-encoding and am having problems. I need to confirm this but I think the video skips when played back even if I use the very same method as I did with a AVC source file coming from HD-DVD (which is h264info remove pulldown + tsMuxer + tsremux)

EDIT:
Here are the files. I am not sure if it will be able to help you but take a look:

AVC elementary file BEFORE applying h264info "remove pulldown":

http://rapidshare.com/files/90046951/beforeh264pulldown.avc.html

AVC elementary file AFTER applying h264info "remove pulldown":

http://rapidshare.com/files/90048724/afterh264pulldown.avc.html

M2TS muxed by scenarist (with skipping) using the AVC file after applying h264info "Remove pulldown" and ac3 audio:

http://rapidshare.com/files/90044591/00000.m2ts.html

PHD_1976
8th February 2008, 11:26
Actually it's quite hard to provide a sample of the AVC part where exactly Scenarist give an error.
If Trahald checks whether cpb_removal_delay is doubled or not - that would be great (thanx in advance).
If this parameter is not doubled we should try to find another reason for this. that is hard without having sources.

I also have a 1080i 25 DVB avc stream, but even after h264info Scenarist keeps returning another error "This stream needs the SPI file" and I don't know what could it be.

BTW, about two consecutive IDR frames, I tried 3 variants (all I was changing was CPB_REMOVAL_DELAY):
1. 2nd IDR's CRD=previous. Result = video hangs
2. 2nd IDR's CRD=previous+2. Result = video hangs
3. 2nd IDR's CRD reset to 2. Result = video flawless

Creator1
8th February 2008, 15:27
Actually it's quite hard to provide a sample of the AVC part where exactly Scenarist give an error.
If Trahald checks whether cpb_removal_delay is doubled or not - that would be great (thanx in advance).
If this parameter is not doubled we should try to find another reason for this. that is hard without having sources.

I also have a 1080i 25 DVB avc stream, but even after h264info Scenarist keeps returning another error "This stream needs the SPI file" and I don't know what could it be.

BTW, about two consecutive IDR frames, I tried 3 variants (all I was changing was CPB_REMOVAL_DELAY):
1. 2nd IDR's CRD=previous. Result = video hangs
2. 2nd IDR's CRD=previous+2. Result = video hangs
3. 2nd IDR's CRD reset to 2. Result = video flawless

Check the level of your 25fps 1080i DVB file. My guess is, like mine, it will be MAIN level 4.0 or something like that. From what I can understand (I might be wrong), the SPI file is needed because the level is not HIGH 4.1 and some information is missing from the headers inside the AVC file. The headers of level 4.0 are quite smaller than the ones from level 4.1 and contains less infos. My guess is that an SPI file would provide the additionnal infos to scenarist but I have no idea how to create it.

The best results I had so far with my 1080i 25fps level 4.0 file was to pass the avc and ac3 streams directly into tsMuxeR by forcing a 24000/1001 framerate and forcing level 4.1. Then, the audio is still out of sync (I think it is to be expected because we go back to NTSC speed with the 23.976) and the video skips slightly at a constant rate. THe skip is less worse than the one that happens after using h264info on the stream but it's still not perfect.

Re-encoding the 25fps stream into a 23.976 progressive (Frame coding) avc file makes the video playback flawlessly, but we all want to not re-encode if possible...

Trahald
9th February 2008, 00:01
Actually it's quite hard to provide a sample of the AVC part where exactly Scenarist give an error.
If Trahald checks whether cpb_removal_delay is doubled or not - that would be great (thanx in advance).
If this parameter is not doubled we should try to find another reason for this. that is hard without having sources.

I also have a 1080i 25 DVB avc stream, but even after h264info Scenarist keeps returning another error "This stream needs the SPI file" and I don't know what could it be.

BTW, about two consecutive IDR frames, I tried 3 variants (all I was changing was CPB_REMOVAL_DELAY):
1. 2nd IDR's CRD=previous. Result = video hangs
2. 2nd IDR's CRD=previous+2. Result = video hangs
3. 2nd IDR's CRD reset to 2. Result = video flawless

are you saying its doing something like 30 and then 30 right away? i was referring to more when there are three I's you might get 30, 2, 2 .. but 30, 30, 30 is way wrong.

that would be bad mmm k.

PHD_1976
13th February 2008, 11:29
are you saying its doing something like 30 and then 30 right away? i was referring to more when there are three I's you might get 30, 2, 2 .. but 30, 30, 30 is way wrong.

that would be bad mmm k.

Sorry, I should have written it clearer.
When I was writing about consecutive IDR frames I didn't mean your tool. It's just the result of my experiments with h264 files from BD movies. I didn't have a chance to meet 3 IDR one by one, but I had two.
So, using your example for two IDRs correct values would be 30, 2 and for three I guess 30, 2, 2 as you wrote.

Are there any news about "dubbing or not" cpb_removal_delay?

Glorioso
13th February 2008, 21:55
Hi, i'm a newbie in this matters. Can use h264info to make a video stream compatible to the Xbox360?

Trahald
24th February 2008, 22:49
.20 speeds things up a bit by defaulting to no logfile and did a tiny bit of code optimization.

also added a HD(hddvd)->BR(bluray) mode that leaves the stream 29.97fps. (also should work with PAL if 25fps streams exist). pulldown really doesnt have to be removed. just some settings changed to allow for 29.97 within bluray.

and changed reverse pulldown to not calculate timings so funky streams wont need 2-passes. I just use the original calc and convert to non-pulldown timing. HD->BR mode leaves timing variables totally alone.

woah!
28th February 2008, 01:46
did you change something from .15 onwards??

take a look at this screenie, as you can see .13 .14 are the correct length but .15 onwards is 12frames shorter? which works out about 400ms.

source is exactly the same, settings used are the same,but something seems weird.

http://www.cif-forums.com/png/weird.jpg

Trahald
28th February 2008, 16:40
well.. i change lotsa things , im unfortunately not that great at tracking changes. is the final mux out of sync or does the video in sync but just end early? (neither scenario is good but just need to know what to look for)

woah!
29th February 2008, 03:26
if i mux to a mkv it seems to be in sync, if i use Scenarist ACA it is outta sync more as the movie goes along.

i use ACA to author to dvd9 so its important to me anyways heh, but .14 works for that.

Trahald
3rd March 2008, 05:00
.0021 fixes top-gun problem. also fixes issue with Rectal Prolapse's stream

will tackle woahs issue next (havent been able to duplicate on small streams so im gonna try to work on some bigger ones.)

glen8
3rd March 2008, 22:15
.0021 fixes top-gun problem. also fixes issue with Rectal Prolapse's stream

will tackle woahs issue next (havent been able to duplicate on small streams so im gonna try to work on some bigger ones.)

You kind sir...are a genuis :)

Rectal Prolapse
5th March 2008, 23:07
thanks trahald!

Creator1
6th March 2008, 19:00
.20 speeds things up a bit by defaulting to no logfile and did a tiny bit of code optimization.

also added a HD(hddvd)->BR(bluray) mode that leaves the stream 29.97fps. (also should work with PAL if 25fps streams exist). pulldown really doesnt have to be removed. just some settings changed to allow for 29.97 within bluray.

and changed reverse pulldown to not calculate timings so funky streams wont need 2-passes. I just use the original calc and convert to non-pulldown timing. HD->BR mode leaves timing variables totally alone.

Thanks for the hd-dvd to blu-ray mode trahald! I'll test it out when I have time.

Trahald
17th March 2008, 03:20
0022 out. fixes woahs issue(hopefully).

woah!
17th March 2008, 06:28
0022 out. fixes woahs issue(hopefully).

sure does :)

timing is perfect in Sonic ACA...

hidef_rec
18th March 2008, 15:21
Please help w/the framerate of an AVC file. It's 1920x1080p, but shows ~19fps via Nero Showtime. It's actually supposed to be 23.976fps ('Patriot Games' HD DVD rip). I authored this to Blu-ray anyway and the video playback is choppy as I'd expected.

When I use the latest h264info on the raw h264 file to force 23.976fps and remove 3:2 pulldown flags, h264info either crashes or spits out a file w/garbled video.

Any ideas on how to make the AVC file Blu-ray compliant?

Trahald
19th March 2008, 20:39
h264info will barf on bad streams.. i didn't code much resiliency into it. open it in dgavcindex and select the demux with video option and see if that helps . it has a bit more error detection in it.
if it fails there then you may need to rerip the disc

chrislynch
23rd March 2008, 06:01
I am trying to remove the pulldown flag from an AVC ES source. I am using Alpha 0.22, and each time I select "Remove Pulldown" the application terminates. I have tried both specifying a value or the FSP (23.976) and not specifying a value.

What am I doing wrong here?:thanks:

Forgot to mention that I am running this tool on a Windows Vista 32-bit with SP1 system. I have tried Compatibility Mode (Windows XP SP2) without success.

Rectal Prolapse
23rd March 2008, 09:14
Trahald, can h264info be used to test if an h264 stream is any good? I would like to know if it can be used to test streams demuxed from BD+ decrypted movies - I don't yet trust Slysoft to not allow corruption in the streams (it seems a few titles have glitches right now - let's hope slysoft doesn't ignore them).

Geleodor
24th March 2008, 20:45
Trahald any chance h264info will handle x.264 encodes ?
I have just tested it with several encodes (using different settings)....streams go through MUI Generator without problem, BUT Scenarist HDMV gives this message all the time
Error Content: Value of BitRate is not supported in the BD standard.

Anyway thanks for this tool :)

Trahald
25th March 2008, 20:37
@geleodor
hmm.. with x264 streams with no bitrate set, i set the highest bitrate for the level... i'll make sure my table is right... whats the level of the video you are using?

@chrislynch
ahh..does anything work on it for you? ie would another stream work? i dont have a virtual pc setup to test a xp/sp1 against it(and i probably wont) .. that may be the issue.. i am thinking about making a non-mfc version of it (pure cli).. but dont hold your breath. if i do it i wanna make it a lot more oopy and while i have made some oopy programs and worked with insanely oopy code (x264) i have a hard time getting my head around it (not the concept of OOP but injecting it into the/an app). i wont bother if its just gonna end up like h264info's code is. (code works but very hacky/amateur)

@rectal prolapse
i'll see... i probably wont.. most if the time the problem is in the slice data and i dont parse that. i'll eventually put more resiliency/error checking into the header stuff i do parse, tho.

Trahald
25th March 2008, 20:42
2 points of info about h264info...
1. the HD->BR mode turns frame_mb_only_flag=0(well that is if it isnt already 0) ppl have tested it and havent gotten any negative reports but it is a trick to get the stream to work. if your display doesnt like it, i recommend the reverse pulldown mode. (if you are PAL then hd->br mode is the only option)

2. for Bluray, each picture must have at least 4 slices (field pairs are 2+ each). since hddvd streams are normally single slices any converted stream is out of spec. again i havent heard of any issues but just a disclaimer.

chrislynch
26th March 2008, 00:59
@geleodor
@chrislynch
ahh..does anything work on it for you? ie would another stream work? i dont have a virtual pc setup to test a xp/sp1 against it(and i probably wont) .. that may be the issue.. i am thinking about making a non-mfc version of it (pure cli).. but dont hold your breath. if i do it i wanna make it a lot more oopy and while i have made some oopy programs and worked with insanely oopy code (x264) i have a hard time getting my head around it (not the concept of OOP but injecting it into the/an app). i wont bother if its just gonna end up like h264info's code is. (code works but very hacky/amateur)


No. I have tested a few streams, and it continuously fails for me.

I'm not quite sure how to word this, so bear with me. The encoding tool I use (TMPGEnc) detects the H.264 stream as Interlaced (29.97 frame rate) and Progressive (23.976 frame rate.) I can change the source to Progressive and all is good. No need to remove the pull down flag. Thanks anyway.

Rectal Prolapse
26th March 2008, 02:51
Thanks trahald for the extra header checks in the future.

Geleodor
26th March 2008, 18:20
I use level 4.1 for encoding
bitrate was 14500 last time when I tried to put my encide to Scenarist....

Trahald
27th March 2008, 18:35
can you cut a piece that shows the problem and make it available?

Geleodor
28th March 2008, 23:50
Here we are :)
It is just encoded 101 frames from Kingdom of Heaven...have not put it into h264info yet, just encode as it is.
http://rapidshare.com/files/103148710/Kingdom1.x264.html

Trahald
29th March 2008, 16:04
Here we are :)
It is just encoded 101 frames from Kingdom of Heaven...have not put it into h264info yet, just encode as it is.
http://rapidshare.com/files/103148710/Kingdom1.x264.html

Ok.. heres the deal with that.. i did find an error in h264info which i fixed and will be in the next version .. when i calc the maxbitrateminus one and cpbminus1 i ADD one instead. it will make the bitrate a tiny bit larger. thats fixed
but that wasnt really the problem... when no maxbitrate is supplied to the gui on a stream that doesnt have the maxbitrate value in it, I calculate the max bitrate for the level. the max bitrate for l4.1 is 50000kbps, but the max bitrate for bluray is 40000 kbps. unfortunately a similar thing happens with the cpb .. its 62500kb for L4.1 but 30000 for bluray. Id rather not do this because I dont want to make the app too bluray specific. but I will set my L4.1 settings to bluray max instead of avc spec max. L4.0 is already below bluray max and L4.2 and higher aren't allowed in bluray so no need to touch those. if you have a L4.1 stream and want bitrate to be set higher than 40000kbps then just manually set the bitrate in the gui.

will have a version out later today

Trahald
29th March 2008, 16:17
btw .. make sure you encode the stream @ 24 fps.if you are using bluray

Geleodor
29th March 2008, 19:09
Thanks Trahald.
I tryed to make encode with a level 4.0....previous error disapperaed (about bitrate value), but I have got another one (used different options):
Error Content: Value of Aspect_ratio_idc is not supported in the BD standard.

Trahald
29th March 2008, 21:45
new version 0023 . see changelog on sourceforge. link in my signature

Trahald
29th March 2008, 21:47
Thanks Trahald.
I tryed to make encode with a level 4.0....previous error disapperaed (about bitrate value), but I have got another one (used different options):
Error Content: Value of Aspect_ratio_idc is not supported in the BD standard.

16:9 - 1920x1080 is aspect_ratio_idc 1 ... you have to supply that to the gui (when you load the gui it tells you in the log window)

the frame rate has to be 23.976 also.

Geleodor
30th March 2008, 10:23
so....now it works perfectly )))))))))
I have just set output AR as 1 (as you said) and selected Write PPS every picture and Scenarist "ate" stream without problem. It does not matter was it level 4.0 or 4.1 -- both were accepted...but it`s only true for h264info 0.23. Previous version does not work, same bitrate error.

Thank YOU for this tool, now we can use x.264 encoded streams as input...

Trahald
30th March 2008, 17:26
i need to fix it because unless you choose pulldown it doesnt calculate cpb timing values. you can do that and then do a second pass in hd->br mode. or reverse pulldown mode. but thats a waste of time.. i'll have a version out later today that does the calcs. so dont burn a disk yet!! ;)

Trahald
30th March 2008, 19:01
ok.. i reupped 0023 with the change. again this only matters if you have streams w/out HRD in them (like unpatched x264.exe streams) . you must choose add picture structure

Geleodor
30th March 2008, 19:40
Ok I switch on:
HD->BR keep FPS
Add Picture Structure
Output Aspect Ratio == 1
output stream is accepted by Scenarist.


And at the end h264info shows this info.:
Supplied AR: H264 Present 1 (1:1 `square`)
FrameRate will be taken from stream
----
----
----
Found FrameRate 23.976 (29.97fps) (23.976 is correct for my encode)
-Established nuit: 1001 (don`t know what is this :))
-Established time_scale: 60000 (don`t know what is this :))
-Given resolution: 1920*1080 (correct for my encode)
Done!

Everything seems to be good with this settings. Or should I use any additional options ?

Trahald
30th March 2008, 21:21
that should do it. hd->br mode shouldnt be needed. but i guess its harmless here.

Geleodor
31st March 2008, 10:09
hm.... it does not without hd->br mode, for me...

Pitou
31st March 2008, 15:16
Trahald,

I big request for you!

First thanks for the continuous support and updates for h264info. It's just great!

But I'm running Linux mainly and would like to use h264info without wine. Would it be possible to have a simple command line version. There is no need for a GUI, at least for me and for now!

I know the source is already out there, but it seems to be targeted for Visual C windows compiler.

Any idea if that would be possible?

Thank you.

Pitou!

Trahald
31st March 2008, 15:20
Im considering it. Updating what ive already written and starting from scratch are 2 different things (and a non-mfc version would really need to be written from scratch)... if i get anywhere (or even seriously start) i'll let you know

Pitou
31st March 2008, 15:23
No problem, take your time, no rush!

If you need any help for compiling/testing just drop me a line.

Thanks!

Pitou!

MrAngles
1st April 2008, 07:28
Sorry if this is dumb, I've looked everywhere I could think of for the answer to this but can't find it. What are Add Picture Structure and Write PPS every picture?

Trahald
1st April 2008, 15:12
'Write PPS every picture' writes a Picture Parameter Set header for every picture listed. its usually needed for sources from pro encoders (if you ripped the files from a hddvd this is usually the case) because they change every picture..

add picture structures intended function is to add pic_struct (this is a h264 variable that tells if the picture should be displayed as a frame or one or more fields) . its needed to flag for pulldown and/or the original file didnt have a pic_struct (unpatched x264 files)

Golgot13
2nd April 2008, 16:08
Hi Trahald,

PPS is needed by some professional muxer (use in BD and HDDVD authoring software) to generate file.

About Sonic, Scenarist BD, and Sony, BluPrint, authoring software, it use the same muxer.... (from Sony).

Today, your software is very nice that H264 stream can be accepted by authoring software.
Could you put a option to alert if the file will be compliant,really, by BD specification ?
To check the GoP size, level, profile,...

We can make some test with chipset use on BD player to be sure it will be accepted.
(Sigma Design use by Sony BD player, Broadcam use by Samsung, ...).


Regards,


Golgot13

Geleodor
2nd April 2008, 18:52
Yeah, it would be great what Golgot13 propose....

lexor
3rd April 2008, 00:45
Trahald, is it at all possible to make this tool work in-place for level change only? Most muxing tools seem to be able to tell the level of the stream, and considering how fast they are doing it I think it is unlikely that they are actually analyzing the stream itself. So it would seem that there is a level tag somewhere, if all I want is to change the level tag, can it be done in-place without creating a new file?

... me short on space :(

Trahald
3rd April 2008, 14:04
@lexor
.. it really shouldbe a seperate cli tool that does that.. h264info was built to parse the original file. most h264 settings cannot be changed on the fly, but level is one of the first few settings in the SPS and there arent any variable length params in the sps prior to it so it can be edited in place. because its so simple to write a routine for changing the level (it would just have to scan for the sps and change the hex value) separate from the current file io i'll consider it.

@golgot13
will add compliancy checking to todo list. I'll probably add warnings in over time.

about the pps. well the option is there to add it every frame in h264info already(defaulted on). any app that requires it every picture is incorrect. i wont add it to the x264 patch or a separate patch because 1. x264 encoding makes pps every picture redundant. 2. the main project admin says he'll never let it into the code due to (1)

Trahald
7th April 2008, 21:02
In a couple days im going to start putting out lite versions. this versions will have all the logging commented out of the code. its about a billion times faster. i'll still compile a regular version with commenting option available for those that want it. most people are just using the abilities and dont care for logging and even with the log options off the code for it slowed things down a bunch.

B4tm4n
8th April 2008, 11:45
Look forward to using the faster leaner H264info.

Cheers.

PHD_1976
8th April 2008, 12:48
Trahald,
I tried to use 0023 version to make Scenarist HDMV (BLU-RAY) compatible h264 from HD DVD. The movie was Stardust.
So, with this version playback is choppy or even hangs.
But with 0022 version everything works just fine - playback is smooth and Scenarist swallowed the file and created a Blu-Ray for me:)

Settings I've changed vs default:
1. remove pulldown
2. set 23.976 as frame rate output.
Thanx.

Ryu77
9th April 2008, 01:24
Trahald, it seems like you are the right person to talk to about this. My main focus is creating PS3 compatible HD movies (on DVD-5/DVD-9).

I have been using tsMuxeR to do this, older versions meant that I had to demux the elementary streams from the Matroska file, run them through h264info (all fields blank) and then mux with tsMuxeR. I have no idea why this needed to be done, but all that I know is it worked.

Lately, the newer versions of tsMuxeR don't need the h264info step anymore as they play on the PS3 without this. However, the movies seem to stick a little when attempting to seek (FF/REW). Previously when I used h264info as an intermediate step, the files seeked perfectly. I tried to recover this file by demuxing through tsMuxeR and then using h264info and remuxing again... But the sticking is still there. :(

Here's a sample: http://www.mediafire.com/?pdqpb1zb0yx

Would you be able to tell me what I need to do to enable this file to seek smoothly on the PS3?

The two options in tsMuxeR "Add picture timing info" and "Continually insert SPS/PPS", should these be enabled when muxing for the PS3?

looney
9th April 2008, 03:19
I use h264info to patch stream info that hasn't --level tag in the header whic originally looks something like these

x264 - core 58 736tw aq48 - H.264/MPEG-4 AVC codec - Copyleft 2003-2008 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x133 ....

and when i patch the stream info the header created with x264 coder is in fact gone so instead a few tags more i dont have none.

checked "write PPS every pict"
Level, bitrate & res fields are filled.

How to get a header when patching stream info? Also, it should be a good thing that i could read/check the info status of x264 stream with this tool before taking on a long trip patching it.


EDIT
Checking [add picture stucture] gave me established_time_scale goes from 48000 (for 23.97fps) to 60000, should that be just an alias for 3:2 pulldown. And why ETS is not 24000 and 30000 respectively as it suppose to be. (Another patch took 320s @2,25G AXP for 960MB file, just 3MBps ... slow HD part shouldn't be an issue here?)

And when i mux it back to mkv and play this file in mpc6490 i get in properties info some ghost audio header probably from T2 which is the only audio muxed, so i get T1(ghost),my T1 now T2 (h264 with "APC"), and T2 thats became T3 (ac3).

Add Picture Strut definitely changes frame rate from 24 to 30? Why is that.

EDIT 2
Even with unchecked "write PPS" to change Levels from High@5.1L to High@4.1L adds some 0,2 to original stream size and removes original options from stream. This tool reminds a little on (in my case) unpopular divfix tool hopefully with much less consequences for the resulting video. Couldn't that level tag be changed less harmful for the stream in the end.

B4tm4n
9th April 2008, 09:59
Trahald, it seems like you are the right person to talk to about this. My main focus is creating PS3 compatible HD movies (on DVD-5/DVD-9).

I have been using tsMuxeR to do this, older versions meant that I had to demux the elementary streams from the Matroska file, run them through h264info (all fields blank) and then mux with tsMuxeR. I have no idea why this needed to be done, but all that I know is it worked.

Lately, the newer versions of tsMuxeR don't need the h264info step anymore as they play on the PS3 without this. However, the movies seem to stick a little when attempting to seek (FF/REW). Previously when I used h264info as an intermediate step, the files seeked perfectly. I tried to recover this file by demuxing through tsMuxeR and then using h264info and remuxing again... But the sticking is still there. :(

Here's a sample: http://www.mediafire.com/?pdqpb1zb0yx

Would you be able to tell me what I need to do to enable this file to seek smoothly on the PS3?

The two options in tsMuxeR "Add picture timing info" and "Continually insert SPS/PPS", should these be enabled when muxing for the PS3?

I think this sticking problem is related to the recent PS3 firmware updates and not tsMuxer or H264info, the seeking was working perfect before the update with just tsMuxer.
Well, thats how it seems to me anyway.
I'm just waiting for another update to fix this.

Ryu77
9th April 2008, 11:30
I think this sticking problem is related to the recent PS3 firmware updates and not tsMuxer or H264info, the seeking was working perfect before the update with just tsRemux.
Well, thats how it seems to me anyway.
I'm just waiting for another update to fix this.

Are we talking about the same application? I mentioned tsMuxeR but you said you are using tsRemux. I don't really use tsRemux as tsMuxeR handles everything that I need.

The files that I referenced to that were seeking smoothly are still seeking smoothly with the v2.20 firmware. As soon as I hit play after FF/REW, they start playing instantly. The M2TS files I created with the recent version of tsMuxeR, take about 5 to 10 seconds to start playing again after FF or REW.

B4tm4n
9th April 2008, 11:35
Sorry I meant tsMuxer. I just seems to me the problem started after the update, but I could be wrong.

A workaround is to stop the playback and then start it again its quicker than waiting for it to start by itself.

Have tried using older versions of tsMuxer ?

Trahald
9th April 2008, 21:29
looney - i need to reread our post. i dont totally understand.
are you referring to the unregistered data? (its an sei in the first picture AU where x264 writes your command line settings in text at)?

i'll look at the frame rate changing. forcing it to 23.976 in the gui should work.

Ryu77
10th April 2008, 05:42
Trahald, you missed my post above looney's. :(

dirkr
18th April 2008, 13:10
@Trahald:

Some of my streams are 1920x1088 and I tried to change it to 1080 with h264info.

1. Tried with cropping 8 lines at the bottom with lite version but the program died every time.

2. Tried h264info 0.23 worked with cropping 8 lines at the bottom.

BUT

the new stream can't be played anymore by VLC or Zoomplayer!

Looked with mediainfo on in and it says 1080

BUT

if I load it in TSMuxer it shows me 1084i ???

Using h264info again by cropping 12 lines TSMuxer shows 1082 ???

Mediainfo shows me 1078 ???

LAST BUT NOT LEAST:

By using the resolution 1920 x 1080 without cropping.....

TSMuxer shows 1080

MediaInfo shows 1072 ???

Any ideas what's going wrong

Ryu77
19th April 2008, 12:26
@Trahald:

Some of my streams are 1920x1088 and I tried to change it to 1080 with h264info.

1. Tried with cropping 8 lines at the bottom with lite version but the program died every time.

2. Tried h264info 0.23 worked with cropping 8 lines at the bottom.

BUT

the new stream can't be played anymore by VLC or Zoomplayer!

Looked with mediainfo on in and it says 1080

BUT

if I load it in TSMuxer it shows me 1084i ???

Using h264info again by cropping 12 lines TSMuxer shows 1082 ???

Mediainfo shows me 1078 ???

LAST BUT NOT LEAST:

By using the resolution 1920 x 1080 without cropping.....

TSMuxer shows 1080

MediaInfo shows 1072 ???

Any ideas what's going wrong

You are trying to adjust header values but you are not actually changing the resolution. The only way you can do this correctly is through re-encoding the video stream.

Ryu77
19th April 2008, 12:28
Trahald, it seems like you are the right person to talk to about this. My main focus is creating PS3 compatible HD movies (on DVD-5/DVD-9).

I have been using tsMuxeR to do this, older versions meant that I had to demux the elementary streams from the Matroska file, run them through h264info (all fields blank) and then mux with tsMuxeR. I have no idea why this needed to be done, but all that I know is it worked.

Lately, the newer versions of tsMuxeR don't need the h264info step anymore as they play on the PS3 without this. However, the movies seem to stick a little when attempting to seek (FF/REW). Previously when I used h264info as an intermediate step, the files seeked perfectly. I tried to recover this file by demuxing through tsMuxeR and then using h264info and remuxing again... But the sticking is still there. :(

Here's a sample: http://www.mediafire.com/?pdqpb1zb0yx

Would you be able to tell me what I need to do to enable this file to seek smoothly on the PS3?

The two options in tsMuxeR "Add picture timing info" and "Continually insert SPS/PPS", should these be enabled when muxing for the PS3?

Never mind about this. I found that if I disabled "Continually insert SPS/PPS" that everything was fine and the file seeked perfectly. :)

I also discovered that inserting SPS/PPS is irreversible, so the file that I have already muxed will have to stay like that. Oh well... At least I know what not to do in the future.

dirkr
19th April 2008, 16:51
You are trying to adjust header values but you are not actually changing the resolution. The only way you can do this correctly is through re-encoding the video stream.

look for a program called hdpatch...
http://www.avsforum.com/avs-vb/showthread.php?t=705146 (HDPatch)

it works for mpeg2-streams in a perfect way.

Explanation:
1. 1088 files: many streams from various sources are encoded with a vertical resolution of 1088 (i.e. 1920x1088 or 1280x1088). MF5/VS10+ does not recognize this as a valid HD-DVD resolution and will attempt to re-encode these streams. HDPatch will modify the stream headers to correct the resolution, changing the 1088 to 1080. Once "patched," Movie Factory 5/VideoStudio 10+ should process the stream without re-encoding. And don't worry - you're not losing 8 pixels of video. Those extra 8 pixels are usually gray filler.

HDPatch changed only the header...

I thought h264info could do the same for x264-streams, just to forgot the 8 lines on the bottom, for that there is no need to reencode.

FoxRacR17
11th June 2008, 06:08
I am wondering if anyone could help me out. I am currently converting my hddvd collection to wmvc1 to play on my 360 from an external hard drive. I have the process down pat for .vc1 hddvds. But now I am about to do transformers and that is .h264. From my understanding this program is kinda like vc1conv, am i correct? Do .h264 files have a pulldown, and would i need to remove it from the raw .h264 file that i demux from the .evo file? I ask because evodemux shows the main movie has having a framerate of 60i fps, but when i load the .evo in eac3to it says the framerate is 24fps, and finally when use mediainfo to look at the .evo it says the framerate is 29.970p. So I do not know which to trust. I did planet earth earlier and i know that was interlaced 29.970 and i had to use vc1conv to strip the pulldown and make it progressive 23.976.

Basically what I am asking is what options should i select in this program to strip the pulldown (if there is one in the demuxed .h264 from the .evo) and what other options should i select as far as framerate goes? Thanks for any help guys.

Sagittaire
13th June 2008, 08:41
@Trahald

Your x264_hrd_pulldown.04.diff patch is very popular for x264 (BluRay and HDDVD compliant stream with HRD flags) but it's a very old patch now. Possible to make a new patch with new function come from H264info ... ???

Chefkoch_ico
23rd July 2008, 13:14
Hi!

I recently bought a Canon HF100 AVCHD camcorder. It supports "movie mode", which does make the movies in 24p. However the stream itself indicates, that it is 29,97fps. And on playing there are some ghosting effects, which should be gone, when removing pulldown.

Basically this is the same for HD-DVD streams, or? However I tried the following:
- Demux h264 from m2ts with tsRemux or tsMuxer
- play demuxed h264 in MPC -> plays fine, time is not correct
- run it through h264info alpha25 and play in MPC -> plays not
- same as above muxed in m2ts with tsMuxer plays not in MPC and hangs my PC when trying with PowerDVD Ultra 7

Could it made possible, that h264info can successfully remove the pulldown from these files? Theres is currently no other possibility than encode into another format, which is no option in my eyes, see here for example:
http://eugenia.gnomefiles.org/2008/01/04/canon-avchd-24p-pulldown-removal/

I can post a short clip if wanted.

Best regards,
Andreas

Sharktooth
23rd July 2008, 13:18
m2ts is mpeg 2 transport stream, the same you'll find on blu-rays.
demuxing the raw stream will kill the framerate/timing info...
you need a m2ts source filter for DS players like MPC or a player that supports that format (powerdvd or windvd?).

Chefkoch_ico
23rd July 2008, 13:48
m2ts is mpeg 2 transport stream, the same you'll find on blu-rays.
demuxing the raw stream will kill the framerate/timing info...
you need a m2ts source filter for DS players like MPC or a player that supports that format (powerdvd or windvd?).

But isnt it possible to remove the pulldown of a h264 file from my camcorder, like it is with a h264 file from a HD-DVD. As I understand both h264 files are truly 24p but are flagged somehow as 29,97fps.

I want to remove it directly in the file and not on playing.

Best regards,
Andreas

LOGiC
24th July 2008, 09:29
Good Morning @all,

i've the feeling that this might be the right thread to post my problem. I will try to describe it. I am completely new to re-encoding and using x264. Last week I bought a Panasonic Blu-Ray standalone player DMP-BD30, which is capable of AVCHD from DVD+R and DVD-R. I already did some testing with 264 reencoded files and they play very well. But I noticed that they slightly stutter when camera is moving slowly.

Panasonic support told me that 24p will just be outputted when the movie is encoded in 24p or the information is on the disc as it is with Original Blu-Rays. Thats why I am asking you guys for your help, is there any chance for me to tell a reencoded x264 file (or tell the original file before the encoding) to set some kind of 24p flag or do anything with H264 info or any similar program to avoid or at least have less stutter ?

Thank you very much in advance.

Best regards,

Andy.

ThrottleAbuse
23rd August 2008, 21:16
So I read this entire thread and am way more confused than before I started. I am trying to make a HD DVD movie on a DVD9. So I have been using h264info to take the h264 file from 1920x1080 23.996 and make it 1920x1080 29.97 to mux with tsMuxeR. I am having no luck as after I mux the file the .ts file coming out of tsMuxeR is is very stuttery and when burned to a disk and put in my A2 it plays all stuttery and the audio loses sync. So my question is what settings should I be using in H264info. Currently I am removing the tic in the "write PPS every picture" box and simply adding a tic in the "3:2 pulldown" box. Is this the correct setting to do what I am trying to do? Or am I way off base. I read earlier in the thread that the "Write PPS every picture" may be needed. Maybe I am way off here as I really dont know what I am doing. Is H264info just changing the header of the file or is it changing the actual structure? Should I be using a different program to do what I am trying to do? Thanks

kurt
16th January 2009, 11:17
Hi Trahald,

I would like to change the AR in the h264 bitsream of this file: http://netload.in/dateiIZXcXBtmHl/Sample.mkv.htm (60MB).

It has a source AR of 2,35:1 (which is wrong) and in the container a custom DAR is set to 2,44:1 which is proper. But this container flag is not recognised when muxing the mkv to TS. So I would like to use your tool for changing the DAR to 480/197 respectively the SAR to 205/197 according to ffdshow...
Previous tests showed that changing the AR to 4:3 with h264info is recognised by the software player (mpc + haali media splitter) after muxing to TS. but I cannot use 480/197....

background: mkv is parsed in software and L4.1 1080p mkvs tend to stutter via USB on the Popcorn Hour in fast motion scenes. A remux to TS solves the problem (it's parsed in hardware --> less cpu activity) but the custom AR is gone...

any help is appreciated :)

LessThanJake
16th January 2009, 17:22
Maybe a workaround with mp4box will help?
Take a look at this thread:
http://forum.doom9.org/showthread.php?p=1180855#post1180855
This thread in the german doom9-Forum might be interesting for you as well.
http://forum.gleitz.info/showthread.php?t=38349

greets
LTJ

kurt
17th January 2009, 15:10
Maybe a workaround with mp4box will help?
Take a look at this thread:
http://forum.doom9.org/showthread.php?p=1180855#post1180855
This thread in the german doom9-Forum might be interesting for you as well.
http://forum.gleitz.info/showthread.php?t=38349

greets
LTJ
Thx! this is exactly what I was looking for. I muxed the h264 stream with yamb to mp4 while specifying a custom AR. After demuxing the elementary stream and muxing to TS with tsmuxer the AR can be read out by the software players (and popcorn hour). Great :)

neuron2
2nd February 2009, 22:14
May I have the source code for the latest version? I got version 025lite and it crashed on the first file I tried. I would like to debug it as I really need pulldown quite badly. Thank you.

laserfan
26th March 2009, 17:45
I tried using h264info again recently and it crashes immediately on any 264 elementary stream I try with it. I get a "Microsoft Visuall C++ Runtime Library" dialog ("This app has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Click OK and another dialog "h264info has encountered a problem and needs to close." This is using latest 25alphalite.

Crashes on both of two machines I use, one a P4 with XP Pro x32 and another Q6600 w/XP Pro x64. Both of these machines have both MS Visual C++ 2005 Redistributable and 2008 Redistributable. Not sure if this latter was installed due to "Windows Updates" or another app.

How might I get this working again.

neuron2
26th March 2009, 19:28
What are you trying to do with it? I may have an alternative that you can use?

b66pak
26th March 2009, 19:57
@kurt

i use this tool for changing wrong AR in h264 streams:

http://forum.doom9.org/showthread.php?p=1257375#post1257375
_

laserfan
26th March 2009, 20:22
What are you trying to do with it? I may have an alternative that you can use?Thanks--one of the features (along with adding pulldown) that I want(ed) from h264info was to change the bitrate in the header.

But maybe just adding pulldown flags (to take 24fps source to 29.97) could work too. Trying to find the magic formula to get MF6+ to accept BD files as input, without reencoding.

Trahald
27th March 2009, 13:15
I started some changes and then abandoned it (too busy/lost interest) for a while. The code is pretty fubared now and i probably wont be fixing it. (although i would like to apply the changes i made to the hrd patch to it.) There are alternatives now so i dont see a big need. Guess you never know , though.

neuron2
27th March 2009, 14:06
What is MF6+?

Trahald
27th March 2009, 16:38
I believe DVD Movie Factory 6 Plus.

laserfan
27th March 2009, 20:59
Yes, MF6+ is Ulead's authoring program to BD and/or HD DVD format. Makes very, very nice menus, but unless the input files are 29.97 and (I believe) <25MBps bitrate it will re-encode any 264 input (to MPEG2, double-yuk, painfully long re-encoding process plus MPEG2 in the end). But if you can trick it in the file header to believe it is a 29.97 file of 25Mbps, it will leave 264 files alone.

There are alternatives now so i dont see a big need. Guess you never know , though.
Dunno of any such tools for 264, perhaps you or someone else can point-the-way. And neuron2 you needed "pulldown", did you use h264info source, or not, or not-yet...

neuron2
27th March 2009, 22:58
I used my own tool. Maybe this weekend I can give it to you.

laserfan
28th March 2009, 00:48
I appreciate the offer--in the meantime I may have found a workaround to my problem, which involves using "dummy" 29.97 files to make my menus, then later inserting the real files into the BD structure. But I would think a DGPulldown-type tool for 264 might be something I could use if this Plan A doesn't work. Thanks and post-anywhere here or PM me if/when you need testers.

Well, it turns-out that Plan A works beautifully! So no need for h264info after all, or a pulldown conversion, to use MF6+ effectively. :)

laserfan
10th April 2009, 22:21
@Trahald fwiw I went back to alpha 23 (non-lite version) and h264info no longer crashes for me.

Trahald
13th April 2009, 20:00
i released 0026 as a test version. I rewrote the cpb/dpb calcs. but its based on .23 source (newest i could find) so it might be missing recent fixes. please report any issues.

btw.. its not a 'lite' version so its slow

https://sourceforge.net/projects/batchccews/

flapane
8th October 2010, 23:34
Does it work with x264 files as well?

shon3i
9th October 2010, 00:06
Does it work with x264 files as well?
You don't need this anymore, since x264 has built-in feature to write proper cpb and other things. Using this will probably make broken stream.

Trahald
9th October 2010, 15:52
I would only use this to view detailed stream information of avc streams if u don't have elecard stream viewer. Don't use it's output options.