View Full Version : settings for BD9 (Blu-ray compliant HD stream on DVD9)
moviefan
6th December 2008, 12:06
Hi guys,
I've searched the forum a lot and read various threads dealing with that topic, but could not come to a clear conclusion what settings comply to the Blu-ray standard for HD content on regular red laser DL-DVDs. (not AVCHD)
What I concluded is that the general encoding settings are the same as for HD content on BD-R(E) media, but the max. bitrate and the buffer seem to be different, apparently because of the lower data transfer rate of DVDs. Also, I'm not absolutely sure about the number of reference frames allowed. Sometimes I read 2, sometimes 3, sometimes 4... And are options like b-pyramid allowed? What I know is that I have so set --nal-hrd and --aud to be compliant + Level 4.1 obviously.
I would very much appreciate if someone could post the maximum quality settings the specs allow for BD9 video streams, so that they work on the PS3 as well as on SA BD-players. Oh, and multiple audio tracks would be nice...
Regards,
moviefan
Golgot13
6th December 2008, 13:38
Hi,
@moviefan:
BD9 is a BD on DVD disc with 3X data rate transfer.
On BD specification Rom2 part3, BD9 is like all BD format (on BD disc)
encrypted in AACS (only Rom Mark is not mandatory).
AVCHD and BD9 have same restriction for bitrate and vbv. The big difference are than AVCHD,
because CamCorder (realtime encoding), use generally a long GoP structure.
To simplify:
AVCHD = BD on DVDR without AACS
BD9 = BD on DVD (so with AACS, there is a specific DVDRom LeadIn...)
Regards
CruNcher
6th December 2008, 14:33
@Golgot13
AVCREC is the official Spec for AVC on DVD isn't it ? but ok it doesn't support Menus i think (no interactive layer) so for that BD9 seems more suited.
Golgot13
6th December 2008, 16:13
@Golgot13
AVCREC is the official Spec for AVC on DVD isn't it ? but ok it doesn't support Menus i think (no interactive layer) so for that BD9 seems more suited.
Yes, I know about specification but you can put menu on AVCHD disc.
And I'm not sure you make lot of test on PS3: you can put BDJ title project
on HDD of PS3 to test it, but the name of folder must be AVCHD...
(today Sony lock this possibility on last firmware)
Sagittaire
6th December 2008, 17:15
Hi,
@moviefan:
BD9 is a BD on DVD disc with 3X data rate transfer.
On BD specification Rom2 part3, BD9 is like all BD format (on BD disc)
encrypted in AACS (only Rom Mark is not mandatory).
AVCHD and BD9 have same restriction for bitrate and vbv. The big difference are than AVCHD,
because CamCorder (realtime encoding), use generally a long GoP structure.
To simplify:
AVCHD = BD on DVDR without AACS
BD9 = BD on DVD (so with AACS, there is a specific DVDRom LeadIn...)
Regards
1) Long GOP (2 sec max) is possible for 1080p but only if you use max bitrate at 15 Mbps*.
2) 1 sec is not really a short GOP. There are not big difference between infinite GOP and 1 sec GOP in efficiency term for H264 (less than 10%).
3) Major quality improuvement for x264 could be open gop. In this case with 3 bframes ~1/3 frames of the GOP are potentialy directly refenced on Iframe. IDR frame could be simply for scene change.
*Table 9-25, BD specifications.
moviefan
6th December 2008, 18:48
So an HD video with e.g. 2 audio tracks is only BD9, if I have AACS encryption active? Sounds weird... So are you sure that BD9 = AVCHD/AVCREC with AACS? I believe to have read in one big thread here about this topic that AVCHD only supports 1 audio track. What I want is simply the following: 1 video stream in 1080p encoded with x264, >1 audio streams, no menu. What are the correct values for max. bitrate and VBV buffer then to comply to the BD9 specs? And please explicitly state the max. refs and max. b-frames to be sure.
Cheers for you help so far!
Sagittaire
6th December 2008, 20:05
So an HD video with e.g. 2 audio tracks is only BD9, if I have AACS encryption active? Sounds weird... So are you sure that BD9 = AVCHD/AVCREC with AACS? I believe to have read in one big thread here about this topic that AVCHD only supports 1 audio track. What I want is simply the following: 1 video stream in 1080p encoded with x264, >1 audio streams, no menu. What are the correct values for max. bitrate and VBV buffer then to comply to the BD9 specs? And please explicitly state the max. refs and max. b-frames to be sure.
Cheers for you help so far!
4 ref max with 3 bframes max at level 4.1 for 1080p. Anyway for coding efficiency 2 or 3 bframes are not really important.
moviefan
8th December 2008, 16:05
So if I encode a 1920x1080 video with x264 using 4 refs, 3 b-frames with --nal-hrd and --aud, --mvrange 511 etc., Level 4.1, and author it with TsMuxer to Blu-ray output (SPS/PPS and picture timing info deactivated), will this be BD9 compliant so that it works on SA Blu-ray players as well as PS3?
Is --vbv-maxrate 38000 --vbv-bufsize 30000 stated in http://forum.doom9.org/showthread.php?t=134402 correct?
Or rather --vbv-bufsize 22000 --vbv-maxrate 16000 like in http://forum.doom9.org/showthread.php?p=1177652#post1177652?
bond
8th December 2008, 19:05
i would assume the best would be if someone really knowing the stuff would post a complete sample x264 commandline for the different variants each (BD), AVCHD, AVCREC...)
Sagekilla
8th December 2008, 19:11
If you're authoring for PS3, it's fairly robust in what it can handle. I've used 1080p with --level 4.1 --crf 19 --keyint 1000 --ref 4 --mixed-refs --b-frames 6 --b-adapt 2 --b-pyramid and had no issues before. SAPs are the only thing you really have to be careful of.
moviefan
8th December 2008, 22:26
SAPs? Sorry, but what is that? ;-) I am aiming at encoding (and authoring) to a Blu-ray format that is completely compliant (like professional Blu-ray movies) so that I don't have to care about the decoding device as long as it complies to the Blu-ray specs. So no format for PS3 only etc., simply a compliant Blu-ray burnt on a DVD9. I agree with bond that it would be nice if someone could post a command line with some explanation about what settings can be altered for speed/quality balance at what settings are strict for compliance.
Sagekilla
9th December 2008, 04:47
SAP = Stand Alone Player. In other words, exactly the target you're aiming for.
moviefan
9th December 2008, 13:03
Of course, sorry, brain failure ;-) So is there someone who can post an x264 command line that complies totally to the Blu-ray specs (so for SAPs and PS3 and everything)?
G_M_C
9th December 2008, 13:53
I make BD9's all the time, encoding them through AviSinth with x264. I mux them with tsMuxer, and add subs if needed, and then burn them with IMGBurn to DVD+R (DL), my process works all the time now (since my BD player accepts them correctly now since the after firmware-upgrade, I have even made one with DTS-MA :) ) The player i have is a Panasonic BD30, streaming the audio to a Onkyo TX SR875 for HiRez audio, all my discs have so far also worked on my friends (EU) PS3.
For encoding i sometimes use a simple command-line .BAT, but sometimes i use MeGUI. I'll give the .BAT here, comment on it if you like !
Before that i want to comment on the 3x speed that is claimed for AVCHD / BD9. I think that it has to be 2x speed in stead of 3x speed. If i go higher, my player starts stuttering. Also i have discussed this subject before (with a.o. DS / Sagittaire and jdobbs in the " BD rebuilder & BD backup" tread in the DVD rebuilder part of this forum). There seems to be a difference of opinion, even between several sites that have all the specifications listed (2x vs. 3x). My experience gives that 2x works all the time, going higher gives problems sometimes.
EDIT: I tried starting a thread where all info about the AVCHD / BD could be centralized, but i never took off (too bad: We see separate thread concerning this popping up in all parts of the forum now). Anyway, the TS i made there contains a lot of useful links to/from information about this subject. See the thread here, and maybe we can put some more info there as well :) click (http://forum.doom9.org/showthread.php?t=141376)
I use this short .BAT for encoding;
I Use a keyframe-interval of max 1 second (so keyframe-interval == framerate, rounded off), min-keyint=1.
@SET IN_TITLE="........"
@SET IN_BITRATE= .....
@set IN_EXTRA= (Extra options, for instance --zones 0,128800,b=1/128801,140153,b=0.5, not between "")
@Echo off
Echo .
Echo .
Echo .
Echo .[ %IN_TITLE% ] [%TIME% ] Encoding Pass 1
Echo .
Echo .
Echo .
"path to x264.exe\x264.exe" --threads auto --thread-input --progress --no-psnr --no-ssim "%IN_TITLE%.AVS" --stats "%IN_TITLE%.stats" --output NUL --pass 1 --bitrate %IN_BITRATE% --vbv-bufsize 22000 --vbv-maxrate 16000 --level 4.1 --keyint set yourself --min-keyint 1 --nal-hrd --aud --sar 1:1 --bframes 3 --b-adapt 2 --b-pyramid --weightb --ref 3 --mixed-refs --no-fast-pskip --ipratio 1.2 --pbratio 1.2 --direct auto --subme 2 --trellis 2 --psy-rd 0.8:0.7 --partitions none --me dia --merange 24 --mvrange 511 --aq-strength 0.9 --cqmfile "path to eqm_avc_hr.cfg\eqm_avc_hr.cfg" %IN_EXTRA%
Echo .
Echo .
Echo .
Echo .[ %IN_TITLE% ] [%TIME% ] Encoding Pass 2
Echo .
Echo .
Echo .
"path to x264.exe\x264.exe" --threads auto --thread-input --progress --no-psnr --no-ssim "%IN_TITLE%.AVS" --stats "%IN_TITLE%.stats" --output "%IN_TITLE%.264" --pass 2 --bitrate %IN_BITRATE% --vbv-bufsize 22000 --vbv-maxrate 16000 --level 4.1 --keyint set yourself --min-keyint 1 --nal-hrd --aud --sar 1:1 --bframes 3 --b-adapt 2 --b-pyramid --weightb --ref 3 --mixed-refs --no-fast-pskip --ipratio 1.2 --pbratio 1.2 --direct auto --subme 9 --trellis 2 --psy-rd 0.8:0.7 --partitions all --8x8dct --me umh --merange 24 --mvrange 511 --aq-strength 0.9 --cqmfile "path to eqm_avc_hr.cfg\eqm_avc_hr.cfg" %IN_EXTRA%
Echo .
Echo .
Echo .
Echo .[ %IN_TITLE% ] [%TIME% ] Encoding Finished !
Pause
PS: Others speak only of keyframe-interval of 24, so try with a DVD-RW to see what works best.
laserfan
9th December 2008, 16:05
So is there someone who can post an x264 command line that complies totally to the Blu-ray specs (so for SAPs and PS3 and everything)?
Not possible, so you'll need to find someone you trust e.g. G_M_C or jdobbs etc. and go with their command lines. Not only are there (sometimes wildly) different opinions about compliance, it's my understanding that some of the BD specs are in a way being Guessed-At, i.e. at least one or two of the "BD-compliance" options are assumed, based upon examination of the settings & output of so-called "professional mastering applications".
So make some x264 movies and get them to play for you. If you want/need/insist they be "universally playable" then a mod here might challenge you to explain why, as in most countries sharing-or-selling copyrighted material is illegal, or at least unethical! :p
Sagittaire
9th December 2008, 20:06
Before that i want to comment on the 3x speed that is claimed for AVCHD / BD9. I think that it has to be 2x speed in stead of 3x speed. If i go higher, my player starts stuttering. Also i have discussed this subject before (with a.o. DS / Sagittaire and jdobbs in the " BD rebuilder & BD backup" tread in the DVD rebuilder part of this forum). There seems to be a difference of opinion, even between several sites that have all the specifications listed (2x vs. 3x). My experience gives that 2x works all the time, going higher gives problems sometimes.
- Now x264 have really better vbv support. Set simply max bitrate at 3x your max bitrate (it's enought in vaste majority of case) with 24 Mbps limit for BD9 (you must mux audio too ... DVD3x is for complete video/audio/sub mux and m2ts mux is not really optimal).
- GOP must be at 1 sec if you use max bitrate > 15 Mbps and 2 sec for max bitrate < 15 Mbps (24 or 48 frames for 1080p24).
moviefan
9th December 2008, 20:19
So "video max bitrate + audio < 24 Mbps" for BD9 correct? Actually: VBV max bitrate = 24 Mbps - total audio bitrate?
Sagittaire
9th December 2008, 21:07
So "video max bitrate + audio < 24 Mbps" for BD9 correct? Actually: VBV max bitrate = 24 Mbps - total audio bitrate?
Not exactly ...
DVD1x = 10.08 Mbps
DVD3x = 30.24 Mbps
With 24 Mbps for video you have 6,24 Mbps for other stream (PCM, DD, DTS, TrueHD and subtitles). For BD9 overall bitrates are generaly at 6-8 Mbps and 24 Mbps for max bitrate is 3:1 ratio (generaly good for this overall bitrate).
laserfan
9th December 2008, 22:48
Not exactly ...
DVD1x = 10.08 Mbps
DVD3x = 30.24 Mbps
With 24 Mbps for video you have 6,24 Mbps for other stream (PCM, DD, DTS, TrueHD and subtitles). For BD9 overall bitrates are generaly at 6-8 Mbps and 24 Mbps for max bitrate is 3:1 ratio (generaly good for this overall bitrate).Funny you would jump-in here Sagittaire (thanks for this), I was going to refer moviefan to your thread here (http://forum.doom9.org/archive/index.php/t-137569.html) for addt'l good info on BR compatibility! :)
moviefan
9th December 2008, 23:02
So to exhaust the given boundaries for Blu-ray compatibility, could I calculate the VBV max bitrate with
VBV max bitrate = 30.24 Mbps - total audio bitrate?
Comatose
10th December 2008, 11:07
I would round down to 30Mbps so you have a little head room, just to be safe.
Sagittaire
10th December 2008, 11:11
So to exhaust the given boundaries for Blu-ray compatibility, could I calculate the VBV max bitrate with
VBV max bitrate = 30.24 Mbps - total audio bitrate?
For BD9 use always 24 Mbps. Use more than with overall bitrate at 6-8 Mbps with 30 KB buffer is simply useless and potentialy bad for compliance at the mux.
G_M_C
10th December 2008, 22:10
For BD9 use always 24 Mbps. Use more than with overall bitrate at 6-8 Mbps with 30 KB buffer is simply useless and potentialy bad for compliance at the mux.
OK; Let define the --max-rate as: "30000 (kbps) -/- audio bitrate (kbps), with a maximum of 24000 (kbps)". (given that some highres audio streams might have higher bitrates than 6 mbps).
What do we set as definition / calculation for the vbv-bufsize ? Is there a specification set for bluray players for the minimum required vbv-bufsize ? Or is it best to leave it set to "auto" while encoding with x264 ?
PS: I want to test these new settings first, before I consider them as "correct"; Especially because my current settings work all the time !
EDIT:
OOps, I read now that you speak of a buffer of 30000 (30 KB), is that the value we best use for VBV-bufsize ?
rack04
10th December 2008, 22:22
So what is a safe vbv-maxrate for DVD 5/9 using 640kbps audio?
Also, should min-keyint be set to 2 sec for max bitrate < 15 Mbps for DVD 5/9?
Dark Shikari
10th December 2008, 22:26
So what is a safe vbv-maxrate for DVD 5/9 using 640kbps audio?
Also, should min-keyint be set to 2 sec for max bitrate < 15 Mbps for DVD 5/9?The Blu-ray spec does say that if VBV maxrate is <= 15 mbps, you can use a 2-second GOP.
G_M_C
11th December 2008, 10:12
So what is a safe vbv-maxrate for DVD 5/9 using 640kbps audio?
Also, should min-keyint be set to 2 sec for max bitrate < 15 Mbps for DVD 5/9?
30000 - 640 is still larger than 24000, so use 24000 (the max Sagittaire advises). If you do that and it works, could you report back to confirm these settings are correct ?
rack04
11th December 2008, 13:48
So what is the max bitrate for a DVD?
According to jdobbs:
The rules for BD on DVD-5/9 is to have a maximum that doesn't exceed 2x disc speed. That would mean the total read bitrate available is somewhere slightly under 20,000
If you do that and it works, could you report back to confirm these settings are correct ?
Only way I can test is using the Blu-ray drive I have installed on my computer. So it will play almost everything. Though, I do have a Panasonic BD-35 siting under the Christmas tree. :rolleyes:
G_M_C
11th December 2008, 14:33
So what is the max bitrate for a DVD?
According to jdobbs:
Only way I can test is using the Blu-ray drive I have installed on my computer. So it will play almost everything. Though, I do have a Panasonic BD-35 siting under the Christmas tree. :rolleyes:
Yep, the setting i use in my .BAT were made based on those figures from jdobbs. That why i'm not sure 3x speed is true, and i ask for confirmation.
moviefan
11th December 2008, 22:53
Hm, what exactly is the difference between --VBV-maxrate and --VBV-bufsize? I assume --VBV-maxrate sets the maximum bitrate for the video stream, right? And which option depends on the disc speed/data transfer rate of a DVD? Can someone please clarify this?
shon3i
11th December 2008, 23:32
We can't use same settings as we use for normal BD 25/50 disc's and probalby is better idea to follow AVCHD specs which clearly show that 18mbps are max for BD9/BD5, and buffer should never exceed 16000.
I aslo found i Unlead Video Studio 11.5 in their BD5/9 profiles (not AVCHD) maxrate is 15000 and buffer is on 8000, i cheched their forums and saw that these settings are 100% working on sap's, most people's don't have any trouble with their encoder and profiles.
Anyway i started to use these settings and i don't have any problem with any bitrate.
Sagittaire
11th December 2008, 23:38
We can't use same settings as we use for normal BD 25/50 disc's and probalby is better idea to follow AVCHD specs which clearly show that 18mbps are max for BD9/BD5, and buffer should never exceed 16000.
I aslo found i Unlead Video Studio 11.5 in their BD5/9 profiles (not AVCHD) maxrate is 15000 and buffer is on 8000, i cheched their forums and saw that these settings are 100% working on sap's, most people's don't have any trouble with their encoder and profiles.
Anyway i started to use these settings and i don't have any problem with any bitrate.
Certainely but AVCHD is not BD9 ... and spec come directly from BD specification. Anyway it's never an obligation to use the limit value.
shon3i
12th December 2008, 00:01
Certainely but AVCHD is not BD9 ... Agree, but aslo BD 5/9 are not same as BD25/50, and we can't use same settings (-vbv-buffer 30000, -vbv-maxrate 40000) , so it is logical to follow the standard that is at least on the same medium
ajp_anton
12th December 2008, 03:38
Hm, what exactly is the difference between --VBV-maxrate and --VBV-bufsize? I assume --VBV-maxrate sets the maximum bitrate for the video stream, right? And which option depends on the disc speed/data transfer rate of a DVD? Can someone please clarify this?This is just what I figured out only from the names, someone correct me if I'm wrong:
For each interval of [bufsize] bits, the average bitrate must not exceed [maxrate] bits/s.
Which means that the decoder will never have to decode [bufsize] bits in less than [bufsize/maxrate] seconds.
moviefan
14th December 2008, 16:04
@ G_M_C: Is there a special reason, why you don't use --filter in your encoding batch file posted in https://forum.doom9.org/showthread.php?p=1222262#post1222262? I started a test encode using your settings and I am very content with the results so far (in terms of quality - I cannot test compatibility yet since I have no BD SA player).
nm
14th December 2008, 16:34
@ G_M_C: Is there a special reason, why you don't use --filter in your encoding batch file
Maybe he's fine with the default inloop deblocking settings.
G_M_C
14th December 2008, 19:20
@ G_M_C: Is there a special reason, why you don't use --filter in your encoding batch file posted in https://forum.doom9.org/showthread.php?p=1222262#post1222262? [...]
Maybe he's fine with the default inloop deblocking settings.
Yes, i leave it to x264's default settings (--filter == --deblock, default according to --longhelp is 0,0).
[...]
I started a test encode using your settings and I am very content with the results so far (in terms of quality - I cannot test compatibility yet since I have no BD SA player).
Thx, glad you like it :)
lexor
14th December 2008, 20:09
The Blu-ray spec does say that if VBV maxrate is <= 15 mbps, you can use a 2-second GOP.
you have the actual blu-ray spec at hand? could you forward relevant parts to the nal-hrd devs so they can re-make that patch using the official spec as opposed to guess work, so aku will withdraw his objection to have it committed?
I think one of doom9's mods is main dev on that (Tbarry? /speeling), or at least he wrote it.
Dark Shikari
14th December 2008, 21:18
you have the actual blu-ray spec at hand? could you forward relevant parts to the nal-hrd devs so they can re-make that patch using the official spec as opposed to guess work, so aku will withdraw his objection to have it committed?"Type 2" HRD conformance is what is required... which is specified in the H.264 spec itself (Annex C)
I can't confirm or deny having the Blu-ray spec ;)
Sharktooth
14th December 2008, 21:33
and it is so controversial it seems it was written by someone with a very bad mental disorder...
Sagekilla
15th December 2008, 07:20
A simple google brought this up if it helps any:
http://www.itu.int/rec/T-REC-H.264-200711-I/en
Fishman0919
15th December 2008, 17:44
So what is the max bitrate for a DVD?
According to jdobbs:
The rules for BD on DVD-5/9 is to have a maximum that doesn't exceed 2x disc speed. That would mean the total read bitrate available is somewhere slightly under 20,000
Only way I can test is using the Blu-ray drive I have installed on my computer. So it will play almost everything. Though, I do have a Panasonic BD-35 siting under the Christmas tree. :rolleyes:
From Wikipedia BD9/BD5 Blu-ray Disc
BD9 and BD5 are lower capacity variants of the Blu-ray Disc that contain Blu-ray compatible video and audio streams contained on a conventional DVD (650 nm wavelength / red laser) optical disc. Such discs offer the use of the same advanced compression technologies available to Blu-ray discs (including H.264/MPEG-4 AVC, VC-1 and MPEG-2) while using lower cost legacy media. BD9 uses a standard 8152MB DVD9 dual-layer disc while BD5 uses a standard 4482MB DVD5 single-layer disc.[87]
BD9/BD5 discs can be authored using home computers for private showing using standard DVD±R recorders. AACS digital rights management is optional.[88] The BD9/BD5 format was originally proposed by Warner Home Video, as a cost-effective alternative to regular Blu-ray Discs.[89] It was adopted as part of the BD-ROM basic format, file system, and AV specifications. BD9/BD5 is similar to 3× DVD for HD DVD.
3x spin speed would give you about 30000 Max bitrate
laserfan
15th December 2008, 21:01
3x spin speed would give you about 30000 Max bitrateWhich is what Sagittaire has been saying right along, and seems clearly correct.
As for AVCHD, that spec is for other hardware e.g. camcorders, and while encodings which meet that lesser spec should work, no reason to limit ourselves wrt BD5/9.
I use 24000 for max (video-only) bitrate and 30000 for vbv.
G_M_C
15th December 2008, 21:40
Which is what Sagittaire has been saying right along, and seems clearly correct.
As for AVCHD, that spec is for other hardware e.g. camcorders, and while encodings which meet that lesser spec should work, no reason to limit ourselves wrt BD5/9.
I use 24000 for max (video-only) bitrate and 30000 for vbv.
That would be good enough i think;
Look at this site; http://handbrake.dynaflashtech.net/cgi-bin/vbv_calculator.cgi
And fill this in:
A video encoded with an avg. bitrate of 10000 kbps (doesnt really matter), 24 fps, max-rate 24000 and vbv-bufsize 30000.
The calculation then gives a peak bitrate of 54000 for a duration of 1 second. And i seem to remember that value from somewhere in the specs (or am i missing something, i.e missing the point here ?)
Atak_Snajpera
15th December 2008, 22:41
AVCHD camcorders (Canon for example) use High Profile level 4.0 so according to wiki maximum bitrate should not be higher than 25000 kbps
ajp_anton
16th December 2008, 00:00
BTW, what are the supported resolutions/framerates? I have a PAL source that needs to be put on DVD5s. It's well over 3 hours plus extras so mpeg2 would suck without going to dual-discs.
moviefan
16th December 2008, 00:13
Maybe this helps: https://forum.doom9.org/showthread.php?p=1116120#post1116120
moviefan
16th December 2008, 22:30
What can I do against banding? I know this is an x264 issue... I have 1080p footage filtered with MCTemporalDenoise so that it is pretty clean and temporal stable. After the filtering there is no banding but also almost no grain (really clean). I have raised the --aq-strength to 1.2, but there's still banding visible. Any suggestions? I have a bitrate of about 6800 kbit/s average.
Dark Shikari
16th December 2008, 22:40
What can I do against banding? I know this is an x264 issue... I have 1080p footage filtered with MCTemporalDenoise so that it is pretty clean and temporal stable. After the filtering there is no banding but also almost no grain (really clean). I have raised the --aq-strength to 1.2, but there's still banding visible. Any suggestions? I have a bitrate of about 6800 kbit/s average.You can use lower deadzones, higher psy-rd, and/or psy trellis.
moviefan
17th December 2008, 14:17
What happens, if I lower the deadzones with detailed areas since I don't change the average bitrate. So I think more bits are allocated to the flat areas (which have more detail now), but what is the impact on detailed parts of the image?
G_M_C
18th December 2008, 10:39
What happens, if I lower the deadzones with detailed areas since I don't change the average bitrate. So I think more bits are allocated to the flat areas (which have more detail now), but what is the impact on detailed parts of the image?
I think you might try working with the psy-rd settings;
Warning: I have no exact understanding, if any understandig at all about AQ /psy-rd and such. What I write here is only the way I think it works (correct me if i'm wrong, so I can understand better).
AQ moves bits from frames with less need to frames with more need (more movement for instance). So bits can be taken from frames where a blue sky is prominent, and moved to somewhere else ... leaving the sky with not enough bits to avoid banding. Lowering AQ makes this effect less, and moves less bits (and thus loweres the chance for banding).
I've allready lowered AQ to 0.9 (1.0 is standard) in my .BAT, so it is allready a bit lower, and it might not be the first place to look.
But as I understand it, psy-RD works more-or-less the other way around than AQ does. It tries to leave more bits in areas like the sky mentioned above, so as to give the impression of more details in the frame.
I've lowered psy-rd to 0.8 because I allready have lowered AQ, trying to balance out the two. After looking at a few of my encodes, I think i'll put it back to 0.9 cause I see slight banding also.
I've put psy-rd on b-frames on 0.7, cause i find it gives the impression of a slightly sharper image. But that effect sharpening could also cause the image show banding. You could try to lower it a bit.
Dark Shikari
18th December 2008, 10:41
I think you might try working with the psy-rd settings;
Warning: I have no exact understanding, if any understandig at all about AQ /psy-rd and such. What I write here is only the way I tink it works now (correct me if i'm wrong, so I can understand better).
AQ moves bits from frames with less need to frames with more need (more movement for instance). So bits can be taken from frames where a blue sky is prominent, and moved to somewhere else ... leaving the sky with not enough bits to avoid banding. Lowering AQ makes this effect less, and moves less bits (and thus loweres the chance for banding).The exact opposite. AQ will add bits to the sky because AQ moves bits from high detail areas and edges to less detailed areas.
But as I understand it, psy-RD works more-or-less the other way around than AQ does. It tries to leave more bits in areas like the sky mentioned above, so as to give the impression of more details in the frame.
I've lowered psy-rd to 0.8 because I allready have lowered AQ, trying to balance out the two. After looking at a few of my encodes, I think i'll put it back to 0.9 cause I see slight banding also.No, psy-RD doesn't explicitly go in any particular direction, though it does tends to add more bits to flat blocks just as AQ does.
G_M_C
18th December 2008, 10:56
The exact opposite. AQ will add bits to the sky because AQ moves bits from high detail areas and edges to less detailed areas.
No, psy-RD doesn't explicitly go in any particular direction, though it does tends to add more bits to flat blocks just as AQ does.
Ahhh, i see; Thanx for the correction.
For avoiding banding setting / leaving AQ to it's default of 1.0 would be a good place to start adjusting my settings. I'll leave the psy-rd to the settings i use now, and expiriment. I can allways adjust them.
But getting a "standard" will not work anyway, cause in my expireance all sources are different, and so will all encodes and their settings. But I do want to get to a good average setting, like a "good place to start of from" and ajusting from there :).
bond
21st December 2008, 10:05
1) is it already for sure known which resolutions (including anamorphic resize settings) and corresponding framerates are supported for bluray on dvd?
eg is it possible to reencode a dvd on bluray without changing resolution, anamoprhic resize settings and framerate?
2) are dvd5s supported as official bluray disc?
G_M_C
21st December 2008, 10:54
1) is it already for sure known which resolutions (including anamorphic resize settings) and corresponding framerates are supported for bluray on dvd?
eg is it possible to reencode a dvd on bluray without changing resolution, anamoprhic resize settings and framerate?
2) are dvd5s supported as official bluray disc?
For reso an framerate see here (under techical specs); http://en.wikipedia.org/wiki/Blu-ray_Disc
So it seems you cant reencode DVD's the way you describe.
DVD5's work on my player.
bond
21st December 2008, 11:28
For reso an framerate see here (under techical specs); http://en.wikipedia.org/wiki/Blu-ray_Disc
So it seems you cant reencode DVD's the way you describe.720x576 50-i 4:3/16:9
does this mean progressive dvds need to be reencoded as interlaced? how crappy is this
G_M_C
21st December 2008, 11:55
720x576 50-i 4:3/16:9
does this mean progressive dvds need to be reencoded as interlaced? how crappy is this
Not really, at least if you dont plan to stick with SD video like me. But if you want to do SD DVD -> SD-BD9 conversion, yes then it's crappy. But the BD(9) format is developed for High Def, so that;s probably the reason for crappy SD quality.
Dark Shikari
21st December 2008, 11:56
720x576 50-i 4:3/16:9
does this mean progressive dvds need to be reencoded as interlaced? how crappy is thisThe Blu-ray spec allows 50fps progressive content AFAIK, including a "625/50" video format that can code 576-height PAL video.
moviefan
21st December 2008, 13:11
So do I need to duplicate frames for PAL SD content to be authored for Blu-ray format? 720x576@50p = framerate doubling, if the source is 720x576@25p?
Atak_Snajpera
21st December 2008, 13:56
so do i need to duplicate frames for pal sd content to be authored for blu-ray format? 720x576@50p = framerate doubling, if the source is 720x576@25p?
no...
moviefan
21st December 2008, 14:39
720x576@25p is ok?
Atak_Snajpera
21st December 2008, 15:55
Why do you ask once again??????
ajp_anton
21st December 2008, 15:57
So both 720x576@25p and 50p are OK =)
http://forum.doom9.org/showthread.php?p=1116120#post1116120 says only 50i...
moviefan
26th December 2008, 13:59
As I mentioned in post #47, I experience ugly banding with my rather clean source. I tried higher --aq-strength values up to 3.0 (which is pretty dumb, but I wanted to at least try it) which didn't help much... Very high strengh values still resulted in banding, but detailed areas looked pretty bad too. I also tried varying the psy-rdo values, but that didn't help either. My source has a slight gradient in the area where banding appears. I have improved the gradient using gradfun2db(), I also added grain, but even the grain did not prevent the encoder from creating banding. Any ideas?
Dark Shikari
26th December 2008, 14:21
As I mentioned in post #47, I experience ugly banding with my rather clean source. I tried higher --aq-strength values up to 3.0 (which is pretty dumb, but I wanted to at least try it) which didn't help much... Very high strengh values still resulted in banding, but detailed areas looked pretty bad too. I also tried varying the psy-rdo values, but that didn't help either. My source has a slight gradient in the area where banding appears. I have improved the gradient using gradfun2db(), I also added grain, but even the grain did not prevent the encoder from creating banding. Any ideas?Lower deadzones or psy trellis can further bias against banding. No-dct-decimate can help as well.
moviefan
26th December 2008, 15:03
Oh, sorry, I forgot to mention that I also set the deadzones to 4, which is very low according to my knowledge and it did not help. What does no-dct-decimate do exactly?
Dark Shikari
26th December 2008, 16:22
What does no-dct-decimate do exactly?It turns off decimation in P-frames. Decimation removes lone coefficients in cases where bit-wise they are overly expensive, but this may not be entirely ideal in the case where you want tons of wasted coefficients thrown around everywhere for the purpose of just making sure there's no banding.
Also, psy-trellis, try it.
moviefan
28th December 2008, 12:19
I have tried encoding with psy-trellis from 0.0 to 1.5, no visible effect... There is still obvious banding which is very annoying. I am going uploading a sample clip of 89 frames (1 scene) from my filtered source encoded with Lagarith YV12 (size ~66 MB). The banding appears on the top left part of the picture. If you encode it with x264, you will see the banding very clearly. Maybe you could have a look at it and help me getting rid of this disturbing effect.
Sample clip:
http://www.mediafire.com/?sharekey=d1c0c5e35af3151c91b20cc0d07ba4d2d3907badf0416b8a
G_M_C: The source also shows banding in that area, but it is slightly covered by grain and not so obvious due to the very high bitrate.
Dark Shikari: I also added grain, even a lot of grain and it did not help. Even at average bitrates of 12000 kbps, the banding was clearly visible.
G_M_C
28th December 2008, 12:54
I have tried encoding with psy-trellis from 0.0 to 1.5, no visible effect... There is still obvious banding which is very annoying. I am going uploading a sample clip of 89 frames (1 scene) from my filtered source encoded with Lagarith YV12 (size ~66 MB). The banding appears on the top left part of the picture. If you encode it with x264, you will see the banding very clearly. Maybe you could have a look at it and help me getting rid of this disturbing effect.
<link to sample coming soon>
Yes, an example would be great. Banding is often already present in the source .... also banding is sometimes caused by the Avisynth filtering used. Might be useful to see your script too.
Dark Shikari
28th December 2008, 13:24
You might find that a bit of AddGrain() can resolve banding rather well... ;)
Sharc
28th December 2008, 13:47
Hmmm...., perhaps some kind of "adaptive AddGrain()" should be added to x264, similar to AQ. I observed this banding as well, e.g. the flat blue sky at the beginning of "The Bucket List" -- despite AQ, psy-rd and psy-trellis and relative high avarage bitrate of around 4000 kbps IIRC.
Actually Xvid and DivX looked more pleasant in that scene, at a comparable bitrate. Apart from this banding all Gold Medals go to x264.
Dark Shikari
28th December 2008, 13:51
Hmmm...., perhaps some kind of "adaptive AddGrain()" should be added to x264, similar to AQ. I observed this banding as well, e.g. the flat blue sky at the beginning of "The Bucket List" -- despite AQ, psy-rd and psy-trellis and relative high avarage bitrate of around 4000 kbps IIRC.
Actually Xvid and DivX looked more pleasant in that scene, at a comparable bitrate. Apart from this banding all Gold Medals go to x264.Oh, I forgot the last method. Turn off or reduce deblocking (reduce probably better). That's why Xvid and DivX don't band as much. :)
In some cases it is impossible at the current quantizer to retain a certain level of extremely fine detail due to deblocking. The solution x264 uses is in the form of AQ--if it can get the quantizer below 16 - deblockbeta*2 (I think), deblocking won't activate at all.
moviefan
28th December 2008, 15:14
I have uploaded the sample clip. Link is in here: http://forum.doom9.org/showthread.php?p=1228967#post1228967
Sharc
28th December 2008, 17:38
Oh, I forgot the last method. Turn off or reduce deblocking (reduce probably better). That's why Xvid and DivX don't band as much. :)
Good to know. My settings for deblocking were (-1,-1). Maybe I should have reduced it even more.
Sagittaire
28th December 2008, 18:01
I have uploaded the sample clip. Link is in here: http://forum.doom9.org/showthread.php?p=1228967#post1228967
Here quick encoding with Dithering.
http://jfl1974.free.fr/Sample/Dithering.mp4
With other filter for reduce noise in dark area it's possible to obtain very better quality but it's just a quick encoding.
The good way for reduce banding is dithering at pre-process. Don't forget to use the good space color at playback if you use PC (TVscale to PCscale with coreAVC for exemple).
moviefan
28th December 2008, 18:17
How did you exactly achieve your result??? It looks amazing! I would love to reproduce it! Or is it just extreme bitrate? I aim at encoding with an average bitrate of 5900 kbps.
Atak_Snajpera
28th December 2008, 22:21
My command line
--crf 22 --sar 1:1 --level 4.0 --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --mixed-refs --bframes 3 --b-adapt 1 --weightb --direct auto --subme 7 --trellis 1 --partitions all --8x8dct --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "F:\temp\RipBot264temp\video.264"
result without adding grain because source already has grain :)
http://www.mediafire.com/?m2nbjzm5w3v
moviefan
29th December 2008, 11:24
Why is Atak_Snajpera's sample from post #76 brighter than Sagittaire's from post #75? Which one is in the correct colour space and if it is Sagittaire's, how did you achieve it? My encodes, in terms of brightness, looked like Atak_Snajpera's.
Atak_Snajpera
29th December 2008, 20:15
It looks like Sagittaire applied TV -> PC conversion in script (16 - 235) -> (0 - 255 FULL RGB)
You can achieve the same result in RipBot264
moviefan
30th December 2008, 10:21
But the question is, whether the conversion is necessary or not, since it is not DVD material...
Atak_Snajpera
30th December 2008, 18:23
I wonder why you encoded to Lagarithm??? When I import .m2ts or .evo directly I always get full RGB.
moviefan
31st December 2008, 01:45
Because the sample I uploaded is preprocessed with heavy avisynth filters which reduce encoding speed with x264 to something like 0.1 fps or so. Doing two-pass, it would take far too long to encode...
Sagittaire
31st December 2008, 09:22
Because the sample I uploaded is preprocessed with heavy avisynth filters which reduce encoding speed with x264 to something like 0.1 fps or so. Doing two-pass, it would take far too long to encode...
your pre-process is not really good. You use RGB for logarith encoding?
moviefan
31st December 2008, 11:31
Why is it not good? Please explain in more detail, how you see that and what I have to improve. I use YV12 output for lagarith + VirtualDub (current version).
Also another problem: When there is a slow fade-in from black to the actual video, x264 messes this part totally up! The quantizer chosen is far to low and the picture is very blocky and blurry. Is there a general setting I have not thought of that takes care of fade-ins? The only way that comes to my mind is to define a zone for these frames and raise the quantizer by hand...
rack04
2nd January 2009, 03:42
I just finished tested a AVCHD/BD on DVD-9 using the following x264 command line:
"%x264_PATH%" --pass 2 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%.stats" --level 4.1 --keyint 24
--min-keyint 1 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 7 --trellis 2
--partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-bufsize 30000 --vbv-maxrate 24000 --qcomp 0.5 --me umh --merange 24 --threads auto
--thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.h264"
"%INPUT_VIDEO%" --mvrange 511 --aud --nal-hrd
It looks and plays fantastic on my Panasonic BD35.
G_M_C
2nd January 2009, 11:12
I just finished tested a AVCHD/BD on DVD-9 using the following x264 command line:
"%x264_PATH%" --pass 2 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%.stats" --level 4.1 --keyint 24
--min-keyint 1 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 7 --trellis 2
--partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-bufsize 30000 --vbv-maxrate 24000 --qcomp 0.5 --me umh --merange 24 --threads auto
--thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.h264"
"%INPUT_VIDEO%" --mvrange 511 --aud --nal-hrd
It looks and plays fantastic on my Panasonic BD35.
--partitions p8x8,b8x8,i4x4,i8x8
Since a couple of revisions of x264 ago, you can safely use --partitions all, I've been using it without problems and i perceive a very slight quality improvement (but it can also be subjective).
MadMonkey57
2nd January 2009, 13:03
I've encoded plenty of backups to red laser DVD to play on my Pana BD35 but none of them are played @24p. Could this have anything to do with x264 settings ? (i use Sharktooth's Blu Ray profile with --vbv-maxrate 15000 --vbv-bufsize 15000 if it matters)
Thank you guys.
lexor
2nd January 2009, 17:13
I've encoded plenty of backups to red laser DVD to play on my Pana BD35 but none of them are played @24p. Could this have anything to do with x264 settings ? (i use Sharktooth's Blu Ray profile with --vbv-maxrate 15000 --vbv-bufsize 15000 if it matters)
Thank you guys.
What fps are they played at? Hard to make suggestions if we don't know what's happening to the frame rate. A DVD should be at 23.976 btw, in case you were expecting a constant 24.
MadMonkey57
2nd January 2009, 17:29
What fps are they played at? Hard to make suggestions if we don't know what's happening to the frame rate. A DVD should be at 23.976 btw, in case you were expecting a constant 24.
All right, my fault, wasn't clear enough...
My SAP and LCD both have this nice "24p" feature (Sony calls it "24p True Cinema"), that is the video plays at exactly 24 frames per second, LCD refreshes 24 (48 maybe 72) times per second and the SAP throws exactly 24 frames untouched.
When the disc is inserted, the SAP and LCD "agree", and the LCD switches to 1080/24p.
This feature works fine with the original BD and not at all with the backup. I was wondering if it could come from the settings used in x264.
rack04
7th January 2009, 14:37
How does --vbv-bufsize and --vbv-maxrate effect the quality? I'm using --vbv-bufsize 30000 --vbv-maxrate 24000 for my AVCHD/BD encodes and I'm experiencing lag and general unresponsive behavior when fast forwarding and rewinding on my BD35. Could the --vbv-bufsize and --vbv-maxrate have any effect on the functions?
laserfan
7th January 2009, 16:10
How does --vbv-bufsize and --vbv-maxrate effect the quality? I'm using --vbv-bufsize 30000 --vbv-maxrate 24000 for my AVCHD/BD encodes and I'm experiencing lag and general unresponsive behavior when fast forwarding and rewinding on my BD35. Could the --vbv-bufsize and --vbv-maxrate have any effect on the functions?I don't think those are a factor in FF/RW. Your keyint of 24 oughta assure plenty of I-frames to seek to/with. Are you muxing w/tsMuxeR? Using fixclpi after?
rack04
7th January 2009, 16:43
I don't think those are a factor in FF/RW. Your keyint of 24 oughta assure plenty of I-frames to seek to/with. Are you muxing w/tsMuxeR? Using fixclpi after?
Yes, I'm using tsMuxeR to do the authoring. Although, I'm not applying fixclpi on the tsMuxeR output because of the known issues with the fix and BD35. Using fixclpi causes the disc to be unplayable.
laserfan
7th January 2009, 19:05
Yes, I'm using tsMuxeR to do the authoring. Although, I'm not applying fixclpi on the tsMuxeR output because of the known issues with the fix and BD35. Using fixclpi causes the disc to be unplayable.Ah yes, I remember that now! I'm guessing then that you're caught between a rock (broken clpi file that fixclpi fixes for some-but-not-all players) and a hard place (the BD35 is one of those can't-play players). If the clpi file is indeed to blame, maybe jdobbs will find more problems with it in the course of his BD RB development, or the tsMuxeR guys will find/fix all probs w/their muxer. But I think the clpi might be your problem--what other freeware apps can mux to BDMV anyway I wonder?
Esurnir
8th January 2009, 16:46
--partitions p8x8,b8x8,i4x4,i8x8
Since a couple of revisions of x264 ago, you can safely use --partitions all, I've been using it without problems and i perceive a very slight quality improvement (but it can also be subjective).
What was the problem ? I recently noticed that p4x4 is disabled and Level 3+ in megui.
G_M_C
8th January 2009, 16:54
What was the problem ? I recently noticed that p4x4 is disabled and Level 3+ in megui.
DS knows it better, the thing i remembered was that it had soething to do with lower quality. But X264 was improved, and P4x4 can only improve quality now, but its effect smal and generally only noticable with higher bitrates.
ericf
9th January 2009, 00:05
I have a Panasonic BD-50 and I've had some playability problems. The discs (AVCHD DVD) I've tried to play recently can't fast forward or move to the next chapter or the player stops and, after a while, starts from the beginning.
These are anime discs of Freedom and GITS 2.0. Others I tried didn't play at all. The reference frames (3) and AVC profile (4.1) are correct so I don't know why I can't get them to fast forward or move between chapters. Tried remuxing with different chapter structure but that didn't work. Removien the 00 chapter makes the disc unplayable. Any ideas?
Thanks.
ericf
alc0re
9th January 2009, 05:12
Looks like I found the right thread here for my question.
I've posted my question on a few different threads and haven't had any good answers yet, but I think this is the right thread.
I've been learning to transcode blurays to BD9. I've been manually doing what RipBot264 does automatically. My process involves using eac3to to strip the elementary streams, transcoding the video to lower bitrate and changing the resolution to 1280x720p using MeGUI and Ryu77's AVCHD profile, OCR'ing the .sup subtitles using suprip, and muxing with tsMuxer.
Here's the issue I have : My video stutters when playing on my panasonic bd35. Plays perfectly on on pc, but not on my tv through my bd35 sap. Its not a FPS issue during encoding (encoding avs script using 23.976 FPS.) Its also not my tv since the original bluray (or hd-dvd) plays perfectly on my tv. For kicks this morning before I left for work I transcoded the Matrix 3 using RipBot264 instead of MeGUI. I used RipBot's bluray profile, and targeted the size to fit on a single layer dvd instead of my normal dual layer dvd target size. I'm watching that AVCHD BD5 on my sap and there's no stuttering. Why is it stuttering when I do the process manually and not when using RipBot264? What could be causing the stuttering? My only guesses are 1) the x264 encoding/profile settings 2) the level (RipBot's bluray profile is high@L4.0 and the one I'm using with MeGUI is high@L4.1) 3) The muxing process with tsMuxer 4) The bitrate. To fit it on a single layer dvd the bitrate is like 3800 which is pretty far below my normal transcoding bitrate or 5) the medium. I burned RipBot's output to a single layer verbatim disc and my normal ones are burnt to a dual layer memorex dvd (before I researched and found that verbatim make better blank dvds.)
Please excuse my nubbiness...this thread seems to be mostly inhabited by much more experienced transcoders than I.
PS...what MeGUI profile is best in terms of both compability with my panasonic bd35 sap and quality?
EDIT/UDPATE : I figured out the problem. The panasonic BD35 does not like avchd BD5/9 video encoded @ Level 4.1. I re-muxed one of my problem movies with tsMuxer option to change the level to 4.0 and now it plays flawlessly.
Two additional questions : 1) Does anyone know of a way to change the dialog normalization level of an ac3 file? Pre eac3to v2.85, it would set the dialog normalization level to -0db, but my receiver doesn't like that value. It turns down the volume a lot. I'm trying to figure out a way to change the level back to what it was originally on these problem ac3 files or change it to -31. (Without re-encoding the ac3.)
2) The following is my x264 encoding profile...is there anything I could change to increase the quality while still being compatible with the BD35 sap (and not doubling my encoding time)? Or is there anything wrong with this profile?
"program --pass 2 --bitrate 7120 --stats ".stats" --keyint 24 --min-keyint 2 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 7 --trellis 2 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 25000 --vbv-maxrate 25000 --qcomp 0.5 --me umh --threads auto --thread-input --aud --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1"
nm
9th January 2009, 11:32
2) The following is my x264 encoding profile...is there anything I could change to increase the quality while still being compatible with the BD35 sap (and not doubling my encoding time)? Or is there anything wrong with this profile?
"program --pass 2 --bitrate 7120 --stats ".stats" --keyint 24 --min-keyint 2 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 7 --trellis 2 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 25000 --vbv-maxrate 25000 --qcomp 0.5 --me umh --threads auto --thread-input --aud --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1"
I'd remove --no-fast-pskip and use --subme 9 instead of 7. Psy-trellis (--psy-rd 1.0:1.0) is also useful with many movies (other than clean anime).
G_M_C
9th January 2009, 11:54
What was the problem ? I recently noticed that p4x4 is disabled and Level 3+ in megui.
I suddenly rememberd asking this before, and Dark Shikari explained. See here: http://forum.doom9.org/showpost.php?p=1214050&postcount=520
Strange thing is that based ont Dark Shikari's anwers, the Megui developers agreed adding the P4x4 to the profiles again. Based on your post it seems they haven't (yet) or have forgotten. Might be worthwhile to bring it to their attention again :)
EDIT:
[...]Psy-trellis (--psy-rd 1.0:1.0) is also useful with many movies (other than clean anime).
Psy-RD is useful, true, but i'd advise lowering the setting to 1.0:0.5 or so. The setting you give sharpens the image relatively much, riscing artifacts (and based on personal preference, sharpening isn't really desirable). See also: http://ffmpeg.x264.googlepages.com/mapping for options explained.
Esurnir
9th January 2009, 15:29
I suddenly rememberd asking this before, and Dark Shikari explained. See here: http://forum.doom9.org/showpost.php?p=1214050&postcount=520
Strange thing is that based ont Dark Shikari's anwers, the Megui developers agreed adding the P4x4 to the profiles agian. Bases on your post it seems they haven't (yet) or have forgotten. Might be worthwhile to bring it to their attention again :)
EDIT:
Psy-RD is useful, true, but i'd advise lowering the setting to 1.0:0.5 or so. The setting you give sharpens the image reatively much, riscing artifacts (and based on personal preference, sharpening isn't really desirable). See also: http://ffmpeg.x264.googlepages.com/mapping for options explained.
Well it is there but on "unrestricted" profiles or with level set to strictly inferior to three.
(ie where they are the least useful O_o; )
alc0re
10th January 2009, 05:13
a few questions :
1) why remove --no-fast-pskip? From what I'm reading using that option increases quality.
2) what exactly does no dct decimation do? enabling no dct decimation (turning off dct decimation) will increase or decrease quality? I dont care about encoding time unless its going to like triple my encoding speed.
3) this sounds like a stupid question and I'm pretty positive I know the answer but I need to ask it anyways just for confirmation : changing the level in and of itself makes no difference in quality right? (all other settings remaining the same) The reason I ask is because I have to leave it at unrestricted/autoguess in megui in order to enable --partitions all.
4) does anyone know of a way to change the dialog normalization level on an ac3 audio file without re-encoding? (not talking about using eac3to to remove the dialog normalization...I'm trying to reverse that process cause its causing issues with my receiver.)
5) what's the max number of b frames and reference frames I should be using for a BD9 on a panasonic bd35 bluray player?
Sagekilla
10th January 2009, 06:15
1) no fast pskip increases quality but the slowdown is extremely large for a miniscule increase in quality.
2) dct decimate will zero out blocks that are almost completely empty. Turning off dct decimate (--no-dct-decimate) will give -very- little quality gain and eats up a lot more bits.
3) Level doesn't matter for the most part. It's only when encoding for compatibility does this really matter.
4) See audio forums
5) Using --b-adapt 2, the most benefit you'll get is with 3 - 4 B-Frames. For reference frames, calculate using: ref = 8294400 / (width * height). For 720p footage --> ref = 8294400 / 921600 = 9 refs
alc0re
10th January 2009, 06:23
So I can safely turn up my reference frames to 9 and my panasonic bd35 should still be able to play this just fine yes? EDIT : Just read that for a given level there is a max number of reference frames for that resolution. What is the max number of reference frames for high@level 4.0? EDIT AGAIN : Looks like 9 is max for level 4.0 if the website I just checked is correct. But turning it up to 9 would add a whole lot of encoding time I'm assuming. What's a good "sweet spot"? Currently using 4... I'm assuming more reference frames = better compressibility, which equals better quality for a given constant bitrate?
Thanks for such a quick answer by the way. One more question....
I tried reading about Psy-RD but i don't understand what exactly its doing and what the pros/cons of using it are. is it one of those settings that should be changed depending on the type of movie? if it is I might just leave my profile as is...I just want a profile I can throw movies at and not have to change it every movie.
Sagekilla
10th January 2009, 06:39
For refs: Yes, I'm not sure what resolutions and frame rates are properly supported by a SAP like your Panasonic BD35, but as long as you use that formula (for Level 4.1 profiles, which just about all hardware players are) you'll be able to correctly calculate the max refs. Note, you get diminishing returns very quickly with refs. Beyond 4 or 5 refs for HD video, there's not much more benefit. With the exception of anime, where up to 16 refs -can- be used frequently, more than 4 refs tends to be overkill.
Psy-RD and AQ are psychovisual algos, meaning that they don't try to optimize the video for highest psnr at a bitrate, but instead work on trying to make the video look "good" to human eyes. What we perceive as looking good may be considered a bad choice (psnr wise) to the encoder.
With AQ, x264 tries to vary the quants within a frame for each MB. It tends to strip bits away from extremely complex areas where our eyes won't notice a huge difference, and give it to the relatively simple areas. This helps prevent you from getting a blocky mess on those flat areas like a uniformly featured sky, or a dark wall in a movie scene, etc.
As for Psy-RD, it works on a principle of trying to get the encoder to make a decision that will provide an output that has a similar level of detail to the input, even if it's not necessarily correct. Simply put, it makes the encoder favor sharpness over blurriness. Blurry output tends to be more PSNR optimal, whereas sharper output hurts PSNR (one of reasons why turning on AQ/Psy-RD makes PSNR/SSIM decrease.)
I'm simplifying things a bit, but that's more or less a generalized idea of what's going on.
alc0re
10th January 2009, 06:52
How does my new profile look to you?
program --pass 2 --bitrate 8040 --stats "E:\Applications\x264 Log" --keyint 24 --min-keyint 2 --ref 5 --mixed-refs --no-fast-pskip --bframes 4 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:0.5 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 25000 --vbv-maxrate 25000 --qcomp 0.5 --me umh --threads auto --thread-input --aud --progress --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1
I realize that 5 reference frames might be overkill and I kept on --no-fast-pskip, which will both increase my encoding time, but I don't think I'll mind that much the increase in encoding time. I've got a quad core and I'm not in a rush as long as its not taking a full day...
Out of curiosity...do you use --psy-rd on your encodes? What level?
alc0re
12th January 2009, 05:47
Could using b-pyramid be causing stuttering in my bluray to BD9 encodes when played on my sap? (panasonic BD-35)
Esurnir
12th January 2009, 05:55
Could using b-pyramid be causing stuttering in my bluray to BD9 encodes when played on my sap? (panasonic BD-35)
I used the commandline posted before :
"%x264_PATH%" --pass 2 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%.stats" --level 4.1 --keyint 24
--min-keyint 1 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 7 --trellis 2
--partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-bufsize 30000 --vbv-maxrate 24000 --qcomp 0.5 --me umh --merange 24 --threads auto
--thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.h264"
"%INPUT_VIDEO%" --mvrange 511 --aud --nal-hrd
And it worked perfectly including the b-pyramid.
No hickup whatsoever, the movie was fluid (1080p movie).
I got a sony SAP can't remember the model (not ps3)
R3Z
12th January 2009, 06:00
Thanks for the answers Sagekilla :). Even though i knew how to use x264 and get the best out of my encodes - its been a while since i have done them and so much has changed.
alc0re
12th January 2009, 06:19
yah i'm just gonna have to play around with different settings...using ripbot264 my encodes play smooth as butter...but using megui with ryu's avchd profile and muxing myself with tsmuxer it stutters a bit. could be my sap i guess.
alc0re
14th January 2009, 06:38
Would you guys recommend using UnDot() in my avisynth avs script? I'm transcoding from 1080p bluray source to 720p BD9...I'm leaning towards not using it...but I would prefer a logical/intelligent answer/observation as why to use or not use it...thanks.
PS...almost all my encodes are at least 7-8k bitrate range...with the exception of a few long movies that have dts audio also...those get to around 6.5k...
R3Z
14th January 2009, 09:07
Would you guys recommend using UnDot() in my avisynth avs script? I'm transcoding from 1080p bluray source to 720p BD9...I'm leaning towards not using it...but I would prefer a logical/intelligent answer/observation as why to use or not use it...thanks.
PS...almost all my encodes are at least 7-8k bitrate range...with the exception of a few long movies that have dts audio also...those get to around 6.5k...
Undot() is relatively harmless. You probably wont even notice what it removes bar the final compression size.
rack04
14th January 2009, 14:42
5) what's the max number of b frames and reference frames I should be using for a BD9 on a panasonic bd35 bluray player?
I use 3 for both.
How does my new profile look to you?
program --pass 2 --bitrate 8040 --stats "E:\Applications\x264 Log" --keyint 24 --min-keyint 2 --ref 5 --mixed-refs --no-fast-pskip --bframes 4 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:0.5 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 25000 --vbv-maxrate 25000 --qcomp 0.5 --me umh --threads auto --thread-input --aud --progress --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1
I realize that 5 reference frames might be overkill and I kept on --no-fast-pskip, which will both increase my encoding time, but I don't think I'll mind that much the increase in encoding time. I've got a quad core and I'm not in a rush as long as its not taking a full day...
Out of curiosity...do you use --psy-rd on your encodes? What level?
You need to lower the --min-keyint to 1 since your max bitrate > 15 Mbps.
Could using b-pyramid be causing stuttering in my bluray to BD9 encodes when played on my sap? (panasonic BD-35)
My BD-35 plays just fine with b-pyramid.
alc0re
14th January 2009, 17:27
what does the keyint value do? Could that be the reason my video is stuttering? Still trying to narrow my issue down...
rack04
14th January 2009, 17:36
what does the keyint value do? Could that be the reason my video is stuttering? Still trying to narrow my issue down...
What media are you using? What program are you using to burn the blu-ray output? Are your enabling "Change fps:" with the value of 24000/1001 in tsMuxeR?
alc0re
14th January 2009, 17:45
My process...
eac3to to rip tracks...
megui to transcode video...
suprip for ocr'ing the subtitles...
tsMuxer to mux to bluray output...tried both with and without changing the fps to 24000/1001
usually burn to dual layer verbatim, but until i figure this out i've been buring to a single layer.
question though : in my avs scripts...should I be using fps=23.976 in my directshowsource line or should I leave fps= out of that line and use assumefps(24000/1001)? the video on a bluray is 24000/1001 correct? Anyways, i've tried with both so far and still stutters. I figured out one of the issues i was having is that i had the level set to 4.1 before and just going back on some of my previously transcoded BD9s and changing it to level 4.0 in tsmuxer fixed that stutter, but there was still a slight stutter. I dont get that stuttering when I use ripbot264 and the standard bluray profile it has, but I 1) want to know what I'm doing wrong/different that's causing the stuttering and 2) need to do it not using ripbot264 for a few different reasons (not that ripbot isnt a great program.)
rack04
14th January 2009, 17:53
I can't answer you question about directshowsource since I use DGAVC/VC1IndexNV for my Blu-ray and HD DVD needs. What firmware do you have installed?
I have no playback problems on my BD35 using the following settings. However, I do have problems with FF/REW being unresponsive and slow.
1st pass
"%x264_PATH%" --pass 1 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%.stats" --level 4.1
--keyint 24 --min-keyint 1 --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 2
--partitions none --vbv-bufsize 30000 --vbv-maxrate 24000 --qcomp 0.5 --me dia --merange 24 --threads auto
--thread-input --sar 1:1 --progress --no-psnr --no-ssim --output NUL "%INPUT_VIDEO%" --mvrange 511 --aud --nal-hrd
2nd pass
"%x264_PATH%" --pass 2 --bitrate %DESIRED_BITRATE% --stats "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%.stats" --level 4.1
--keyint 24 --min-keyint 1 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --b-pyramid --weightb --direct auto
--deblock -1:-1 --subme 8 --trellis 2 --partitions all --8x8dct --vbv-bufsize 30000 --vbv-maxrate 24000 --qcomp 0.5
--me umh --merange 24 --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim
--output "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.h264" "%INPUT_VIDEO%" --mvrange 511 --aud --nal-hrd
alc0re
14th January 2009, 18:02
Newest firmware...I'll try out a few more things. I'll narrow it down eventually.
And perhaps I'll try indexing the raw stream instead of using directshowsource. Thanks for your help. I'll post whenever I fix the issue if you're interested.
alc0re
14th January 2009, 18:23
Rack would you mind posting one of your avs scripts please? tia
rack04
14th January 2009, 18:38
Rack would you mind posting one of your avs scripts please? tia
Like I said previously I use DGAVC/VC1IndexNV for frame-accurate serving via an Avisynth script. These may not be useful to you unless you have a VP2 GPU Nvidia graphics card and a neuron2.net supporter.
AVC (H.264) video stream
LoadPlugin("C:\Program Files\DGAVCDecNV\DGAVCDecodeNV.dll")
AVCSource("__vid__")
VC1 Advanced Profile video stream
LoadPlugin("C:\Program Files\DGVC1DecNV\DGVC1DecodeNV.dll")
VC1Source("__vid__")
You could also use DGAVCIndex which uses libavcodec to decode the video stream. Although, this only works for AVC (h.264) video streams.
AVC (H.264) video stream
LoadPlugin("C:\Program Files\DGAVCIndex\DGAVCDecode.dll")
AVCSource("__vid__")
laserfan
14th January 2009, 19:02
How does my new profile look to you?
program --pass 2 --bitrate 8040 --stats "E:\Applications\x264 Log" --keyint 24 --min-keyint 2 --ref 5 --mixed-refs --no-fast-pskip --bframes 4 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:0.5 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 25000 --vbv-maxrate 25000 --qcomp 0.5 --me umh --threads auto --thread-input --aud --progress --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1...You've been advised to try --ref 3 and --bframes 3; have you done that yet?
alc0re
15th January 2009, 06:40
so directshowsource isn't frame accurate? (not asking about frame accurate seeking...asking about serving to x264)
Esurnir
15th January 2009, 22:13
so directshowsource isn't frame accurate? (not asking about frame accurate seeking...asking about serving to x264)
Not really about directshow source, but directshow -codec- can be frame innacurate depends which apple your picking.
However for stuttering using ref 5 bframe 4 on a 1080p break the DPB buffer of 4.1 level, so dont do it.
P.S. Keyint define the maximum number of frame between two "reference" frame, that is the frame that are "Seekable" without decoding any frame before. Blu-ray require you unless you use 15000 as your max bitrate to have 1 seconds "group of pictures" to make it easy for the blu-ray player to "seek" a particular frame. for example when fast forwarding instead of displaying randomly chosen frame the player will only display I frame so it can fast forward reading next second frame, then the other one 1 sec after it, then the other, then the other at a rate that depends on the "x time" the viewer decide, skipping any frame before the reference ones.
alc0re
17th January 2009, 08:42
Thanks for the response...
And yes I understand that 5 is too much for 1080p content, but I'm downsizing to 720p, and 5 reference frames is within spec for that size.
Anyways, if anyone is interested I figured out my issue. It wasn't related to the x264 encode settings I was using. It was an error with my avs script. I'm fairly new to all of this and was following a few different guides. All the guides I was following just had me demux the bluray streams using eac3to, and creating an avs script with MeGUI. That's where the issue came. See, the avs scripts MeGUI was creating was specifying in the same line as directshowsource the fps as being 23.976. For example : DirectShowSource("video.mkv", fps=23.976, audio=false) I'm assuming it was grabbing this information from the mkv header that eac3to writes when it muxed the video stream to mkv (altough maybe it mkv header does specify 24000/1001 because I remember a few versions back MeGUI used to specify fps=23.9760239760 etc etc.) Problem is the video on the bluray is not 23.976, but 24000/1001. I now use an avs template instead of using the avs script creator in MeGUI. In my template I don't specify the fps in the directshowsource line, and instead added another line with AssumeFPS(24000,1001). Since making that change in my avs scripts and encoding my video plays smooth as butter (well, as smooth as 22.976 fps can play...I'm still sensitive to the slight jitter from 23.976 fps film.) I feel kinda like a nub, but hey I am one. At least I figured out the issue. I kinda always wondered about that cause following the guides I found, if I did an eac3to command on the bluray directory structure tsMuxer output after transcoding, the video line always said 720p23, which was different than the original bluray (1080p24/1.001)
Anyways, thanks to all who answered all my nub questions...I really appreciate it.
moviefan
17th January 2009, 21:17
Encoding a 1080p movie for a DVD9 results in my case at a bitrate of about 5700 Kbps. Almost all scenes look very god, but some with rather little detailed flat areas show banding etc. I have already raised aq-strength to 1.5 but they still look bad. Now my question: In what direction should the options --ipratio, --pbratio and --qcomp go for rather low bitrate encodes?
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.