Log in

View Full Version : x264 w/ 3:2 pulldown and hrd


Pages : [1] 2 3 4

Trahald
7th May 2007, 20:57
I put up on my sourceforge page a binary of x264 (its the 04272007 checkout w/ hrdpatch 616 applied and then i coded pulldown support over it) i will post a .patch file later (patch will only include my changes) so would be checkout + hrdpatch + pulldownpatch

its on https://sourceforge.net/projects/batchccews/ h264info package. only place i could think of to put it for now. the command line is --pulldown 32. (with the space) .. its doc'd in --longhelp . it adds tbt bt btb tb pattern, to only be used with 1080p 23.976 source. i havent tested it much tho but passes testing so far.

Newest version x264_669i_pulldown.zip (aq / mp4 / threads / hrd_pulldown compiled in cygwin)

**Note: use min-keyint 4 (or more) and do not use b-pyramid for hddvd.

Guest
8th May 2007, 02:41
Thanks, Trahald! That will help me to get my decoding right by enabling me to create test streams.

Pitou
8th May 2007, 20:39
Could anyone point me to a thread or post a command example, for x264, to encode a 1080p 23.976 with pulldown, for it to be imported in Scenarist and be HD-DVD compliant ?

Thanks.

Pitou!

giandrea
9th May 2007, 00:59
Could anyone point me to a thread or post a command example, for x264, to encode a 1080p 23.976 with pulldown, for it to be imported in Scenarist and be HD-DVD compliant ?

Thanks.

Pitou!

Would you use pulldown to uprate it to 30 fps? Isn't the point of HD DVD and BR that they support the 24 fps framerate? Isn't it better to just encode it at the original framerate or isn't it supported by the standard?

Sagittaire
9th May 2007, 11:52
Could anyone point me to a thread or post a command example, for x264, to encode a 1080p 23.976 with pulldown, for it to be imported in Scenarist and be HD-DVD compliant ?

Thanks.

Pitou!

@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> first pass
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
x264.exe --keyint 14 --min-keyint 1 --vbv-maxrate 28000 --vbv-init 1.0 --vbv-bufsize 14745 --mvrange 511 --level 4.1 --nal-hrd --pulldown 32 --bframe 2 --bime --weightb --ref 1 --mixed-refs --direct auto --deblock -2:-2 --bitrate 7000 --pass 1 --stats "x264_stat.log" --qcomp 0.75 --ipratio 1.10 --pbratio 1.10 --partitions "all" --8x8dct --me "hex" --subme 5 --aud --sar 1:1 --cqmfile Sagittaire.cfg --deadzone-intra 6 --deadzone-inter 6 --progress -o test_1_75.h264 Riddick.avs


@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@REM >> second pass
@REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
x264.exe --keyint 14 --min-keyint 1 --vbv-maxrate 28000 --vbv-init 1.0 --vbv-bufsize 14745 --mvrange 511 --level 4.1 --nal-hrd --pulldown 32 --bframe 2 --b-rdo --bime --weightb --ref 3 --mixed-refs --direct auto --deblock -2:-2 --bitrate 7000 --pass 3 --stats "x264_stat.log" --qcomp 0.75 --ipratio 1.10 --pbratio 1.10 --partitions "all" --8x8dct --me "hex" --subme 6 --no-fast-pskip --no-dct-decimate --trellis 1 --aud --sar 1:1 --cqmfile Sagittaire.cfg --deadzone-intra 6 --deadzone-inter 6 --progress -o test_2_75.h264 Riddick.avs

Source must be 1920*1080*23.976


Would you use pulldown to uprate it to 30 fps? Isn't the point of HD DVD and BR that they support the 24 fps framerate? Isn't it better to just encode it at the original framerate or isn't it supported by the standard?

For HDDVD NTSC you must use 1920*1080*29.97 encoding. 1080i29.970 can be 1080p23.976 progressive encoding with pulldown flag.

Pitou
9th May 2007, 13:49
Sagittaire,

