VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Apr 2015
    Location
    East Coast
    Search PM
    This is an update to these two threads from last year:

    https://forum.videohelp.com/threads/371627-Critique-my-AME-CS6-settings-DV-avi-H-264-WD...V-Media-Player
    https://forum.videohelp.com/threads/372016-Questions-about-Handbrake-DVD-rip-QTGMC-59-94-progressive

    Since then, life got very busy, but now I'm back on track to convert a whole bunch of DV-avi's (and later VOB's) using Avisynth. AI are you still here? Can you or anyone help me out with some settings?

    As before I'm going for 59.94 progressive with square pixels. Setting the frame size to 640x480 to keep the vertical dimension the same (as suggested by Cornucopia) despite DV-avi always showing it's info as 720x480. This can be done by tweaking a few lines in "encode_progressive_mp4.BAT". Done.

    I want the target bitrate to be about 6.0 Mb/s and the max to be about 9.0 (as suggested by smrpix). I'm already getting something close to this with the avisynth settings as-is.... but how can I tweak the bitrate in Avisynth if I wanted?
    Quote Quote  
  2. Member
    Join Date
    Apr 2015
    Location
    East Coast
    Search PM
    I'll make a separate post as to WHY: For a player, I ultimately decided on the Google Nexus Player (made by Asus) hooked up to a Seagate USB drive... formatted FAT32. I'm using the Kodi player app from Google Play store (the VLC app also works, but I prefer Kodi)

    Edit: the Nexus player hooks into the TV via HDMI. It's also very good for watching YouTube and Netflix.

    Kodi will actually play Dv-avi files as-is, but they look bad with all the interlacing artifacts. The few DV's that I converted to progressive Mp4's using Avisynth (make progressive MP4.bat) looked much better. The same can be said for VOB's (already ripped from DVD using old DVDdepcrypter) converted to progressive mp4 (mpeg-to-resized-mp4.bat).

    Why FAT32? The Nexus Player doesn't truly support the NTFS files system, so I had to format the drive in the old FAT32, which negates using files over 4Gb. Compressing these 13Gb DV-avi files to Mp4 puts them under the 4Gb limit. There's a workaround to the NTFS problem using File Explorer ES, but at least for me, Kodi won't work, only VLC. ... but irregardless, the progressive MP4 versions always look better than the interlaced DV-avi versions.
    Last edited by LouGee; 12th Feb 2016 at 10:59.
    Quote Quote  
  3. You can't tweak bitrate in AviSynth. AviSynth is for all the processing before encoding. It's the encoder that deals with bitrate. Set the average bitrate to the value you desire. How you set the max depends on the codec you're using. In x264 it's via the vbv-maxrate and vbv-bufsize. But you may not need to set those at all. And picking 6 Mb/s as the average may be rather arbitrary. With some videos it will not be enough. With others it will be overkill. 60000 kbps will be overkill for most standard definition encoded with x264. If you are looking for a specific quality level use CRF encoding in x264. You always get the appropriate bitrate for the quality you specify. Try CRF=18 for a start. Lower values will give higher quality and larger files. Smaller values will give lower quality and smaller files.
    Quote Quote  
  4. I did not read those threads thoroughly again, but guessing what was in them. Not sure what batch are you asking about now.
    Originally Posted by LouGee View Post
    I want the target bitrate to be about 6.0 Mb/s and the max to be about 9.0 (as suggested by smrpix). I'm already getting something close to this with the avisynth settings as-is.... but how can I tweak the bitrate in Avisynth if I wanted?
    What batch is involved here? Avisynth does not set up bitrate for encoder, that is a job for encoder, setting command line to 2pass instead of CRF (h264)or Constant quantization (hcencoder for mpeg2). One line would be changed for two lines with 2pass encoding in particular batch script.

    Originally Posted by LouGee View Post
    Kodi will actually play Dv-avi files as-is, but they look bad with all the interlacing artifacts.
    Yes, Kodi, XBMC is not ideal to watch DVavi, very bad deinterlace (tried all of those choices or what is offered there), not reliable (just for Dvavi, do not take me wrong, it is otherwise a great platform), I tried couple of versions of Kodi. Using Android device Tronsmart S95 Meta at the moment. What I ended up playing DVavi with is MXplayer app. Deinterlace is much better and playback is more reliable (seeking works etc., as a matter of fact I do not remember a crash or a freeze using MXplayer and DVavi), it is still not ideal, but the best solution I came up with using Android. That deinterlace is no match for viewing mp4 where QTGMC was used to deinterlace. So I have never regretted bothering to encode DVavi to double frame rate using that QTGMC (and CRF17).

    Originally Posted by LouGee View Post
    Why FAT32? The Nexus Player doesn't truly support the NTFS files system, so I had to format the drive in the old FAT32, which negates using files over 4Gb. Compressing these 13Gb DV-avi files to Mp4 puts them under the 4Gb limit. There's a workaround to the NTFS problem using File Explorer ES, but at least for me, Kodi won't work, only VLC. ... but irregardless, the progressive MP4 versions always look better than the interlaced DV-avi versions .
    As for DVavi and android device, try that MXplayer and ESfile explorer. So that ES File Explorer explorer is for navigating into any video over LAN and MXplayer plays that file.
    Last edited by _Al_; 12th Feb 2016 at 12:48.
    Quote Quote  
  5. Member
    Join Date
    Apr 2015
    Location
    East Coast
    Search PM
    If you are looking for a specific quality level use CRF encoding in x264. You always get the appropriate bitrate for the quality you specify. Try CRF=18 for a start.


    So it's probably better for what I'm doing to just choose a good CRF rather than target/max bitrate? (as I said, I'm already getting close to 6 target and 9 max bitrates)

    What batch is involved here? Avisynth does not set up bitrate for encoder, that is a job for encoder, setting command line to 2pass instead of CRF (h264)or Constant quantization (hcencoder for mpeg2). One line would be changed for two lines with 2pass encoding in particular batch script.


    The main batch I'm starting from is "make MP4 from avi.bat" which at some point is calling "encode_progressive_mp4.bat" But as mentioned above, should I just stick with a good CRF and let the encoder pick the bitrates?

    Which BAT has the CRF setting? I think it's set at 17 or 18.

    And just out of curiousity now, which BAT has the ability to switch from CRF to 2pass or Constant Quant settings?
    Quote Quote  
  6. Originally Posted by LouGee View Post
    If you are looking for a specific quality level use CRF encoding in x264. You always get the appropriate bitrate for the quality you specify. Try CRF=18 for a start.


    So it's probably better for what I'm doing to just choose a good CRF rather than target/max bitrate? (as I said, I'm already getting close to 6 target and 9 max bitrates)
    That's what I would do. Use 2-pass bitrate based encoding when you need a file of a specific size. Use CRF encoding when you want a specific quality.


    Originally Posted by LouGee View Post
    The main batch I'm starting from is "make MP4 from avi.bat" which at some point is calling "encode_progressive_mp4.bat"
    Where are these BAT files? I didn't see them in the links you gave in the first post of this thread.
    Quote Quote  
  7. Originally Posted by LouGee View Post
    The main batch I'm starting from is "make MP4 from avi.bat" which at some point is calling "encode_progressive_mp4.bat"
    I have lots of those scripts, I did not know if you talked about H264 encoding or mpeg2 encoding. For mp4 , sure use CRF 17 or something close. That is 1pass. 2pass makes not much sense at all, only if trying to fit it to a medium with limited capacity. So yes , definitely stick with CRF encoding, the lower CRF, the better quality but larger video. You find sweet spot.

    Hypothetically, to change 1pass (CRF encoding) to a 2pass using that making progressive MP4 , you'd need change just the x264 encoding line, but the way I did it ,it is hidden within calling batch structure, not in that main batch, it is quite confusing. Particular encoding line is in x264+AAC.BAT (./tools/subroutines/x264+AAC.BAT). The way I did it was quite stupid, that DV avi helper.zip. Calling other batch files. It all should be within one batch, where you just change a line and rename that batch (those interlace, progressive , making DVD as standalone batches), that's it. But that was long time ago, I was just starting to put scripts like that together and I use only CRF, 1pass. 2pass only for DVD creating where running time is longer than 1hour 10min.


    Originally Posted by jagabo View Post
    Where are these BAT files? I didn't see them in the links you gave in the first post of this thread.
    They are all part of DV avi helper.zip
    Last edited by _Al_; 12th Feb 2016 at 21:50.
    Quote Quote  
  8. Member
    Join Date
    Apr 2015
    Location
    East Coast
    Search PM
    The main batch I'm starting from is "make MP4 from avi.bat" which at some point is calling "encode_progressive_mp4.bat"

    Doh! This is wrong. I'm using "make progressive MP4.bat" which is calling up "settings.BAT". The CRF number is in there, but I'm going to keep it at 17.

    I'll go with CRF instead of tweaking bitrates. Guys thanks for your help.
    Quote Quote  
  9. Oh yes, I remember now, I added that "make MP4 from avi.BAT" as a script where input could be ANY avi file, not just DVavi , so even uncompressed, any size, and there was manual input while running that script to enter aspect ratio (4:3 or 16:9) or field order (tff, bff , none) and what you want for output (interlace or progressive), where in case ov interlace input qtgmc would be used.
    But that batch would call "encode_progressive_mp4.bat" or "encode_interlace_mp4.bat" depending of user input.

    So make MP4 from avi.BAT (for general 720x480 or 720x576 avi, aspect ratio and field order needed, also output p or i is needed) , it gets settings from settings.BAT and at the end just calls x264+AAC.BAT

    make progressive MP4.bat needs DVavi input, deinterlaces if needed), calls setting.BAT, calls encode_progressive_mp4.BAT at some point and that calls for x264+AAC.BAT

    make interlace MP4.BAT needs DVavi input, calls setting.BAT, calls encode_interlace_mp4.BAT at some point and that calls for x264+AAC.BAT . If source is progressive, video stays progressive, avisynth script would not make it interlace, but everything gets flagged progressive.

    make DVD.BAT calls settings.BAT, calculate_mpeg_bitrate.bat and then it just makes one DVD from one DVavi , it calls create_m2v_video.BAT, create_dolby_audio.bat and create_VIDEO_TS.BAT
    then it depends on settings:
    1. just makes ISO , it calls create_ISO.bat (in setting.BAT: make_ISO_only=yes)
    2. makes ISO and burns it, it calls create_ISO.bat, burn_ISO.bat (in setting.BAT: make_ISO_only=no and direct_VIDEO_TS_burn=no)
    3. does not make ISO, and burns VIDEO_TS directly, it calls direct_burn.bat (in settings.BAT: direct_VIDEO_TS_burn=yes)
    -it needs a bland DVD disk in drive before burning of course, if it is not there, it just waits for it
    -DVavi suppose to be interlaced so DVD is interlaced
    -if that avi is progressive for some reason DVD is progressive, same frame rate
    -non DVD spec frame rates show error I think so no DVD would be made, except that progressive 25p or 29.97p , besides 25i and 29.97i

    BATCH make DVD.BAT makes as many DVD's as there was DVavi files dropped, it always calls make DVD.BAT for one DVD, a new blank disk is needed to be in drive, so after one DVD is finished, user takes freshly burnt disk out and can put a blank in. It always waits for empty disk to be put in if it is not there or if the old one is still there.

    I understand this calling is annoying, it can always alert antivirus (first time only if allowing it permanently) to prompt legality of BAT etc.
    It also calls get_videoinfo.BAT routine to check for videoparameters after loading dropped avi file..
    Last edited by _Al_; 13th Feb 2016 at 14:30.
    Quote Quote  



Similar Threads

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