VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Hi,
    I want to setup my VirtualDub 32 bit for using external encoders to be able to ouput other formats than AVI, like explained here:

    https://forum.videohelp.com/threads/367446-Virtualdub-External-Encoder-feature

    My Windows OS is 64 bit, but I'm using the 32 bit version of VirtualDub because some interesting filters will only work here and not in 64 bit.

    My basic question is:
    With the 32 bit version of VirthalDub, will 64 bit encoders and muxers like ffmpeg.exe 64 bit, MP4Box 64 bit, mkvmerge.exe 64 bit, will these work with my 32 bit version of VD or should I use in any case the 32 bit versions?

    Thanks,
    XenonS
    Quote Quote  
  2. I have been advised to work all the way with 32bit programs.

    There was also a question regarding VirtualDub could not find required codecs. Apparently, the reason for that was the mismatch of environments: codes were 32bit whereas VD 64bit. As explained, windows run software in separate "windows" / threads, whatever it is, either 32bit or 64bit, and therefore programs created for different CPU architecture cannot find each other. I think you can still keep 32bit and 64bit versions and test them. They are in the end self-contained programs.
    Quote Quote  
  3. Thanks for your answer, ZikO. This setup will require correct path settings in the MySettings.vdprof file, I think the best is to put all these needed codecs in a dedicated folder in C:\ to avoid trouble.
    Using 32 bit codec instead of 64 bit will probably influence speed, but not the video output quality, right?

    Cheers,
    XenonS
    Quote Quote  
  4. You can use 64 bit versions of ffmpeg.exe, x264.exe, mkvmerge.exe etc. as "external encoders" in VirtualDub 32 bit (and vice versa). The limits of plugins and VfW-Codecs do not apply here.
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    And sneaker is right. VirtualDub sends a video stream to an "External encoder" via pipe, this works between any applications, no matter if 32 bit or 64 bit. That's also the workflow of avs2yuv or avs4x264 or avs4x26x ... MeGUI is one of the GUIs using such a tool to feed 64 bit x264/x265 with video output of 32 bit AviSynth. VirtualDub 32 bit can do the same: Piping video from 32 bit AviSynth to a 64 bit encoder.
    Last edited by LigH.de; 19th Oct 2015 at 15:01.
    Quote Quote  
  6. Thanks to reply.
    Because I'm a newcomer in video conversion, I cannot avoid to ask this naive question:
    Other than VirtualDub, I currently have AVS Video Converter.

    Doing a single encoding with a video is always better than multiple ones, so if I succeed to install all the apps needed in the link above (I've just the newest versions of all) and setup correctly the .vsprof file, then I could encode directly from VirtualDub and output a MP4 in H.264 etc.

    But what if I just dismiss all that dance and just chose the lossless Lagarith as video compression, export as AVI and then convert to MP4 with the AVS converter? These would be 2 encodings instead of one, but is the difference in quality worth all this dance as in the link above?

    Thanks to clarify,
    XenonS
    Quote Quote  
  7. Since Lagarith is lossless there is no quality difference. Setting up VirtualDub with x264 etc. mainly saves you time and reduces stress on your hard disk. (Writing lossless files takes time and a lot of disk space, and your CPU needs to spend extra time to en- and decode Lagarith)
    Quote Quote  
  8. Originally Posted by sneaker View Post
    Since Lagarith is lossless there is no quality difference. Setting up VirtualDub with x264 etc. mainly saves you time and reduces stress on your hard disk. (Writing lossless files takes time and a lot of disk space, and your CPU needs to spend extra time to en- and decode Lagarith)
    Yes, I forgot this important 'stress' factor
    Playing with AVS converter to judge the possibilities I created an uncompressed AVI...actually 18GB on my harddisk on a 10 minute video probe...Currently my system has enough space, but if I go on I will have to defragment often to keep things smooth

    Greets,
    XenonS
    Quote Quote  
  9. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Aside from using the external encoder feature(which is what I would do), you can also frameserve out of Virtualdub and use Avisynth to pass the signpost.avi to your encoder of choice that supports avs as an input. You'll need to setup your frameserver first. Read the docs, it should explain how to do it.

    I did this many years ago, but totally unnecessary now with the external encoder feature.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  10. Originally Posted by XenonS View Post
    Hi,
    I want to setup my VirtualDub 32 bit for using external encoders to be able to ouput other formats than AVI
    Then load avisynth script into particular encoder directly, no need to go through VirtualDub. x264 encoder accepts avs script as an input if using command line. So encoders like Megui, ripbot etc that use x264 encoder can load avisynth script as well.
    Quote Quote  
  11. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    With one restriction: A 64 bit x264.exe would try to open the AviSynth script with a 64 bit AviSynth ... the "legacy" AviSynth project is 32 bit, though, its 64 bit variant is incomplete and unstable. AviSynth+ (a complete rewrite) is more stable, but a bit different. On top, many older 32 bit plugins are not available as 64 bit version either.

    Therefore we have such "bridges" like avs4x264, avs4x26x, etc. which load the AviSynth script as 32 bit process and then pipe the output to a 64 bit encoder.

    Using a 64 bit version of x264 may not be urgent regarding RAM utilization, only convenient regarding better speed. But for x265, encoding FullHD or even UHD really requires a 64 bit EXE, it easily exceeds 2 GB RAM available for 32 bit processes, even 4 GB of LAA linked EXE.
    Quote Quote  
  12. Hi racer-x
    First, thank you for posting the very helpful procedure for using external encoders in VD, this and your tutorial video is a tremendous help
    I was able to setup and import your .vdprof file after getting the necessary apps and changing the paths in the file accordingly. I have then loaded one of my small .mp4 videos, applied some filters and exported it using the x264 encoder. It came out nice, but I had no control over bitrate, size, and audio bitrate because I didn't change any settings.

    Now, I'd like to know how you change the video settings. The solution I found is to open an Explorer window where x264.exe is located, type cmd in the prompt, this will open a cmd window where you can type "x264 --fullhelp" and it will show all possible commands; the problem is: it will scroll down to the end immediately, so I miss most of the options. the /p or 'pause' command will not stop the scrolling, is there a command to enforce this?

    I have tried to outpup my video at a constant bitrate of 700 and a resolution of 848x480; therefore I have duplicated your x264 encoder like this (I added buffer of 2 seconds and bitrate of 700; have done the input for the resolution, and kept everything else as is):

    --vbv 2000 --bitrate 700 --preset medium --level 3.1 --keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none --demuxer raw --input-csp i420 --input-res 848x480 --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

    Are these inputs correct?
    Here, VD will start encoding but the result video only shows green flickering; I guess I missed to add a command to resize the video?

    At some point i hope I figure out how to enter 'correct' command lines. Will it be possible to merge and encode different videos in MP4? This should be possible with ffmpeg, IIRC.

    Thanks, and congrats again for your big thread
    XenonS
    Quote Quote  
  13. Ok, problem resolved with the cmd window: it's the 'screen buffer height' in the Properties of cmd window.

    XS
    Quote Quote  
  14. Originally Posted by XenonS View Post
    --vbv 2000 --bitrate 700 --preset medium --level 3.1 --keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none --demuxer raw --input-csp i420 --input-res 848x480 --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    bitrate 700 and tune film at the same time seems like a weird setting, preserving detail shoots bitrate upwards
    or using VBR 1pass, is not effective also,

    encoding to bitrate 700 is not enough even for internet stream nowadays, but sure why not, your choice, also why blu-ray compatibility then,

    instead of that --vbv 2000 (btw. is that correct, not sure) --bitrate 700, I'd use: --CRF 18 --vbv-bufsize 900 --vbv-maxrate 700
    using that CRF you can keep that --tune film makes a bit sense, to keep detail in dark, gradient, not complex scenes, photos etc. if bitrate would go below that 700 by encoder
    Last edited by _Al_; 20th Oct 2015 at 13:52.
    Quote Quote  
  15. Thanks to elaborate, AI. The choice I made above is not the best, I just did it to see how to edit the command line arguments.

    In the command line help, I didn't find any commands for Partitions in order to enable 8x8 Transform, 8x8 Intra Search; also can you set Motion Estimation values like the Partition Decision (5-High quality; 6b-High quality; unrestricted)? I think these can tremendoulsy increase the quality of motions, at least I found this out on my videos by playing with these values in AVC Converter.

    My original MP4 video has an average bitrate of 510, 854x480. I guess it's futile to chose a much higher output bitrate after editing, because all the data will only be upsampled (or not?). Also I have 5 separate of such videos that I want to merge and apply a filter in VD and output the merged video for about 300MB, later other 17 of such videos will be added, so I want to keep the filesize in this range (60mb for 10 minutes in MP4, which corrisponds roughly to a 700 1-pass constant bitrate). It would be super if I could merge MP4s with VirtualDub, because the less encodings i do, the more quality will be preserved (as I understand it).

    XenonS
    Quote Quote  
  16. Originally Posted by XenonS View Post

    In the command line help, I didn't find any commands for Partitions in order to enable 8x8 Transform, 8x8 Intra Search; also can you set Motion Estimation values like the Partition Decision (5-High quality; 6b-High quality; unrestricted)? I think these can tremendoulsy increase the quality of motions, at least I found this out on my videos by playing with these values in AVC Converter.

    To print out the fullhelp to a text file
    x264 --fullhelp 1>fullhelp.txt

    i8x8 is already enabled by default. It's enabled on everything above --preset superfast by default

    You can manually specify partitions by using --partitions . The options are listed in the fullhelp , including motion estimation. The regular --help doesn't have all the options listed


    My original MP4 video has an average bitrate of 510, 854x480. I guess it's futile to chose a much higher output bitrate after editing, because all the data will only be upsampled (or not?). Also I have 5 separate of such videos that I want to merge and apply a filter in VD and output the merged video for about 300MB, later other 17 of such videos will be added, so I want to keep the filesize in this range (60mb for 10 minutes in MP4, which corrisponds roughly to a 700 1-pass constant bitrate). It would be super if I could merge MP4s with VirtualDub, because the less encodings i do, the more quality will be preserved (as I understand it).

    I'd recommend you do the "joining" properly in avisynth. It's all done in a script, so it's done in the lossless domain, and there will be no "glitches" in the final encode (appending stuff after lossy encoding, you run a higher risk of joining problems) . A script only takes a few KB, instead of decompressing the videos to GB's

    You can load that .avs script into vdub to apply your filters (to vdub, the .avs script "looks" like a single video), or you might be able to find similar or better filters in avisynth if you describe what operations you are doing in vdub
    Quote Quote  
  17. Thank you poisondeathray, I appreciate your pointing on Avisynth. I will consider going this route when being 'heavily' occupied with video files to manage and distribute, but that's not my case, but I have a lot of videos to apply simple corrections (too dark, color faults etc.) and find that VirtualDub with its filters does an excellent job.

    Meanwhile, I found a simple way to join MP4 files with ffmpeg (in this example joining 4 files):

    ffmpeg -y -i "source1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "source1.ts"
    ffmpeg -y -i "source2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "source2.ts"
    ffmpeg -y -i "source3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "source3.ts"
    ffmpeg -y -i "source4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "source4.ts"
    ffmpeg -y -i concat:"source1.ts|source2.ts|source3.ts|source4.t s" -absf aac_adtstoasc -c copy -f mp4 "destination.mp4"

    Thanks very much aazerty for this solution! I have used -f mp4; using -f mov is not necessary with the latest ffmpeg anymore

    As for chosing a smaller bitrate, I think the "Youtube" setting of x-racer does very well, I just decrease the -crf 19 to a value which gives me average 700 bitrate output (will have to figure out).

    XenonS
    Quote Quote  
  18. [SOLVED] Please ignore

    The right command is --bitrate and not --br

    --------------------------------------------------------------------------------------------------------------------------------------------------------

    I have duplicated and slightly changed racer-x's "1 web video" setting, but now VirtualDub keeps crashing when I want to export.

    Here the differences, in my settings I only removed the --crf 19 and changed it to --br 700, changed to --level 3.1 and set the "--preset slower":

    racer-x original settings (works):

    --crf 19 --level 4.1 --keyint 30 --tune film --min-keyint 1 --b-pyramid none --qpmin 10 --qpmax 51 --no-fast-pskip --weightp 0 --bframes 3 --slices 4 --sar 1:1 --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -


    My settings:

    --br 700 --preset slower --level 3.1 --keyint 30 --tune film --min-keyint 1 --b-pyramid none --qpmin 10 --qpmax 51 --no-fast-pskip --weightp 0 --bframes 3 --slices 4 --sar 1:1 --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

    Where is the problem? There is no double space, also when I take out the "--preset slower" VD goes on crashing anyway. So what's wrong with "--br 700"? This is meant to be kbps.

    Thanks,
    XenonS
    Last edited by XenonS; 20th Oct 2015 at 20:22.
    Quote Quote  
  19. you HAVE to set buffers with crf settings, that is the point, otherwise bitrate goes up, as you experienced I think, and bitrates could be much higher in places, you have to cut off bitrates by setting buffers accordingly,
    you control bitrate by using
    > 1pass VBR using --bitrate 700 , this method is not optimal
    > or 2pass VBR using average bitrate, where you use --bitrate 700 again in each line, but one line you use --pass 1 , in second --pass 2
    this method is most optimal for you if you encode for size or if you want to have average bitrate exactly 700 for some reason, AND if there are scenes that do not need 700 bitrate, that saved bitrate will be distributed to scenes where it is actually needed, or think of it that dbitrate distribution makes more sense, so encoding is much more effective as oppose to just 1pass VBR
    > or you use --CRF 19 --vbv-bufsize 900 --vbv-maxrate 700
    but you cut off peaks for sure
    Last edited by _Al_; 20th Oct 2015 at 22:02.
    Quote Quote  
  20. Thanks AI, I highly appreciate that you explain these fundamentals of conversion. I realize that this is indeed very important, especially in scenarios where you have the 'raw' video data at your disposal, the data comming DIRECTLY from your recording device like camera, iPhone, etc..
    But in my case, and for practical purposes (I mainly want to watch the output on TV after putting the video on a USB stick), a 1-pass constant bitrate is enough because I won't see the differences in quality with my eyeball. By watching very carefully, I will actually notice some un-sharpness and some square pixels just before objects will start moving fast, and I can make these effects dissapear by chosing a slower Preset like --preset slower or even --preset veryslow.

    Nevertheless, your answer above is very significant for more complex scenarios than just my particular case (which is a really banal one).

    Good references - and very helpful ones - that I found are here:
    https://forum.videohelp.com/threads/338031-Difference-Between-1-pass-2-pass-encoding
    http://forum.doom9.org/showthread.php?t=165576

    Because going off-topic, I will have to ask in a separate thread how to exactly setup the command line for a Multipass Encoding VBR and what the 'Quantizer' settings in AVS Video Converter do in this regard.

    I will of course try out your suggestions, and I hope I will succeed entering the right command lines without VD crashing...

    Thanks and Greetings,
    XenonS
    Quote Quote  
  21. Originally Posted by _Al_ View Post
    > or you use --CRF 19 --vbv-bufsize 900 --vbv-maxrate 700
    but you cut off peaks for sure

    As you say, this is best alternative to a simple and maybe wasteful single-pass CBR. I wonder what size the bufsize should be for really high-quality videos in HD to be played by a DVD player. For bitrates around 8000+ and maybe also Blu Ray compatibility. Is this bufize rather linear and should you set it like this?

    700 > 900
    1200 > 1600
    2000 > 2600
    8000 > 4*2600
    etc.

    XenonS
    Quote Quote  
  22. CRF is a bit different to CBR, it does not force that bitrate if it is not needed, but sure, for really low bitrate videos it might not happen much or not at all, it depends on video, that CRF you choose so it is low enough, you basically watch lowest bitrates as oppose to Blu-Ray CRF encoding


    Bitrates targeted to be burn on DVD as data, it should not exceed 17000 - 18000, playing it as data in Blu-Ray player, I'd perhaps be even more conservative, like 15000. Be careful here. So those buffers you set accordingly. So technically you might occasionally cut off peaks here, depending on resolution and your content.

    for Blu-Ray or HD video, you do not cut off peaks (getting inconsistent quality), you'd choose your quality by choosing your CRF number, so quaity is good enough for you, well again, technically speaking you have to cut off peaks but those are maximum bitrates for Blu-Ray, it does not cut off peaks that often:

    - you select quality choosing your CRF, encode it, look at it and fix couple of scenes that encodes bad (8 bit encoding is not optimal for dark scenes, gradient scenes), so you'd fix those scenes using zones

    -or you just choose CRF that is good enough for you for all scenes, either wasting something or not caring if couple of scenes would not come up 100%, I guess almost everyone uses one of those, if using CRF, who'd encode two times, no time ... or some do it anyway encoding it more than once, .... looking at result, and encoding it again with lower CRF, mostly if using CRF first time, not, knowing his "just good enough CRF number" ...


    in both cases you choose buffer as specified for Blu-Ray, 30000 - 35000 or something, also depending what your authoring software accepts

    -or you are limited per Blu-Ray volume if video is long and then you'd use 2pass VBR choosing your calculated average bitrate, or software calculates that bitrate for you if you check some button like "fill BD" or something, but even then that soft needs sort of top bitrates. If preparing videos beforehand you might use command lines and set those buffers manually. If using some encoding software, they know what bitrate it suppose to be for Blu-Ray (you choose Blu-Ray template etc) , so it sets those buffers for you behind scenes.
    Quote Quote  



Similar Threads

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