View Full Version : x264 Settings for AVCHD Playback?
alluringreality
17th November 2010, 16:22
EDIT: It appears the issues I had encountered with Panasonic players were likely due to the TotalMedia Extreme software used for authoring, rather than video encode settings.
Here are my current x264 settings in MeGUI. The video will be authored as AVCHD. Does anyone have any suggestions for changes on these settings with 1080p and 720p video at 23.976 fps?
program --level 4.1 --preset placebo --pass 2 --bitrate 14000 --stats ".stats" --keyint 24 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --slices 4 --vbv-bufsize 14000 --vbv-maxrate 14000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
In reading I've come across some items that might suggest changes, but I've also ran into issues for Panasonic players with AVCHD authoring. Primarily I just went off the settings I used last year and the Tx264 version 5.6 AVCHD profile from MeGUI. Ideally I would prefer if the video plays from any AVCHD compatible player.
This link http://www.dvinfo.net/forum/avchd-format-discussion/133481-2-kinds-avchd.html seems to suggest AVCHD uses Main Profile at Level 4.0, but when I changed those settings and slices some Panasonic players did not play the video smoothly when authored as AVCHD. I don't know if something else also needs to change, because Main@4.0 plays fine from BD-RE on Panasonic players.
This second link http://forum.doom9.org/archive/index.php/t-134402.html suggests the following setting for AVCHD, but I cannot find any source to confirm it.
--vbv-bufsize 9000
The following couple items seem to work fine in limited testing, but since last year's encode never had any reported issues I'm reluctant to add them.
--open-gop bluray
--pic-struct
Groucho2004
17th November 2010, 17:56
All the information you need is in the first sticky in this forum - http://forum.doom9.org/showthread.php?t=154533
nixo
17th November 2010, 18:00
Max data rate for AVCHD playback from DVD is supposedly 18 Mbit/s.
I use these settings (long GOP, level 4):
--preset slower --tune film -b 3 -r 4 --nal-hrd vbr --vbv-maxrate 15000 --vbv-bufsize 15000 --level 4 -I 48 -i 2 --b-pyramid strict --open-gop bluray --aud --qpfile "Qpfile.txt" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1
These settings are Blu-ray compliant and *should* work with every player – yes, some players have issues with weightp, I just haven't run into any of them. You can, of course, change 'slower' to 'placebo' if you want. Also -r 4 can be increased to -r 6 for 720p.
There's no reason to use main profile.
--pic-struct is not needed for progressive streams.
--
Nikolaj
alluringreality
17th November 2010, 18:44
All the information you need is in the first sticky in this forum - http://forum.doom9.org/showthread.php?t=154533
The following were the settings I used on my first encode. I believe they fit with the sticky, because that was my primary source. Panasonic players have issues playing these settings when authored as AVCHD, but the same video plays fine from BD-RE. The Panasonic players have video issues about every 2 seconds on the AVCHD playback, so I switched to a 1 second gop. I still had issues with AVCHD on Panasonic players with a 1 second GOP until I switched to High@4.1 and slices of 4. Rather than doing more trial and error, I thought I would ask about settings.
program --profile main --level 4 --preset placebo --pass 2 --bitrate 15000 --stats ".stats" --keyint 48 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --slices 1 --vbv-bufsize 9000 --vbv-maxrate 15000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
Groucho2004
17th November 2010, 18:49
I vaguely remember a thread about x264 settings for Panasonic players. Just search.
I suppose the BD-Rebuilder bug thread could also be helpful.
alluringreality
17th November 2010, 18:50
I use these settings (long GOP, level 4):
Any chance have you tried the settings on any Panasonic players? The encode I'm asking about is for http://bit.ly/avshd709 and so far Panasonic is the only brand that has been reported to have issues on video authored as AVCHD.
alluringreality
17th November 2010, 18:55
I suppose the BD-Rebuilder bug thread could also be helpful.
I was going to use BD Rebuilder to do a recode, but I would prefer to leave the video flagged. The LASTCMD.TXT seems to generally be in line with the first list of settings, although I hadn't seen qpmin before and had to read up on that one.
"D:\Downloads\BD-RBV03602\BD_Rebuilder\tools\x264.exe" "D:\DOWNLOADS\13\WORKFILES\VID_00000.AVS" --preset slow --ref 4 --b-adapt 1 --b-pyramid strict --weightp 0 --qpmin=0 --bitrate 1406 --level 4.1 --sar 1:1 --aud --nal-hrd vbr --pic-struct --vbv-bufsize 14500 --keyint 24 --min-keyint 1 --ipratio 1.1 --pbratio 1.1 --vbv-maxrate 17500 --threads auto --slices 4 --thread-input --output "D:\DOWNLOADS\13\WORKFILES\VID_00000.AVS.264"
laserfan
17th November 2010, 19:01
The following were the settings I used on my first encode. I believe they fit with the sticky, because that was my primary source. Panasonic players have issues playing these settings when authored as AVCHD, but the same video plays fine from BD-RE. The Panasonic players have video issues about every 2 seconds on the AVCHD playback, so I switched to a 1 second gop. I still had issues with AVCHD on Panasonic players with a 1 second GOP until I switched to High@4.1 and slices of 4. Rather than doing more trial and error, I thought I would ask about settings.
program --profile main --level 4 --preset placebo --pass 2 --bitrate 15000 --stats ".stats" --keyint 48 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --slices 1 --vbv-bufsize 9000 --vbv-maxrate 15000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
I asked shon3i about this in his thread, but it seems to me that your --bitrate 15000 might be too high for DVD media. I never exceed 7500 as a target (average) bitrate. Worth a try maybe?
nixo
17th November 2010, 19:03
Any chance have you tried the settings on any Panasonic players?
Sorry, don't have access to any. Someone else must have tried, though.
--
Nikolaj
nixo
17th November 2010, 19:08
program --profile main --level 4 --preset placebo --pass 2 --bitrate 15000 --stats ".stats" --keyint 48 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --slices 1 --vbv-bufsize 9000 --vbv-maxrate 15000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
Did you try HP@4.0 with no slices?
--
Nikolaj
sneaker_ger
17th November 2010, 19:11
Are you using tsMuxerR?
Are you're outputting to H.264 ES (not mkv or mp4)? You might also want to uncheck "Add picture timing info" and "Continually insert SPS/PPS". (IIRC)
alluringreality
17th November 2010, 19:12
I never exceed 7500 as a target (average) bitrate. Worth a try maybe?
The 720p video was encoded at a very low target bit-rate, so it fit this condition and still had issues.
alluringreality
17th November 2010, 19:26
Are you using tsMuxerR?
Are you're outputting to H.264 ES (not mkv or mp4)? You might also want to uncheck "Add picture timing info" and "Continually insert SPS/PPS". (IIRC)
I'm using TotalMedia Extreme for the AVCHD authoring, because it allows for submenus. There aren't a lot of ways that I'm aware of to author AVCHD with a main menu and 10 submenus. I could probably author with DVD Architect Studio and then modify the output using multiAVCHD, but TotalMedia has a modified top menu command that returns to the submenu instead of the main menu. Without learning how to write a new top menu entry for BDedit, I couldn't figure out how to get DVD Architect to return to the submenu when exiting a video.
I'm using tsMuxer, but I don't know if it actually does anything. TotalMedia wanted to transcode video during testing if it was given a .264 video, but it wouldn't transcode if given the same video in a .ts container. I had been using tsmuxer to go from the .264 file from MeGUI to a .ts file for TotalMedia.
alluringreality
17th November 2010, 22:21
Did you try HP@4.0 with no slices?
I decided to try another couple different changes where slices was not set, including the above suggestion. Both of the video encodes break up on the Panasonic player that I tested. For the second test only level, slices, and vbv-bufsize was different from the initial settings.
program --profile main --level 4 --preset placebo --pass 2 --bitrate 14000 --stats ".stats" --keyint 48 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --vbv-bufsize 9000 --vbv-maxrate 14000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
program --level 4 --preset placebo --pass 2 --bitrate 14000 --stats ".stats" --keyint 24 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --vbv-bufsize 9000 --vbv-maxrate 14000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
EDIT: The ffdshow decoder on my computer also has issue with the m2ts files for these two encode settings. Like suggested below this may have all been a problem with the m2ts created by the first TotalMedia Extreme. TotalMedia Extreme 2 doesn't allow for submenus in the authoring.
poisondeathray
17th November 2010, 22:43
I suspect it's probably your muxer and authoring software. There was a thread where someone did a bunch of tests for a Panasonic player within the last few months... basically exporting rawavc was the most compatible
EDIT: maybe it was for blu-ray , I can't recall exactly
alluringreality
17th November 2010, 23:18
I suspect it's probably your muxer and authoring software.
Yeah, you may be right. I just noticed that if I play the m2ts from TotalMedia Extreme in Zoom Player with ffdshow on my computer it breaks up, but if I play the m2ts from Encore the same way it plays fine. I need to test this on a Panasonic player to be sure, but maybe this is why the AVCHD from TotalMedia didn't work but the Blu-ray from Encore with the same video worked.
If this is the case, hopefully I can replace the m2ts from TotalMedia with m2ts from Encore using either multiAVCHD or BDedit. The only other way I can think of to possibly author multiple submenus with in-mux AVC would be using DVD Architect, but I prefer how the TotalMedia authoring returns to the submenu using the top menu button. Anyway, thanks for the suggestion I'll look further into it.
poisondeathray
17th November 2010, 23:38
what do you mean by "it breaks up" ? can you be more specific? like pixellated picture ?
you might be able to re-author using multiavchd too (you can with encore output)
shon3i
17th November 2010, 23:59
Try adding --ref 4 to comandline, it's need if you encode 720p video, since AVCHD or Blu-Ray not allow more than 6 ref frames for that resolution.
alluringreality
18th November 2010, 00:13
what do you mean by "it breaks up" ? can you be more specific? like pixellated picture ?
At times the video would be pixellated. The video glitches vary a bit between the players tested. The top image is one of the worst errors with the m2ts played by ffdshow, and the bottom image is a nearby frame for a general idea of what it should look like. Depending on the encode settings, the errors shown on the Panasonic players are not necessarily this bad.
http://i188.photobucket.com/albums/z109/alluringreality/ffd1.png
http://i188.photobucket.com/albums/z109/alluringreality/ffd2.png
you might be able to re-author using multiavchd too (you can with encore output)
Yeah, I didn't think that I could have multiAVCHD replace the m2ts by selecting the .264 file. Thanks, I'll try that first.
poisondeathray
18th November 2010, 00:17
This looks like decoding problem, reminiscent of decoding weightp incorrectly
What version of ffdshow ? (It's been fixed in ffdshow for long time now)
Also, some hardware players cannot decode weightp correctly causing glitches, you can try --weightp 0 on your encodes
from: r1480 changelog:
--weightp 0 is not, but there are known bugged Blu-ray player chipsets (Mediatek, notably) that will decode video with --weightp 1 or 2 incorrectly.
alluringreality
18th November 2010, 00:37
What version of ffdshow ? (It's been fixed in ffdshow for long time now)
It's the version I downloaded along with BD Rebuilder:
ffdshow_rev3326_20100319_clsid
Also, some hardware players cannot decode weightp correctly causing glitches, you can try --weightp 0 on your encodes
The video for both m2ts files includes --weightp 0, but only the version created by TotalMedia Extreme shows the issue in the Zoom Player with ffdshow video decoder playback. Windows Media Player doesn't show any issues, the same as PowerDVD and my Sony Blu-ray player. Usually I don't have Zoom Player configured that way, so the only reason I noticed it happened to also show issues like the Panasonic players was because I had taken a look at BD Rebuilder.
poisondeathray
18th November 2010, 00:43
AHHH sorry I'm stupid I missed that, it says that on your command line DUH!!!!!
but only the version created by TotalMedia Extreme shows the issue in the Zoom Player with ffdshow video decoder playback. Windows Media Player doesn't show any issues, the same as PowerDVD and my Sony Blu-ray player.
But it really sounds like TotalMedia Extreme is causing the problem.
But what decoder is WMP using? Both Zoom and WMP should be using directshow decoder with the highest merit
In multiavchd there is a special setting for "strict avchd" and Panasonic players
alluringreality
18th November 2010, 01:12
But it really sounds like TotalMedia Extreme is causing the problem.
Currently I think this makes a lot more sense than what I could see by testing different encode settings on Panasonic players.
But what decoder is WMP using? Both Zoom and WMP should be using directshow decoder with the highest merit
I really don't understand WMP. I've never been able to explain how mp4 played with WMP can lock up my computer. I think it's the MS decoder, because as long as I don't use the MS decoder Zoom Player works fine, but I suppose it could be a splitter or something else. I've tried things like replacing the decoder with win7dsfiltertweaker or starting with a fresh install. While my netbook works fine with WMP and MP4, for whatever reason WMP and MP4 can lock up my i7 sometimes. All I know is whatever splitters and decoders Zoom Player tells me its using.
In multiavchd there is a special setting for "strict avchd" and Panasonic players
Yeah there are a couple options like this. I think one is supposed to get rid of the non-AVCHD folders. I guess the Strict AVCHD option on output must use in-mux menus for the multiAVCHD authoring, but I found out that it does not make out-of-mux menus into in-mux menus for re-author. I think the Panasonic players require in-mux menus to play as AVCHD, while most AVCHD-compatible players can play out-of-mux menus from DVD media with the AVCHD extended information. Anyway, I found out that multiAVCHD reauthor using AVCHD Strict output does not seem to be able to turn HDMV from Encore into AVCHD playable on Panasonic players.
alluringreality
18th November 2010, 19:58
Thanks again for the help. The video issue seems to have been from the TotalMedia Extreme authoring. I was not able to replace the m2ts in the TotalMedia Extreme authoring using multiAVCHD or BDedit, but I was able to use DVD Architect Studio for authoring submenus and then replacing the video with multiAVCHD. The multiAVCHD reauthor of DVDA played fine on the Panasonic player as AVCHD from DVD media, but the same multiAVCHD reauthor will not work with Encore for some players, apparently because of the mpeg2 (CS4 & CS5) or out-of-mux (CS5) menus. Anyway, my initial encode settings play just fine as AVCHD from the multiAVCHD reauthor of DVD Architect Studio's Blu-ray output.
program --profile main --level 4 --preset placebo --pass 2 --bitrate 15000 --stats ".stats" --keyint 48 --bframes 3 --b-pyramid strict --ref 4 --weightp 0 --slices 1 --vbv-bufsize 9000 --vbv-maxrate 15000 --aud --nal-hrd vbr --sar 1:1 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output "output" "input"
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.