VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Hi all

    A bit of background.
    I recently purchased an LG BD390 Blu-ray which has the ability to play MKVs across the network. MKVs that I have tried (not made by myself) work flawlessly. The machine will also play vob files, but due to the number of DVDs I have I would like to compress to something smaller whilst retaining a quality virtually indestinguishable from the original, plus retaining audio and subtitle tracks.

    MKV with x264 seems the obvious choice.

    So I downloaded HDconvertTox and after a lot of fiddling around, I managed to create an MKV.

    Original source is a 576i interlaced TV episode, 4:3, with 2 audio tracks and 2 sub tracks (thought I'd start with something easy! )

    The MKV I have created contains the original AC3 audio tracks and the sub track so no problem there.
    Picture is also great, although I may experiment with lower settings (I used constant quality 18 ) as the file size is 750MB compared to the orginal VOB of 1.2GB which is a good but not brilliant reduction.

    KMPlayer will play back the file fine, in the correct aspect ratio.
    However when I play the file with the BD-390, the aspect ratio is all wrong. It almost looks like the image is square rather than 4:3. i.e. there are bigger black bars at the side than there should be.

    Although I did a lot of video conversion in years past (VCDs, SVCDs etc) MKV is new to me, so I am on a learning curve.
    Does this sound like an issue with my player not displaying properly, or an issue with the MKV file (maybe in the header info?)

    Any advice greatfully appreciated.
    The only thing I want to do if possible is avoid resizing the image. I want to retain the 720x576 resolution.

    Thanks all!
    Nick
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Post a mediainfo tree output of the converted file.
    Read my blog here.
    Quote Quote  
  3. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    So the mkv is 720x576 with 4:3 aspect ratio now? Use mediainfo to check to be sure.

    It could be that the lgbd390 ignores the aspect ratio in the mkv and then you probably have to resize to a 4:3 resolution like 720x540...or wait for a upgrade for the lg.
    Quote Quote  
  4. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    thanks both, I will get a mediainfo readout either tonight or tomorrow when I'm at home. Working weekends sucks!

    Nick
    Quote Quote  
  5. Originally Posted by Baldrick
    It could be that the lgbd390 ignores the aspect ratio in the mkv and then you probably have to resize to a 4:3 resolution like 720x540
    Actually, it probably assumes square pixel and is playing 5:4. I wouldn't expect any BD player to do anything sensible with anything other than standard BD and AVCHD discs.
    Quote Quote  
  6. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by jagabo
    Originally Posted by Baldrick
    It could be that the lgbd390 ignores the aspect ratio in the mkv and then you probably have to resize to a 4:3 resolution like 720x540
    Actually, it probably assumes square pixel and is playing 5:4. I wouldn't expect any BD player to do anything sensible with anything other than standard BD and AVCHD discs.
    Well it plays back the vob fine
    I guess it's using the "DVD" chip for that though rather than the "BD" chip.

    I will double check the mediainfo when I get chance and report back, but it does look like the only option is to resize the video - not nice when it's interlaced either. I will probably end up just keeping the vobs instead as they play fine (and are incredibly quick to create). I'll just have to get more HDD space!

    Nick
    Quote Quote  
  7. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Right here goes.
    Everything looks OK to me, so it could just be the blu-ray player causing the problem
    One thing I have noticed though is that it shows as progressive, but is in fact an interlaced source. Does x264 not support interlaced video?

    General
    Complete name : D:\mkv conversion\3rd attempt.mkv
    Format : Matroska
    File size : 751 MiB
    Duration : 24mn 44s
    Overall bit rate : 4243 Kbps
    Movie name : Done with HDConvertToX v.2.2.492.3692
    Encoded date : UTC 2009-11-07 14:28:23
    Writing application : mkvmerge v2.9.8 ('C'est le bon') built on Aug 13 2009 12:49:06
    Writing library : libebml v0.7.7 + libmatroska v0.8.1

    Video
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 5 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 24mn 44s
    Bit rate : 3678 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4/3
    Frame rate : 25.000 fps
    Standard : PAL
    Colorimetry : 4:2:0
    Scan type : Progressive
    Writing library : x264 core 76 r1271 496d79d
    Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

    Audio #1
    Format : AC-3
    Format/Info : Audio Coding 3
    Codec ID : A_AC3
    Duration : 24mn 44s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Language : English

    Audio #2
    Format : AC-3
    Format/Info : Audio Coding 3
    Codec ID : A_AC3
    Duration : 24mn 44s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Language : English

    Text #1
    Format : VobSub
    Codec ID : S_VOBSUB
    Codec ID/Info : The same subtitle format used on DVDs
    Language : English

    Text #2
    Format : VobSub
    Codec ID : S_VOBSUB
    Codec ID/Info : The same subtitle format used on DVDs
    Language : English

    Chapters
    Language : English
    1 : 00:00:00.000 Chapter 1
    2 : 00:04:59.760 Chapter 2
    3 : 00:09:02.600 Chapter 3
    4 : 00:15:24.000 Chapter 4
    5 : 00:19:35.520 Chapter 5
    6 : 00:23:30.880 Chapter 6
    Quote Quote  
  8. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Half answering my own question here...

    I managed to solve the aspect ratio problem. The way I did this was by adding the job to the queue in HDConvertToX, and then manually editing the queue to alter the SAR from 1:1 to 16:15. This worked fine for PAL 4:3, although different ratios would have to be entered for NTSC, Anamorphic footage etc. The resulting file was still 720x576.
    Hope this helps anyone who encounters the same problem.

    Right, onto the interlacing. I managed to get this to work (sort of) by adding the --interlaced string to the x264 command line (the same way as above). However, although the resulting file is now slightly smaller than my original attempts, it is still not showing as interlaced, but as MBAFF. What the hell does this mean??!!
    When playing back through Blu-ray, the motion is smooth (as it was when encoded as progressive believe it or not), but when you pause and resume, the fields seem to go out of sync and you get juddery motion. A couple of repauses sorts it out, but probably due to the 50/50 chance of getting it right!
    So, again, is this my player, or does the fact that mediainfo reports "MBAFF" and not interlaced mean something isn't quite right?

    Thanks to anyone who can help
    Nick
    Quote Quote  
  9. MBAFF stands for MacroBlock Adaptive Field Frame -- an advanced form of interlaced encoding. The encoder decides, on a macroblock bases, whether to encode as two fields or one frame.
    Quote Quote  
  10. Mediainfo is wrong. x264 doesn't support MBAFF encoding yet. It should say "interlaced"

    Make sure you get field order correct --bff or --tff depending on your source

    For devices, you need to specify VBV buffer and sometimes a shorter max keyframe interval, or you might get stuttering.

    For Standard Definition material I would add:
    --vbv-bufsize 15000 --vbv-maxrate 15000

    And shortening the max keyframe interval will help with studdering of FF/RWD on some devices, and the min key interval should be shortened as well
    --keyint 50 --min-keyint 2

    If you want strict compliance, you should encode with slices too
    --slices 4

    Every device is different and some are more "finicky" than others. You may have to experiment a bit with the settings.
    Quote Quote  
  11. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Thanks for the input guys - much appreciated.
    I wonder whether specifying tff or bff will help with the playback problems after pausing.
    Only one way to find out I guess...try it!

    The other options look to be worthwhile too, so I will look to include them in the command line.

    Nick
    Quote Quote  
  12. Originally Posted by nick1977
    I wonder whether specifying tff or bff will help with the playback problems after pausing.
    No.
    Quote Quote  
  13. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Right I had a try with adding those lines to the batch encode, but it wouldn't start. I am guessing that some of the commands already exist in the preset slow?
    I cannot find where to edit preset slow, so if someone knows how to please let me know. Either that, or somewhere that lists the string from preset slow so I can copy and paste it, editing as I go.

    Something else wierd that I notice. I ran the program last night on my test clip using a cf of 17 rather than 18, and the file size came out bigger! Is that something that happens now and again? The only other thing that changed was upgrading to the latest version of hdconverttox, but I can't see that making a difference.

    Nick
    Quote Quote  
  14. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Just tried again, and got the strings to work apart from the --tff and --bff ones
    Does it matter where I put them exactly? I have tried putting them 1 space and then 2 spaces after --interlaced.
    Also, why when I run it does it say something "like interlace + direct=temporal is not implemented". Could this have a bearing on why it is reporting MBAFF, and again, could it be the cause of my standalone getting confused with the field order after pausing? (I also noticed that it does it sometimes when starting playing the file, so it really is pot luck!). I assume there is a fix for this somehow, since I have blu-rays which are interlaced and don't have this problem, and I belive MKV would be using the same part of the hardware to decode MKVs with x264.

    Please correct me if I'm wrong!

    Nick
    Quote Quote  
  15. Sorry, I don't use hdconverttox, and I don't know what commands it is passing

    There are many, different builds of x264, with many different mods and sub-branches with patches. The ones you need use need to have nal hrd patch, and the interlace patch.

    There should be 1 space between commands. Commands at the end should override earlier commands.

    Interlaced encoding hasn't been developed for x264, it's not a priority. The detection of motion vectors in interlaced content hasn't been developed very well. I think most of the developers want to remove it and think interlacing should die. You will not gain very much efficiency by using it (compared to encoding progressive sources). I think one of your commands is incompatible with the current interlace implementation. Try adding --direct auto . If that doesn't work try --direct spatial

    I would also add these for stricter compliance (along with the slices)
    --mvrange 511 --aud --nal-hrd

    --interlaced will automatically select tff on most builds, so I think it should be ok if your source is tff (you can leave --tff out)

    checkout the longhelp on your x264.exe, on older versions it was
    --longhelp at the commandline, newer versions it's --fullhelp

    You can also ask buzzqw (the author) at doom9, or use another program, or just the command line with a working build

    As for filesize, crf17 will give you larger filesize than 18. Lower means lower quantizer. Also you can't compare between builds, because there are subtle changes to each x264.exe version that may or may not change things.

    Finally, your standalone might be the problem. Some do not play files very well. Some are very compatible with everything, even with non compliant settings. Also try putting it into a transport stream instead of .mkv. There are some reports that mkv support is not complete with these devices
    Quote Quote  
  16. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Thanks for the detailed informative response. I will have a play with those settings tomorrow and report back.
    It's a shame the developers of x264 doen't have much time for interlaced material. A lot of people out there are wanting to make media libraries from their DVD collection, and the majority of TV series produced before HD are interlaced. Watching them as 25p is horrible, and 50p is losing half of the vertical resolution of the source

    EDIT> Just to add, I agree that interlacing should die for current and future productions. However when something was made as interlaced, that's how I want it to stay.

    Nick
    Quote Quote  
  17. I assure you it should work...if you are using a proper build and settings. It might be your build isn't patched, or it might be your player. I have tested x264 sd interlaced material on several blu-ray players, but never in .mkv container. Transport streams are designed to handle interlaced content, such as for broadcast transmission. Disadvantage of using them is the 5-7% overhead (larger filesize than .mkv)

    As for x264 and interlaced content - all I meant was that the efficiency is much lower. You might get ~1/2 the filesize for the same "quality" compared to using MPEG2 on progressive content (e.g. DVD=>MPEG2 vs. DVD=>h.264) in that bitrate range you are using. (ie. it might take MPEG2 2x the filesize for equivalent quality , on average). But interlaced encoding using x264 hasn't been optimized, and it's not very efficient. It's algorithm still relies on prediction using consecutive frames (not fields). In my tests, it's only tiny bit more efficient than using MPEG2 for interlaced sources. (At low bitrates, it still have a major advantage over MPEG2 with interlace content). For some people it might not be worth it to use x264 on interlaced material. I'm one of them.

    Other h.264 encoders have been developed for interlaced content. e.g. Broadcast versions of Mainconcept and Ateme have better interlaced encoding. e.g. MBAFF is more efficient than regular interlace. They have been optimized for interlaced content, because that is what is used in many European broadcasts. Unfortunately, they are not free.
    Quote Quote  
  18. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Here's a quick update:
    Tried adding --direct auto and msg still apeared, so used --direct spatial and it disappeared so hopefully all is well there.
    Out of the other commands it accepts them all except --nal-hrd.
    I looked on the fullhelp and it's not listed so maybe it's not supported by the version I've got.
    I shall run a test clip overnight tonight with the new parameters and see how I get on!

    Thanks again
    Nick
    Quote Quote  
  19. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Tried again last night.
    Process completed OK but still recognised by mediainfo as MBAFF, and still has the problem with fields getting messed up after pausing. I guess it's a problem with the player not recognising the file properly.
    WHen you said a different transport stream, do you mean a different file type, like mp4, avi etc?
    If so, what one can you recommend that can contain multiple audio and subtitle tracks?

    Do you think it is worth getting a different build of x264 that supports --tff --bff, in case the interlacing on my build is messed up?

    Many thanks for all your help so far
    Nick
    Quote Quote  
  20. --nal --hrd is required for strict compliance and for authoring real blu-ray content, but some devices can play streams without it

    Yes, I would try .m2ts transport stream. It's just a container instead of .mkv, and has better support on more devices. If you use tsmuxer and make sure continually insert sps/pps is checked , this will re-write the stream vbv values which usually isnt a good idea, but in this case since you are missing hrd (hypothetical reference decoder) values, it might work. If you are using a proper patch, make sure the box is unchecked

    Don't get fixated on what mediainfo says about MBAFF or not, it can be incorrect (it doesn't analyze the stream, only reads the header)

    You might ask Buzzqw, because I don't know what build he is using or what other stuff is going on with his GUI
    Quote Quote  
  21. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Thanks again.
    Is the string --nal --hrd or --nal-hrd?
    If it's --nal --hrd that might explain why it wasn't working!
    I will spend some of the weekend looking at m2ts and tsmuxer. The reason I chose mkv was that it was a selling feature of the blu-ray player (plastered all over the box!) so I assumed support for that would be good.

    Nick
    Quote Quote  
  22. Sorry typo , it should be --nal-hrd
    Quote Quote  
  23. Member
    Join Date
    Oct 2001
    Location
    United Kingdom
    Search Comp PM
    Thanks for all the help with my enquiry.
    Unfortunately after a lot of effort and research I have come to the conclusion that, for the time being, I am better keeping the files as vob for the moment. My reasons are as follows:

    1) I cannot get consistent playback of interlaced footage in mkv from my standalone unit, although progressive is fine. I tried using a different container but had worse results (mp4 had no audio as well as the interlacing problems)

    2) The time it was taking to run the conversion was excessively long, espically when compared to the time it takes just to rip the vob from the DVD.

    I hope to get a new PC in a year or two so will revisit this idea then.

    I will set up another thread - probably in the file conversion group - as I have a concern with "future-proofing" my vob rips. (I feel it is not close enough to the orignal topic to keep it in this thread, however will update this post with a link once I've done it)

    As I said, thanks again for all the help!

    EDIT: Here's the post

    https://forum.videohelp.com/topic375722.html#2024168

    Nick
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!