Thanks that's what I needed. This is for NTSC 1080p 23.976 source, right?

Also, x264 doesn't seem to put the end of sequence code and when importing to Scenarist, it crashes. Any idea?

Another question, what combination of graph/decoder you're using?

I tried:

file.vc1 --> Sonic HD demuxer --> Sonic video decoder 4.2

and:

file.evo (Haali media splitter) --> WMV9 Advance decoder DMO

and:

file.evo (Haali media splitter) --> ffdshow video decoder

and my avs script:

DirectShowSource("C:\HDDVD\para.grf",fps=23.976,framecount=312,audio=false)

Which one is best?

One last thing, is it possible for you to post your cqmfile Sagittaire.cfg?

Again, Thank you very much for help!

Pitou!

Trahald
9th May 2007, 16:33
Thanks that's what I needed. This is for NTSC 1080p 23.976 source, right?yepAlso, x264 doesn't seem to put the end of sequence code and when importing to Scenarist, it crashes. Any idea?I can possibly add a sequence end code flag , although lack of sequence end code is only a warning for scenarist and should not cause it to crash.

Pitou
9th May 2007, 16:40
Yes I thought so, since you wrote h264info and the x264 pulldown patch... thanks btw!

Not sure why scenarist crash, but when encoding with "your" x264 HRD and then passing the result file through H264info to apply pulldown, Scenarist doesn't complain anymore.

So, as you wish, maybe I can reinstall scenarist or if you add the end code, I can test it...

Thanks!

Pitou!

Trahald
9th May 2007, 18:14
can you provide me a small sample that still crashes scenarist ? are you using hte same settings as Sagittaire? i couldnt reproduce the problem

Pitou
9th May 2007, 20:17
Finally, it did import it with the warning (normal), but it didn't crash...

Maybe my encoding was bad...

I did test with the latest command line Sag just posted and it seems fine.

Thanks!

Pitou!

Pitou
10th May 2007, 02:52
Now Scenarist complain that my video is shorter than my DD+ audio track.

The error is:
"Warning Multiplex is terminated at 00:00:12:22, but expecting end time is 00:00:12:24. Please check video data file or track "para-t".

Video=00:00:12:24
Audio=00:00:12:29

Any idea?

Pitou!

Trahald
10th May 2007, 06:38
i think i see the issue.. should have a fix out in a day or 2

Pitou
10th May 2007, 15:07
Wow, great!

Do you think Dolby TrueHD will work as well?

Trahald
10th May 2007, 22:28
ok.. give 616b a shot

Trahald
11th May 2007, 15:37
ok.. let me know.. if you can.. gimmie a sample i can replicate the issue with. ive tried different settings and havent been able to duplicate a crash

Toti
18th May 2007, 15:37
I am getting a mux error with Scenarist. I first encode the video at 23.976 fps then apply the pulldown with h264info and the resulting video gets accepted but when is creating the HD-DVD it give me the error.

http://aycu03.webshots.com/image/17762/2004116042809257719_rs.jpg

The funny thing is that it works with small video of 1min. This one hour and thirty mins gives me the error.

I tried Alpha 007 & 006. Any suggestions?

Sagittaire
18th May 2007, 16:17
You use Mainconcept/Elecard H264 stream ... ???

Trahald
18th May 2007, 19:40
if you used x264, i would make sure you use 12 frames between idrs.. using history and cinevision (which defaults to 12 frames for pulldown) .. at what clock time is your first chapter break.. also.. either way, can you make a peice available?

Toti
18th May 2007, 22:23
Yes, I am using MainConcept 2.1.0 please note that if I encode a few minutes the pulldown works. If however, I encode the complete movie then it gives me this error. The movie I was encoding is Winged Migration.

Sagittaire
19th May 2007, 09:32
Yes, I am using MainConcept 2.1.0 please note that if I encode a few minutes the pulldown works. If however, I encode the complete movie then it gives me this error. The movie I was encoding is Winged Migration.

