VideoHelp Forum
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. I have been going nuts this last week trying to encode the Japanese release of the Neon Genesis Evangelion Blurays. It has been nothing but problem after problem.

    The biggest one seems t be that the episodes were originally 4:3, it is a 90s show. When they made these blurays they hard coded the black bars on the side to make the video 1920x1080 16:9. I am cropping the videos to be 1440x1080, 4:3. Oddly, it does not seem to correct the Display Aspect Ratio to 4:3 and all video players will re-scale the 1440x1080 to 16:9.

    I tried to correct this using MKVMerge, as I am adding subtitles and audio tracks after encoding anyway so it is not really an extra step, though doing it as a batch would be nice. Oddly, Kodi/XBMC does not seem to react to either "Set Aspect Ratio" or "Display width/height" while MPC-HC acts just fine. In Kodi, no matter what, it shows SAR as 4:3 and DAR as 16:9. Even after processing it through MKVMerge I notice the "Original Display Aspect Ratio" is still 16:9 in the file and I believe that is what Kodi is getting the incorrect information from.

    To test this, I found out how to remove the "Original Display Aspect Ratio" using "--engage remove_bitstream_ar_info" option and it seems to work great. The problem with this is that it does not work with bitstreams-in-mkv, you need to do it with the raw bitstream being muxed as far as I can find. But now demuxing 52 files to remux them along with all of the others is getting a bit out of hand, partly because I don't want to lose and have to re-enter all of the information lost. Is there any way around this? Any batch file or tool that I can drop 26 mkvs into and it will remove the bitstream AR?
    Quote Quote  
  2. I didn't read all of it but 1920x1080 isn't 16:9 and 1440x1080 isn't 4:3. They're both 1:1. Don't set any aspect ratio and you should be okay. These aren't DVDs. Aspect ratio is one thing (1.78:1, 1.33:1), display aspect ratio something else entirely (16:9, 4:3).
    Quote Quote  
  3. Maybe you should actually read the post before replying then.

    And I should note, I am using Ripbot264 which does not have an option for, and I did not change anything for setting a display aspect ratio. So going back to re-encode 26 episodes to not "set any aspect ratio" isn't going to do a damn thing.
    Quote Quote  
  4. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Might help if you posted an unaltered 1920x1080 Bluray frame and the same frame in your problem encoding.
    Quote Quote  
  5. Originally Posted by CharredChar View Post
    Maybe you should actually read the post before replying then.
    I actually did read it but some of it was irrelevant to your problem. And correct me if I'm wrong, but nowhere did you mention you were using RipBot264, right? Do you have some leftover settings from a previous encode? I use it too, and the reason I ask is that it seems to keep AR settings from encode to encode. The only time I've ever had the problem you're having is when I didn't remove some previous settings. Or maybe you mistakenly made some AR settings you shouldn't have.

    But my post was correct - neither your sources nor your encodes are 16:9 or 4:3. You said your 1440x1080 encodes are being stretched to 1920x1080, right? Do you think it a coincidence that 1440 x (4/3) = 1920? I can't help with stripping out the AR information, only with trying to encourage you to do it correctly in the future. You screwed up 26 encodes before you figured out something was wrong?
    Last edited by manono; 30th Oct 2015 at 03:36.
    Quote Quote  
  6. Originally Posted by KarMa View Post
    Might help if you posted an unaltered 1920x1080 Bluray frame and the same frame in your problem encoding.
    I doubt it would help as my original post was going to include all of this information, be incredibly long in detail until I noticed the difference being only "Display Aspect Resolution" and "Original Display Aspect Resolution" and that is when I did the test of removing that setting and it corrected the issue. But sure, here you go.

    Original M2TS

    Code:
    General
    ID                             : 0 (0x0)
    Complete name                  : \\SERVER\Neon Genesis Evangelion Remastered Bluray Disks\KIXA_90504\BDMV\STREAM\00005.m2ts
    Format                         : BDAV
    Format/Info                    : Blu-ray Video
    File size                      : 6.77 GiB
    Duration                       : 23mn 21s
    Overall bit rate mode          : Variable
    Overall bit rate               : 41.5 Mbps
    Maximum Overall bit rate       : 48.0 Mbps
    
    Video
    ID                             : 4113 (0x1011)
    Menu ID                        : 1 (0x1)
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L4.1
    Format settings, CABAC         : Yes
    Format settings, ReFrames      : 4 frames
    Codec ID                       : 27
    Duration                       : 23mn 21s
    Bit rate mode                  : Variable
    Bit rate                       : 33.7 Mbps
    Maximum bit rate               : 40.0 Mbps
    Width                          : 1 920 pixels
    Height                         : 1 080 pixels
    Display aspect ratio           : 16:9
    Frame rate                     : 23.976 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 0.678
    Stream size                    : 5.50 GiB (81%)
    Color primaries                : BT.709
    Transfer characteristics       : BT.709
    Matrix coefficients            : BT.709
    
    Audio #1
    ID                             : 4352 (0x1100)
    Menu ID                        : 1 (0x1)
    Format                         : PCM
    Format settings, Endianness    : Big
    Format settings, Sign          : Signed
    Muxing mode                    : Blu-ray
    Codec ID                       : 128
    Duration                       : 23mn 21s
    Bit rate mode                  : Constant
    Bit rate                       : 4 608 Kbps
    Channel(s)                     : 6 channels
    Channel positions              : Front: L C R, Side: L R, LFE
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Stream size                    : 770 MiB (11%)
    
    Audio #2
    ID                             : 4353 (0x1101)
    Menu ID                        : 1 (0x1)
    Format                         : PCM
    Format settings, Endianness    : Big
    Format settings, Sign          : Signed
    Muxing mode                    : Blu-ray
    Codec ID                       : 128
    Duration                       : 23mn 21s
    Bit rate mode                  : Constant
    Bit rate                       : 1 536 Kbps
    Channel(s)                     : 2 channels
    Channel positions              : Front: L R
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Stream size                    : 257 MiB (4%)
    
    Text
    ID                             : 4608 (0x1200)
    Menu ID                        : 1 (0x1)
    Format                         : PGS
    Codec ID                       : 144
    Duration                       : 23mn 19s
    Delay relative to video        : 959ms
    Encoded with Ripbot.

    Code:
    General
    Unique ID                      : 189874214435687917786402421188121752360 (0x8ED8718AD889430584E813456B3E7328)
    Complete name                  : \\SERVER\Eva Remastered\Episode 19.mkv
    Format                         : Matroska
    Format version                 : Version 4 / Version 2
    File size                      : 1.16 GiB
    Duration                       : 23mn 21s
    Overall bit rate mode          : Variable
    Overall bit rate               : 7 090 Kbps
    Movie name                     : Episode 19
    Encoded date                   : UTC 2015-10-30 06:43:40
    Writing application            : mkvmerge v8.5.1 ('Where you lead I will follow') 32bit
    Writing library                : libebml v1.3.3 + libmatroska v1.4.4
    DURATION                       : 00:23:21.945000000
    NUMBER_OF_FRAMES               : 16430
    NUMBER_OF_BYTES                : 317224446
    _STATISTICS_WRITING_APP        : mkvmerge v8.5.1 ('Where you lead I will follow') 32bit
    _STATISTICS_WRITING_DATE_UTC   : 2015-10-30 06:43:40
    _STATISTICS_TAGS               : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L4.1
    Format settings, CABAC         : Yes
    Format settings, ReFrames      : 5 frames
    Codec ID                       : V_MPEG4/ISO/AVC
    Bit rate mode                  : Variable
    Maximum bit rate               : 62.5 Mbps
    Width                          : 1 440 pixels
    Height                         : 1 080 pixels
    Display aspect ratio           : 16:9
    Frame rate mode                : Variable
    Original frame rate            : 23.976 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Writing library                : x264 core 148 r2638 7599210
    Encoding settings              : cabac=1 / ref=5 / 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=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=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=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=62500 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Default                        : Yes
    Forced                         : No
    
    Audio
    ID                             : 2
    Format                         : FLAC
    Format/Info                    : Free Lossless Audio Codec
    Codec ID                       : A_FLAC
    Duration                       : 23mn 21s
    Bit rate mode                  : Variable
    Channel(s)                     : 6 channels
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Writing library                : libFLAC 1.2.1 (UTC 2007-09-17)
    Language                       : Japanese
    Default                        : Yes
    Forced                         : No
    For the hell of it, a test with Handbrake which gives me the correct aspect. I decided against Handbrake because it doesn't seem to handle passing through the FLAC track (though now for this test it seemed to handle it just fine.. the hell) and I'd rather use Ripbot's Distributed Encoding.

    Code:
    General
    Unique ID                      : 325115903432428018143756174804353237304 (0xF4970B9E229ECD036519CD64FDAF4138)
    Complete name                  : \\SERVER\Eva Remastered\test.mkv
    Format                         : Matroska
    Format version                 : Version 2
    File size                      : 29.3 MiB
    Duration                       : 1mn 30s
    Overall bit rate mode          : Variable
    Overall bit rate               : 2 723 Kbps
    Encoded date                   : UTC 
    Writing application            : HandBrake 0.10.2 2015060900
    Writing library                : Lavf55.12.0
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : Baseline@L4.1
    Format settings, CABAC         : No
    Format settings, ReFrames      : 1 frame
    Codec ID                       : V_MPEG4/ISO/AVC
    Duration                       : 1mn 30s
    Width                          : 1 440 pixels
    Height                         : 1 080 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 23.976 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Writing library                : x264 core 142 r2479 dd79a61
    Encoding settings              : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=0 / intra_refresh=0 / rc_lookahead=0 / rc=crf / mbtree=0 / crf=51.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=50000 / vbv_bufsize=62500 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=0
    Default                        : Yes
    Forced                         : No
    Color primaries                : BT.709
    Transfer characteristics       : BT.709
    Matrix coefficients            : BT.709
    
    Audio
    ID                             : 2
    Format                         : FLAC
    Format/Info                    : Free Lossless Audio Codec
    Codec ID                       : A_FLAC
    Duration                       : 1mn 30s
    Bit rate mode                  : Variable
    Channel(s)                     : 6 channels
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 24 bits
    Title                          : Surround
    Language                       : Japanese
    Default                        : Yes
    Forced                         : No
    And last, the file edited with MKVMerge to change the aspect ratio. Again, this works fine in MPC but not Kodi.

    Code:
    General
    Unique ID                      : 196306916129675503605257573744877289031 (0x93AF5638F27CCFD390A625F13D94BE47)
    Complete name                  : \\SERVER\Eva Remastered\Episode 19 (1).mkv
    Format                         : Matroska
    Format version                 : Version 4 / Version 2
    File size                      : 1.16 GiB
    Duration                       : 23mn 21s
    Overall bit rate mode          : Variable
    Overall bit rate               : 7 090 Kbps
    Movie name                     : Episode 19
    Encoded date                   : UTC 2015-10-30 16:37:19
    Writing application            : mkvmerge v8.5.1 ('Where you lead I will follow') 64bit
    Writing library                : libebml v1.3.3 + libmatroska v1.4.4
    DURATION                       : 00:23:21.945000000
    NUMBER_OF_FRAMES               : 16430
    NUMBER_OF_BYTES                : 317224446
    _STATISTICS_WRITING_APP        : mkvmerge v8.5.1 ('Where you lead I will follow') 64bit
    _STATISTICS_WRITING_DATE_UTC   : 2015-10-30 16:37:19
    _STATISTICS_TAGS               : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L4.1
    Format settings, CABAC         : Yes
    Format settings, ReFrames      : 5 frames
    Codec ID                       : V_MPEG4/ISO/AVC
    Bit rate mode                  : Variable
    Maximum bit rate               : 62.5 Mbps
    Width                          : 1 440 pixels
    Height                         : 1 080 pixels
    Display aspect ratio           : 4:3
    Original display aspect ratio  : 16:9
    Frame rate mode                : Variable
    Original frame rate            : 23.976 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Writing library                : x264 core 148 r2638 7599210
    Encoding settings              : cabac=1 / ref=5 / 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=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=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=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=62500 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Default                        : Yes
    Forced                         : No
    
    Audio
    ID                             : 2
    Format                         : FLAC
    Format/Info                    : Free Lossless Audio Codec
    Codec ID                       : A_FLAC
    Duration                       : 23mn 21s
    Bit rate mode                  : Variable
    Channel(s)                     : 6 channels
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Writing library                : libFLAC 1.2.1 (UTC 2007-09-17)
    Language                       : Japanese
    Default                        : Yes
    Forced                         : No
    Quote Quote  
  7. This is command line, but it'll do what you want. New tool to change SAR in H264 bitstream.

    I haven't used it for a while, but I kind of remember it not setting a container aspect ratio when re-muxing (just the one in the bitstream) so the players that looked for a container aspect ratio weren't displaying the video correctly. In the end I'm pretty sure I remuxed with ffmpeg and then again with MKVMergeGUI to set the container aspect ratio if need be, but maybe I was just to silly to use ffmepg properly, and if you're setting the DAR to the same as the resolution it shouldn't matter if there's no container aspect ratio anyway.
    Quote Quote  
  8. Originally Posted by manono View Post
    Originally Posted by CharredChar View Post
    Maybe you should actually read the post before replying then.
    I actually did read it but some of it was irrelevant to your problem. And correct me if I'm wrong, but nowhere did you mention you were using RipBot264, right? Do you have some leftover settings from a previous encode? I use it too, and the reason I ask is that it seems to keep AR settings from encode to encode. The only time I've ever had the problem you're having is when I didn't remove some previous settings. Or maybe you mistakenly made some AR settings you shouldn't have.

    But my post was correct - neither your sources nor your encodes are 16:9 or 4:3. You said your 1440x1080 encodes are being stretched to 1920x1080, right? Do you think it a coincidence that 1440 x (4/3) = 1920? I can't help with stripping out the AR information, only with trying to encourage you to do it correctly in the future. You screwed up 26 encodes before you figured out something was wrong?
    I am sorry but maybe I am not getting the information across correctly here. I did not say 1440x1080 is being stretched to 1920x1080, I said it is being stretched to 16:9. I know the difference between image resolution, pixel aspect ratio and display aspect ratio.
    There were no previous settings for Ripbot, it was a fresh install. There is no setting in Ripbot, without adding it yourself in the script, to change the AR at any point.
    I didn't "screw up 26 episodes before I figured out something was wrong" as I ran tests with both Ripbot and Handbrake from the start to see how they would do. I noticed the aspect ratio was off and that I could change it after it was encoded and decided to handle it while Ripbot was hammering away at the encoding.
    Now that, for some reason, Handbrake seems to be allowing me to passthrough the FLAC track and it corrects the AR I might just let it spend the ~300 hours it will take to encode if I can't find an easy fix for Ripbot's output.

    If you have a fix for Ripbot, manono, that would be great but I doubt changing any settings inside of Ripbot will do a single thing. It is most likely going to have to be a modification to the scripts Ripbot produces. While looking for how to remove the bitstream AR I did notice a couple posts about this issue on the doom9 forums inside of the Ripbot post but the answer was always, "edit it in mkvmerge, its not a bug."

    So again.. I just need a way to remove the "Original Display Aspect Ratio" from the bitstream inside of the MKV, if that is possible at all without demuxing and remuxing the bitstream into the MKV, if anyone has any information on how I can do that if it is even possible. If not, yeah my last option is to demux. Even with that it is faster than encoding with Handbrake, just a ton of manual work.
    Quote Quote  
  9. Originally Posted by hello_hello View Post
    This is command line, but it'll do what you want. New tool to change SAR in H264 bitstream.

    I haven't used it for a while, but I kind of remember it not setting a container aspect ratio when re-muxing (just the one in the bitstream) so the players that looked for a container aspect ratio weren't displaying the video correctly. In the end I'm pretty sure I remuxed with ffmpeg and then again with MKVMergeGUI to set the container aspect ratio if need be, but maybe I was just to silly to use ffmepg properly, and if you're setting the DAR to the same as the resolution it shouldn't matter if there's no container aspect ratio anyway.
    I ran across that tool earlier when looking for a way to remove the "Original Display Aspect Ratio" you see in the last file. What I got from it, it would not help. As you see the file contains both the container DAR and the bitstream DAR, Kodi seems to bypass the container DAR, no matter what it is (that is not true, when I miss-typed "1.333" to "1.33" it worked, but that is an incorrect ratio), in favor for the bitstream DAR if it is there. It isn't the SAR or resolutions that are having an effect on how Kodi handles displaying the image, as I mentioned before Kodi says the file resolution is 1440x1080, the SAR is 4:3 and the DAR is 16:9 and it displays it as 16:9.
    Quote Quote  
  10. Originally Posted by CharredChar View Post

    I ran across that tool earlier when looking for a way to remove the "Original Display Aspect Ratio" you see in the last file. What I got from it, it would not help. As you see the file contains both the container DAR and the bitstream DAR, Kodi seems to bypass the container DAR, no matter what it is (that is not true, when I miss-typed "1.333" to "1.33" it worked, but that is an incorrect ratio), in favor for the bitstream DAR if it is there. It isn't the SAR or resolutions that are having an effect on how Kodi handles displaying the image, as I mentioned before Kodi says the file resolution is 1440x1080, the SAR is 4:3 and the DAR is 16:9 and it displays it as 16:9.
    That's to be expected because SAR should be 1:1 . You can think of it as "square pixels"

    You have:
    DAR = FAR * SAR
    16/9 = 1440/1080 * 4/3

    You want:
    4/3 = 1440/1080 * 1/1

    Also, there is no such thing as a "bitstream DAR", there is only bitstream SAR. You don't use 1.33 or 1.333, you would use sar=1:1 - did you read what manono wrote above ?
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    Originally Posted by CharredChar View Post

    I ran across that tool earlier when looking for a way to remove the "Original Display Aspect Ratio" you see in the last file. What I got from it, it would not help. As you see the file contains both the container DAR and the bitstream DAR, Kodi seems to bypass the container DAR, no matter what it is (that is not true, when I miss-typed "1.333" to "1.33" it worked, but that is an incorrect ratio), in favor for the bitstream DAR if it is there. It isn't the SAR or resolutions that are having an effect on how Kodi handles displaying the image, as I mentioned before Kodi says the file resolution is 1440x1080, the SAR is 4:3 and the DAR is 16:9 and it displays it as 16:9.
    That's to be expected because SAR should be 1:1 . You can think of it as "square pixels"

    You have:
    DAR = FAR * SAR
    16/9 = 1440/1080 * 4/3

    You want:
    4/3 = 1440/1080 * 1/1

    Also, there is no such thing as a "bitstream DAR", there is only bitstream SAR. You don't use 1.33 or 1.333, you would use sar=1:1 - did you read what manono wrote above ?
    Right, I keep forgetting that part as I've been fixated on fixing the Display Aspect Ratio and I keep thinking they are independent of one another. Let me go ahead and run a test using this tool to correct the SAR and see how Kodi handles it.
    Quote Quote  
  12. Ideally that operation should be done on the elementary bitstream (ie. you should demux it). But it's worth trying to see if you can do it as is. You shouldn't need to do the whole file, just a small sample to see if it works or fails e.g. add -t 00:00:30 to process a 30 second sample

    It should be possible to batch process it eitherway with commandline tools (e.g. batch demux, batch patch, batch remux, or just patch in situ)
    Quote Quote  
  13. Well what do you know, that worked.

    You know, I would say that I feel like it was a bit of a waste of time that I fixated on the bitstream aspect ratio, but at least this information is now out here and the next fool that has this issue can find it and save some time. Everything I could find pointed at fixing the display aspect ratio and when I removed that from the bitstream it worked too.

    It looks like this effectively removed that bit too.

    Code:
    General
    Unique ID                      : 283511698638230303775818204235114350460 (0xD54A5DF3A7F0B98A9722951E48D2077C)
    Complete name                  : \\SERVER\Eva Remastered\EpTest.mkv
    Format                         : Matroska
    Format version                 : Version 2
    File size                      : 1.37 GiB
    Duration                       : 23mn 21s
    Overall bit rate mode          : Variable
    Overall bit rate               : 8 403 Kbps
    Movie name                     : Episode 01
    Writing library                : Lavf53.6.0
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L4.1
    Format settings, CABAC         : Yes
    Format settings, ReFrames      : 5 frames
    Codec ID                       : V_MPEG4/ISO/AVC
    Bit rate mode                  : Variable
    Maximum bit rate               : 62.5 Mbps
    Width                          : 1 440 pixels
    Height                         : 1 080 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Variable
    Original frame rate            : 24.028 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Writing library                : x264 core 148 r2638 7599210
    Encoding settings              : cabac=1 / ref=5 / 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=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=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=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=62500 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Default                        : Yes
    Forced                         : No
    DURATION                       : 00:23:21.942000000
    NUMBER_OF_FRAMES               : 33613
    NUMBER_OF_BYTES                : 1153938556
    _STATISTICS_WRITING_APP        : mkvmerge v8.5.1 ('Where you lead I will follow') 32bit
    _STATISTICS_WRITING_DATE_UTC   : 2015-10-27 18:21:06
    _STATISTICS_TAGS               : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    
    Audio
    ID                             : 2
    Format                         : FLAC
    Format/Info                    : Free Lossless Audio Codec
    Codec ID                       : A_FLAC
    Duration                       : 23mn 21s
    Bit rate mode                  : Variable
    Channel(s)                     : 6 channels
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Writing library                : libFLAC 1.2.1 (UTC 2007-09-17)
    Language                       : Japanese
    Default                        : Yes
    Forced                         : No
    DURATION                       : 00:23:21.945000000
    NUMBER_OF_FRAMES               : 16430
    NUMBER_OF_BYTES                : 318259107
    _STATISTICS_WRITING_APP        : mkvmerge v8.5.1 ('Where you lead I will follow') 32bit
    _STATISTICS_WRITING_DATE_UTC   : 2015-10-27 18:21:06
    _STATISTICS_TAGS               : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    The 1.333 and 1.33 I mentioned before was when I was editing it in MKVMerge.

    Now that we have a fix the next things to do. How can I batch this and is there a possible way to fix Ripbot from doing this in the future?
    Quote Quote  
  14. Originally Posted by CharredChar View Post


    How can I batch this and is there a possible way to fix Ripbot from doing this in the future?
    1) Something else is bothering me - the VFR and weird framerate.
    Frame rate mode : Variable
    Original frame rate : 24.028 fps
    Even the output from ripbot was VFR. You should be able to force it CFR with that modified ffmpeg too (see below)

    To batch file to process all the MKV's in a folder as a batch file, it would look something like this with the modified ffmpeg. (I renamed it ffmpegr.exe to differentiate it from "normal" ffmpeg). For "OUTPUTPATH", make it another directory somewhere, preferably on a separate drive it will mux faster. It will take on the same name as the original, with "fixed" appended. Or you can change it to whatever you want (e.g remove "fixed" name)

    Code:
    for %%a in ("*.mkv") do ffmpegr -i "%%a" -vcodec copy -acodec copy -vbsf h264_changesps=sar=1:1/fps=24000:1001 "OUTPUTPATH\%%~na.fixed.MKV"
    pause

    2) I haven't used ripbot in a long time, but you used to be able to set custom commandline arguments. So --sar 1:1 should fix everything . I would also use --force-cfr if ripbot is giving you VFR files from a BD source
    Quote Quote  
  15. Thanks for the batch script. I did not catch that VFR, thank you for that. But what exactly does "fps=24000:1001" do in it? Shouldn't I be able to just "cfr" to fix it?

    Code:
    for %%a in ("*.mkv") do ffmpegr -i "%%a" -vcodec copy -acodec copy -vbsf h264_changesps=sar=1:1/cfr "OUTPUTPATH\%%~na.fixed.mkv"
    You can modify the command line when you select a profile and such in Ripbot. Currently,

    Code:
    --level 4.1 --preset veryslow --aud --nal-hrd vbr --vbv-bufsize 62500 --vbv-maxrate 62500
    It seems to have kept the framerate at 23.976 fps even though its variable from the Ripbot output so changing it to constant should not effect anything, correct? In theory, it should look like this?

    Code:
    --level 4.1 --preset veryslow --sar 1:1 --force-cfr --aud --nal-hrd vbr --vbv-bufsize 62500 --vbv-maxrate 62500
    Quote Quote  
  16. Originally Posted by CharredChar View Post
    I did not catch that VFR, thank you for that. But what exactly does "fps=24000:1001" do in it? Shouldn't I be able to just "cfr" to fix it?
    That ffmpeg version is "reading" the fps incorrectly as 24.something . If you force the cfr , it will be forced at 24.something. You need to "fix" it to the proper fps (23.976 is actually an approximation, the proper fps is 24000/1001 , although BD supports 24.0 as well)


    It seems to have kept the framerate at 23.976 fps even though its variable from the Ripbot output so changing it to constant should not effect anything, correct? In theory, it should look like this?

    Code:
    --level 4.1 --preset veryslow --sar 1:1 --force-cfr --aud --nal-hrd vbr --vbv-bufsize 62500 --vbv-maxrate 62500
    yes, but for distributed encoding, you should add --stitchable as well (not sure if ripbot adds it automatically)
    Quote Quote  
  17. I see, so I should not worry about the approximation FPS stating it is 23.976 and go with the 24000/1001. With that I do not need to add the CFR augment also?
    I'll double check the scripts from the distributed encoding, but I am pretty sure it adds the --stitchable automatically, I have to look later though.
    I did also notice that I forgot to set the reference frames to 4 like it is with the bluray. Not something I care enough about to go back and start the encoding over for but would it really be worth changing that for future encodes? As a rule of thumb I generally like to keep as close to the original bluray as possible when I do my encodes though realistically I don't know if it makes that huge of a difference. I'm mostly going for ease of use with the files on my server as well as the space savings of h.264 while keeping it as close to the original as I can.
    Quote Quote  
  18. In that modified ffmpeg version, fps=x:y implies CFR , but you can add it in if you want. But you definitely have to fix the FPS

    Look at the ripbot log files to check if it adds --stitchable

    It is worth setting --ref 4 in some scenarios, such as for some types of device playback. 5 references will break compatibility for some devices at 1920x1080 resolution
    Quote Quote  
  19. Originally Posted by CharredChar View Post
    I did not say 1440x1080 is being stretched to 1920x1080, I said it is being stretched to 16:9.
    Geez, and on a 1080p television or computer monitor that would be what? 1920x1080, maybe?

    I know the difference between image resolution, pixel aspect ratio and display aspect ratio.
    If you did, we wouldn't be having this discussion.
    ...is there a possible way to fix Ripbot from doing this in the future?
    In the 'AVC encoder settings' page of RipBot264 :

    --sar 1:1

    I suspect you have 4:3 now and it'll stay there until you change it. Another point I made earlier.
    Quote Quote  
  20. Originally Posted by manono View Post
    I didn't read all of it but 1920x1080 isn't 16:9 and 1440x1080 isn't 4:3. They're both 1:1. Don't set any aspect ratio and you should be okay. These aren't DVDs. Aspect ratio is one thing (1.78:1, 1.33:1), display aspect ratio something else entirely (16:9, 4:3).
    What are you talking about? the 16:9 and 4:3 does not refer to pixel aspect ratio but rather display aspect ratio, the 1:1 refers to pixel apect ratio. Your response does not make any sense.
    Quote Quote  
  21. Originally Posted by sophisticles View Post
    Your response does not make any sense.
    Of course it does. In this context 1:1 means square pixel so 16:9 or 4:3 don't figure in. The only thing I might have done differently in that first post was to go into RipBot264 to have a look and then mention the AR setting of '--sar 1:1' as I did in my most recent post. The problem was one of CharredChar's own creation. Me, I don't (usually) mess with those settings as I almost always make square pixel MP4s when using it. When making DVDs is when DARs come into play for me.
    Quote Quote  



Similar Threads

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