I have REALLY been pounding my little head against the wall for some days now and reading until my eyes fall out, but I cannot seem to understand a certain phenomenon that is occuring when I re-encode perfectly playable MKV files, that has played just great on my OPPO BDP-83 as an MKV file. BUT... in my testing of different files and different x264 front-ends (just to get more familiar with the codec and the settings, mainly) I have found that mysteriously in EVERY case with THREE DIFFERENT MKV files and 4 different x264 front-ends, when I try to re-encode the MKV files using what are SUPPOSEDLY Blu-ray 'compliant' settings, in ALL cases, the resulting re-encoded MKV files when I play them on my OPPO, they ALL pixelate in precisely the same way. I cannot for the life of me figure out why. I don't know that maybe by setting the encodes for Blu-ray compatibility and then rendering it as an MKV file (not putting it in the BDMV format in other words) is somehow screwing up my OPPO's playback, or what? I'm just now trying to re-burn a disc as a BDMV folder (blu-ray) and play it that way to so if there is any difference between playing an actual Blu-ray or the MKV file produces any difference. I'm really running out of clues as to why it does this. The same factor in all 3 re-encodes is:
1) the original MKV files played just fine on my OPPO
2) I specifically re-encoded all 3 MKVs to be 'Blu-ray compliant'
3) I used 4 different encoder GUI's (BDRB, Simple x264, Megui, & Stax)
4) ALL the resulting re-encodes pixelated when played back on the same OPPO Blu-ray player
I'll include the encode stats for one of the original MKV files and it's re-encoded MKV file so that HOPEFULLY you guys who are FAR more experienced than I am will be able to see what the heck is going wrong here.
ORIGINAL MKV FILE (DOES PLAY)
cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 /
me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 /
threads=9 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 /
b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 /
intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=3320 / ratetol=1.0 / qcomp=0.60 / qpmin=10 /
qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
STAX RE-ENCODED MKV FILE (DOES NOT PLAY)
cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1
me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 /
threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1
/ constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 /
weightp=1 / keyint=48 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=48 / rc=crf / mbtree=1 /
crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / crf_max=0.0 /
nal_hrd=vbr / ip_ratio=1.40 / aq=1:1.00
As you can see, the original downloaded file has even MORE stringent or stronger settings than my re-encode (such as a higher settings for: subme, me_range, trellis, threads, b_pyramid, & weightp) Now, the supposedly Blu-ray 'compliant' settings of the re-encode DO include some additional settings that the original MKV file does not have, such as: lookahead_threads=1, vbv_maxrate, vbv_bufsize, &nal_hrd=vbr, which I think are SUPPOSED to be there to make sure that it IS Blu-ray compatible, right? Also, a few of the re-encodes settings have slightly different values, such as: qpmin & qpmax, rc_lookahead, keyint, & keyint_min, but, from what I've read, I don't THINK that those in themselves would make the file pixelize while playing on the OPPO.
Do you think that in making it Blu-ray compatible and having the encoder add those 'necessary' settings is somehow screwing up playing it back because it is NOT actually in the Blu-ray format (BDMV) but is an MKV file?
I would sure appreciate any insight on this.
AHA! I think that IS it; I just played the same file, BUT in a BDMV format as an actual Blu-ray by running the file through TSMuxer and burning a 'Blu-ray' disc, and it played beautifully!
So, have I just made a NEWBIE mistake then in setting the re-encodes for Blu-ray compatibility BUT rendering it as an MKV file, and THAT is why these are not playing properly? So then, when I want simply to re-encode MKV files, I should NOT set it for Blu-ray compatibility then, right? Just Level 4.1 for PLAYER compatibility, correct? So, when re-encoding these files then, I can have more of a free hand to just set the settings for like 'Slow' and Level 4.1 and not worry about it, right? GEEZ, what a total NEWBIE...
+ Reply to Thread
Results 1 to 6 of 6
Last edited by Lathe; 9th Dec 2013 at 21:53. Reason: More stuff...
OPPO has an attitude of some sort? Btw can you use keyint=48 for Blu-Ray compliant video? I'd set 24, but not sure.
You do not need to have BD compliant settings feeding BD player from USB, hardisk, but I think you know that. You just need "easy" settings like reference frames low, bitrate under control ...
As soon as you do not need BDMV (coming from TSMuxer or authoring software) you can encode with simple setup, using just tune film, set number 4 for reference frames (encoder makes 5 at the end), setting buffers and using CRF that you prefer. Rest of values do not set. X264 will set appropriately defaults. For example you feed it with 30fps and HD video it will set High@L4.1, as soon as you feed it with 60 fps it will set High@L4.2 etc. It might even warn you if something is not by specs..... .You can set preset slow if you want: --preset slow, or profile: --profile High.
That goes for x264 encoder. Something like this, easy command line, perfectly alright for any latest hw player:
x264 --crf=18 --tune film --ref 4 --vbv-bufsize 35000 --vbv-maxrate 33000 --output out.264 input.avs
Using some front-end encoders situation actually can start to be more complicated in a sense of having total control, what values are being set, where you have to watch for those values more closely, setting appropriate device, for example some hardware player that is listed there and then check those values you want control (reference frames, buffers, profile). Using slow, slower preset for example can set reference frames higher behind your back. So this is what I meant, using simple command line you have it under control. For hardware players do not set reference frame higher than 4 or make sure it is set that way.
Last edited by _Al_; 10th Dec 2013 at 16:09.
Excellent, thank you AL!
Actually, I would LOVE to use the cmd line, but I do not know quite how to input it. For example, the line you use above, you don't JUST type that in after the DOS prompt, do you? I mean, don't you have to state what file is being encoded or where you want the re-encode to go? Would you mind terribly giving me an example of PRECISELY how you would type it in to use the parameters you mentioned above, and say that I am wanting to encode a file called 'Movie.mkv' that is in my C drive in a folder called 'Media'? Would you have to state a destination folder? And. if I DID want to add some other encoding parameters, how would I add them. Is there a space between parameters, and each one starts with a '--' before it? And shouldn't there be an '=' sign between the parameter and the value, like 'ref=4' And, aren't the vbv values unnecessary unless I am creating a BDMV folder? Many MKVs do not have those such as my example above.
This WOULD actually be a lot easier if I knew how to do it, but I am STILL pretty confused...
Thanks so much!
Oh , now it is coming back to me , I almost exclusively use only avi videos to load Avisynth, which is easy. x264 will load Avisynth script. That avi is coming from frame server for me. But you'd need to load MKV into Avisynth. You'd need ffdshow installed together with Haali media splitter so you can load that MKV in Avisynth. Or you can use ffvideosource Avisynth plugin to load MKV. Note, audio could be trouble also for you, or more tracks of audio,
.....so I TAKE THAT BACK, sorry. I think it is good idea for you using those x264 front-ends for now, like ripbot264, Handbrake etc, where you just choose presets for your device and audio is handled at the same time.
To explain what you were asking also,
I always thought that you can use "=" or just empty space.
You should limit bitrate for any encoding. Setting max bitrate is important, not just for Blu-Ray. x264 front ends set buffers behind your back depending what target device you select in presets.
You can use those buffers and CRF to limit bitrate on purpose. Say you want to limit your video to 16.000 - 17.000kbps, so you set max buffer to about 15.000 and you set CRF to 15 (very high quality on purpose) . Then your bitrate should not exceed about 16.000 or 17.000 but in scenes that demand less bitrate (pictures, PC screen capture etc.) bitrate will just drop down. Temporary dropping bitrate and keeping quality does not work that well using x264 if you just used: bitrate=16.000 (abr mode). Using CRF=15 --vbv-maxrate 15000 would get you better result. This method is good to export for web , where you always have to choose bandwith limits for video first and you still encode only 1pass:
--crf=18 --profile baseline --level 3.0 --ref 1 --vbv-bufsize 1200 --vbv-maxrate 1000 --output raw_video.h264 input_web_1000.avs
you get steady stream of about 1200kbps, (it always goes couple of thousands above max limit) for web for SD resolution, where bitrate can drop if not needed, baseline and level 3.0 will set no CABAC automaticaly, so this is stream that even weak computers can handle, like latest Pentium 4,
that above line would give you much better result even saving some bitrate as oppose to that line:
--bitrate 1000 --profile baseline --level 3.0 --ref 1 --vbv-bufsize 1200 --vbv-maxrate 1000 --output raw_video.h264 input_web_1000.avs
using command line so you can have some idea, ...., you'd need to run cmd prompt window (start, write cmd and press enter) navigate to some folder where your files are and then write command line, press enter
if you'd run from different folder you'd need to include paths into command line
better is to create batch file and run command line from windows OS using just windows explorer, you create text in notepad and save it as: whatever.BAT, for example:
@echo off @x264 --crf=18 --tune film --ref 4 --vbv-bufsize 31000 --vbv-maxrate 30000 --output raw_video.h264 input.avs @echo+ pauseCode:
DirectShowSource("C:\my_movies\movie.mkv", audio=false) #ffdshow and Haali media splitter needed for this to work #AddBorders(0,something,0,something) #adding black bars on top and bottom if needed for BD compliant file, if that would be a case
Last edited by _Al_; 11th Dec 2013 at 00:56.