H264info don't work correctly with mainconcept/elecard stream because duration for AVC stream will be not good with pulldown flag (audio/video desynchro with scenarist). You must use x264 and anything else.

Sagittaire
20th May 2007, 09:44
@ Trahald

You can make x264 build with the AQ patch ... ?

Terranigma
20th May 2007, 22:14
Aq patch would be great. You can find the aq patch along with other patches at Cef's (http://cef.neuf.fr/x264/) page.

Toti
23rd May 2007, 18:18
H264info don't work correctly with mainconcept/elecard stream because duration for AVC stream will be not good with pulldown flag (audio/video desynchro with scenarist). You must use x264 and anything else.

If is true that it doesn't work with MainConcept streams. How come it works ok with Trailers that are 1~2mins long? They are also from Mainconcept.

Sagittaire
23rd May 2007, 23:05
If is true that it doesn't work with MainConcept streams. How come it works ok with Trailers that are 1~2mins long? They are also from Mainconcept.

Simply because audio/video desynchro is progressive: desynchro at 0.2 sec for 120 sec (not really a big problem here) done 12 sec for 120 Min (really big problem here).

Mainconcept/Elecard + h264info stream done bad duration in Scenarist SCA. x264 + h264info stream done good duration in Scenarist SCA. I don't know why but it's like that. In fact Mainconcept/Elecard stream even without h264info (Cinevision, Mainconcept h264 encoder or Elecard studio converter with pulldown) done always bad duration in scenarist SCA for me. I must make audio reencoding with Time Stretch if I want correct audio/video synchro. I don't know if Mainconcept/Elecard stream work correctly with Scenarist ACA (directly or with h264info).

Sergey A. Sablin
23rd May 2007, 23:38
Simply because audio/video desynchro is progressive: desynchro at 0.2 sec for 120 sec (not really a big problem here) done 12 sec for 120 Min (really big problem here).

Mainconcept/Elecard + h264info stream done bad duration in Scenarist SCA. x264 + h264info stream done good duration in Scenarist SCA. I don't know why but it's like that. In fact Mainconcept/Elecard stream even without h264info (Cinevision, Mainconcept h264 encoder or Elecard studio converter with pulldown) done always bad duration in scenarist SCA for me. I must make audio reencoding with Time Stretch if I want correct audio/video synchro. I don't know if Mainconcept/Elecard stream work correctly with Scenarist ACA (directly or with h264info).

very interesting to hear that SONIC cinevision doesn't work correctly with SONIC scenarist. very interesting...

bobololo
24th May 2007, 00:33
Mainconcept/Elecard + h264info stream done bad duration in Scenarist SCA. x264 + h264info stream done good duration in Scenarist SCA.

Sorry for being completely off topic but I can't bear it anymore :) You're making this mistake for such a long time that you really deserve someone correct you.

Toti
24th May 2007, 03:38
Actually, Sonic CineVision 1.2 is the only product I have that seems to encode correctly to HD-DVD. The difficulties I have with CineVision is:

- It only installs on Windows XP Pro 32-bit
- Simply Too SLOW

Other than that, it works flawlessly.

Sergey A. Sablin
24th May 2007, 03:57
Actually, Sonic CineVision 1.2 is the only product I have that seems to encode correctly to HD-DVD. The difficulties I have with CineVision is:

- It only installs on Windows XP Pro 32-bit
- Simply Too SLOW

Other than that, it works flawlessly.

"if you don't like cats, you simply don't know how to cook 'em" ;)
encoding engine is very fast - tweak up the settings to get more.
the only disturbing thing is GUI slowness, but not encoder.

Toti
24th May 2007, 14:28
Thanks Sergey, can you give me some tips. I really don't see any way to tweak CineVision since is straight forward. The only filters I see is "Film Grain" to turn it off. I am using AVC to encode.

VC1 I tried it and has problems encoding still video like "Sunrise Earth" or still background. Do I have to tweak VC1 to look good?

Am all ears.

Sergey A. Sablin
24th May 2007, 21:29
Thanks Sergey, can you give me some tips. I really don't see any way to tweak CineVision since is straight forward. The only filters I see is "Film Grain" to turn it off. I am using AVC to encode.

VC1 I tried it and has problems encoding still video like "Sunrise Earth" or still background. Do I have to tweak VC1 to look good?

Am all ears.

did you looked into encoder settings? there plenty of them - and probably you already know what many of them means.
another slowness come from preview - try to turn it off.
All in all the speed should be comparable to well known encoder.

drelin
30th May 2007, 09:47
Sorry, but what is exactly the "cqmfile Sagittaire.cfg" in the batch ? (corresponding at a Profile ?)

Thanks.

Sagittaire
30th May 2007, 22:30
Sorry, but what is exactly the "cqmfile Sagittaire.cfg" in the batch ? (corresponding at a Profile ?)

Thanks.

Well it's simply a custom quant matrix. You can drop this command if you want.


very interesting to hear that SONIC cinevision doesn't work correctly with SONIC scenarist. very interesting...

Well the "resolved issue" and the "know issue" in "the realese note" are simply impressive for these sonic product (problem for AVC/VC1 pulldown stream, problem with DD+ and TrueHD ... etc etc). I know very well (certainely not like you anyway) all the internal Mainconcept/elecard command for the core encoder and impossible (for me) to produce AVC pulldown audio/video synchro without audio reencoding (with timestretch). Cinevision is a very simple gui ... perhaps a problem with the NTSC source (24000/1001 fps) or other problem ... I don't know. Anyway x264 work perfectly for HDDVD scenario.


Thanks Sergey, can you give me some tips. I really don't see any way to tweak CineVision since is straight forward. The only filters I see is "Film Grain" to turn it off. I am using AVC to encode.

Cinevision, Elecard studio Converter and Mainconcept H264 encoder use the same SDK encoder. The internal command are always the same.

- Grain Optinmisation is not a filter but an encoding way to preserve grain/noise (not FGM here). This setting work really good.

- Adaptative Quantisation is a psy optimistation mode: There are lumi, contrast and complexity mask. For my eyes complexity at strenght -25 done the best result (higher quant for complex texture).

- You can tweak the CineVision Presets.cfg file if you want all the best possible setting.

- There are a little problem with the gui: you can't choose 14 frame for max GOP and 2 brames. The possibles combinaisons are 12/2 or 14/1 for max GOP/Bframe. 14/1 is a very better choice at low bitrate.

Chefkoch_ico
31st May 2007, 10:19
Hi!

I have some 25fps HD footage. Can I use this x264 version too (because of HRD needed for Scenarist, but no pulldown in this case)

Greetings

SealTooGreat
31st May 2007, 11:36
Where can I find x264 build compiled with AQ and HRD patch?

Sagittaire
10th June 2007, 17:42
"if you don't like cats, you simply don't know how to cook 'em" ;)
encoding engine is very fast - tweak up the settings to get more.
the only disturbing thing is GUI slowness, but not encoder.

Well like I say it's very simple to make encoding with Cinevision and mux with scenarist ...

Source is 3097 frame for 2 mn 09 sec

1) Here encoding with Cinevision
Cinevision say 2 mn 09 sec for 29.970 DNF pulldown encoding
x264 say 2 min 09 for 29.970 DNF pulldown encoding

2) Here Mux with Scenarist SCA
Scenarist SCA say 2 min 09 sec for x264 in DNF mode
Scenarist SCA say 2 min 07 sec for cinevision in DNF mode
Scenarist SCA say 2 min 09 sec for original ac3 in DNF mode

Mux with cinevision will done make audio/video desynchro and not x264 for complete movie (something like 40 sec for 120 min)


3) Here Mux with Scenarist ACA
http://jfl1974.free.fr/HDDVD/Scenarist_ACA_1.JPGhttp://jfl1974.free.fr/HDDVD/Scenarist_ACA_2.JPGhttp://jfl1974.free.fr/HDDVD/Scenarist_ACA_3.JPG

Scenarist ACA say 2 min 09 sec for x264 in DNF mode
Scenarist ACA say 2 min 07 sec for cinevision in DNF mode
Scenarist ACA say 2 min 09 sec for original ac3 in DNF mode

Mux with cinevision will make large audio/video desynchro and not x264 for complete movie (something like 40 sec for 120 min). I don't understand the problem. Anyway x264 and cinevision don't use the same way. If I want correct audio/video synchro with cinevision and with all the Mainconcept/Elecard encoder I must reencode audio with "good duration".

woah!
19th June 2007, 04:23
hmmm why do you need to use the nal-hrd cmd for again???

i just found out i can do a complete author using a encode without that option, i just ran it through h264info to add the pulldown to it and it dropped into ACA and SCA.

bonus is i can run all 4 cores instead of 1 when nal-hrd is used.

Sagittaire
19th June 2007, 14:47
hmmm why do you need to use the nal-hrd cmd for again???

i just found out i can do a complete author using a encode without that option, i just ran it through h264info to add the pulldown to it and it dropped into ACA and SCA.

bonus is i can run all 4 cores instead of 1 when nal-hrd is used.

I use special x264 build (nal_hrd, aq patch, thread patch). With nal_hdr i can scan the buffer compliancy.

woah!
20th June 2007, 03:57
I use special x264 build (nal_hrd, aq patch, thread patch). With nal_hdr i can scan the buffer compliancy.

well come on then dont be shy with it :)

Trahald
21st June 2007, 16:45
i made a compile with nal+hrd,pulldown, and aq... where is the thread patch... i can add that too.

uteotw
22nd June 2007, 21:17
It would be great if you could make a build (nal+hrd, pulldown, aq, and thread) with an updated rev661.
I got SVN and sync'ed the current build but my skills are too limited diff and include any patch.

About pthread, the x264 main page http://www.x264.nl/ links to this thread http://forum.doom9.org/showthread.php?t=95097

Thanks in advance.

SealTooGreat
22nd June 2007, 22:38
Trahald, if you have the will to that, it would very appreciated. Thanks

Trahald
23rd June 2007, 17:39
The diff link on that thread gives an error message. couldnt get get the patch file

Also.. I just use diff/patch from zlib . this works, although it produces slightly different looking patch files (although they work). what svn app are you using?

uteotw
27th June 2007, 12:28
... what svn app are you using?

Errr... if you were asking me, I use Tortoise.
the whole thing is new to me. It's easy to select to diff and patch files but applying is confusing because source files have changed since the patch were created. So at that point I'm not too sure what to do.

Trahald
30th June 2007, 22:03
i should have out a threaded version with aq/hrd/pulldown for 663 by tomorrow. svn command line seems to work the best for me thanks

Trahald
1st July 2007, 19:07
ok.. check the sourceforge page. 663 checkout with aq hrd pulldown and pthread-w32 .
will put up a combined hrdpulldown patch in a day or so

quantum
1st July 2007, 19:46
When using --threads 2 I see:
x264 [warning]: not compiled with pthread support!

And it's not using both cores.

uteotw
1st July 2007, 22:19
ok.. check the sourceforge page. 663 checkout with aq hrd pulldown and pthread-w32 .
will put up a combined hrdpulldown patch in a day or so

You da man! :D
Will give it a try this week and report back
Thanks a million

Trahald
2nd July 2007, 01:29
:o !

663b up! I compiled and tested it properly in debug mode.. then when i switched to release i missed a step. sorry. This one works.

SealTooGreat
2nd July 2007, 04:28
Trahald, your 663b doesn't support mp4 output. It's 632kb in size, while official r663 is 935kb.

Sagittaire
2nd July 2007, 05:14
Trahald, your 663b doesn't support mp4 output. It's 632kb in size, while official r663 is 935kb.

mp4 and mkv output is completely useless here. This build produce HDDVD/BD compliant stream and these stream must be ES.