john_dennis wrote on 2/11/2016, 7:43 PM

"I think I can get rid of my Vegas2HandBrake workflow..."

I have the Vegas2HandBrake workflow enshrined in two different system images.

Last changed by john_dennis on 1/26/2017, 8:24 PM, changed a total of 1 times.

My main system:
Motherboard: ASUS ProArt Z790-CREATOR WIFI
CPU: Intel Core i9-13900K - Core i9 13th Gen Raptor Lake 24-Core (8P+16E) P-core Base Frequency: 3.0 GHz E-core Base Frequency: 2.2 GHz LGA 1700 125W Intel UHD Graphics 770 Desktop Processor - BX8071513900K
GPU: Currently intel on-die video adapter
RAM: CORSAIR Vengeance 64GB (2 x 32GB) 288-Pin PC RAM DDR5 5600 (PC5 44800) Desktop Memory Model CMK64GX5M2B5600C40
Disk O/S & Programs: WD Black SN850 NVMe SSD WDS100T1X0E - SSD - 1 TB - PCIe 4.0 x4 (NVMe)
Disk Active Projects: 1TB & 2TB WD BLACK SN750 NVMe Internal PCI Express 3.0 x4 Solid State Drives
Disk Other: WD Ultrastar/Hitachi Hard Drives: WDBBUR0080BNC-WRSN, HGST HUH728080ALE600, 724040ALE640, HDS3020BLA642
Case: LIAN LI PC-90 Black Aluminum ATX Full Tower Case
CPU cooling: CORSAIR - iCUE H115i RGB PRO XT 280mm Radiator CPU Liquid Cooling System
Power supply: SeaSonic SS-750KM3 750W 80 PLUS GOLD Certified Full Modular Active PFC Power Supply
Drive Bay: Kingwin KF-256-BK 2.5" and 3.5" Trayless Hot Swap Rack with USB 3
Sound card: Realtek S1220A on motherboard. Recording done on another system.
Primary Monitor: ASUS ProArt 31.5" 1440p HDR10 Monitor PA328QV
O/S: Windows 10 Pro 10.0.19045 Build 19045
Camera: Sony RX10 Model IV

NormanPCN wrote on 2/11/2016, 9:41 PM
I looked at it some but I have been frameserving directly from Vegas to ffmpeg. Mostly for x264 but I tested some Prores renders for giggles.
VidMus wrote on 2/11/2016, 11:02 PM
@ Marco.

I recently rebuilt my system with a new CPU and motherboard. I did a clean install with Windows 10 Pro 64 bit full version. I decided not to use an OEM version this time.

Intel Core I7 4700K
ASUS Z97-A-USB31 Motherboard
DDR3 16 gig memory.
250 gig SSD boot and 500 gig SSD DATA
NVidia GeForce GTX 580 Graphics.
Sound Blaster X-Fi Titanium because I MUST have my Sound Fonts for my music.

I know there is better, but this is all my budget allows me to have at this time.

I bought and used Vegasaur to keep my many settings. I did not reinstall the Vegas2HandBrake workflow.

Because of problems with my old system, I am way behind on my video editing.

So what is the workflow using Vegasaur instead of the Vegas2Handbrake workflow?

Please keep it as simple as possible. My brain is too tired to figure out stuff at this time! Hmm, I think my brain is too tired to figure stuff out anytime. ;)

Thanks in advance,
altarvic wrote on 2/12/2016, 1:57 AM
Vegasaur's Smart Trim can't replace Vegas2Handbrake - it has another purpose.
It is designed to trim media files on the timeline w/o re-encoding using ffmpeg.
As a nice addition, it can use ffmpeg to perform other tasks, such as converting to ProRes, x264, changing container (eg. mov to mp4) etc.
But it does not render your project as Vegas2Handbrake does
Marco. wrote on 2/12/2016, 5:07 AM
Yesterday when I discovered this Vegasaur feature, I played around in a Vegas project with only a single file in it. That way I oversaw the way Vegasaur treats the sources (just as they are).
It means whatever you've done in your timeline, this Vegasaur feature always reads the raw input files, includes updated length information and outputs ffmpeg processed input file. If you select to process a track, your result will be many single ffmpeg processed files.

Thanks altarvic for the clarification and sorry for the confusion. I should have tested this more carefully before writing. It now makes totally sense the ffmpeg custom commands are used within the trim feature.

Anyway – this Vegasaur feature is just great!
Marco. wrote on 2/12/2016, 5:20 AM
When you say 'you frameserve directly' – you mean using Debugmode Frameserver?
DeadRadioStar wrote on 2/12/2016, 6:01 AM
"Anybody noticed the ffmpeg custom commands which are available since version 2.4 of Vegasaur?"
Absolutely -- best thing to happen in Vegas(aur) in a long time!
NickHope wrote on 2/12/2016, 9:49 AM
Yep, lots of power to be unleashed here.

To reach it, go Vegasaur > Tools > Render > Smart Trim. The FFmpeg custom command is entered by clicking "Build..." at the bottom, and you can save favorite commands under the yellow star for future use.

Here are 4 custom commands from the Vegasaur help file which I previously shared on the thread that gave birth to this...

Re-wrap video files to MP4 (w/o re-encoding). Useful to convert from MOV, but files containing h.264 streams are handled by the same decoder in Vegas:
-ss {start} -i "{input}" -codec copy -t {duration} "{output}[mp4]"

Re-wrap video files to MOV (w/o re-encoding). Useful if you want LPCM audio with H.264 video (e.g. as shot by GH4), which FFmpeg's MP4 container currently doesn't support:
-ss {start} -i "{input}" -codec copy -t {duration} "{output}[mov]"

Re-encode audio to AAC (video is not re-encoded). A good option for keeping audio within FFMpeg's MP4 container:
-ss {start} -i "{input}" -c:v copy -c:a aac -b:a 128k -t {duration} "{output}"

As it stands, as others have said above, Vegasaur Smart Trim is generally better for rendering individual clips for archiving rather than for distributing finished productions. It treats files on the timeline separately, passing them to FFmpeg "outside" of Vegas. i.e. It's not going to read FX, transitions, titles etc. on your timeline. There is a checkbox for concatenating files, but that's only useful if your timeline is all straight cuts and no FX, and I wouldn't be surprised if it's flaky with long-GOP formats.

So for encoding H.264 for the web for example, you'd have to render a single intermediate file and put that back on your timeline. It's an extra step but that's still a valid workflow that gives a higher quality per bit than Vegas' own AVC codecs, keeps you within Vegas and Vegasaur, and saves having to install and set up Handbrake or MeGUI or whatever.

For a "lossless" 8-bit intermediate for this purpose I can recommend UT Video codec. If your source footage is YUV 4:2:0, as most of ours probably still is, then you must render with it using the codec "UtVideo YUV420 BT.709 VCM", not "UtVideo RGB VCM", which will introduce a colour shift in the video that FFmpeg renders. According to my comparisons on the Vegas video scopes the YUV420 version is not 100% lossless like the RGB variant, but it's pretty near. Unfortunately files encoded by my favorite lossless codec, MagicYUV (version 1.2), could not be decoded by FFmpeg. Perhaps in the future.

Here are a couple of custom command lines you can then use for H.264/AAC:

YouTube upload:
-ss {start} -i "{input}" -c:v libx264 -crf 18 -pix_fmt yuvj420p -g 300 -keyint_min 29 -c:a aac -b:a 320k -t {duration} "{output}[mp4]"

Self-hosted web video:
-ss {start} -i "{input}" -c:v libx264 -crf 23 -pix_fmt yuvj420p -g 300 -keyint_min 29 -c:a aac -b:a 128k -t {duration} "{output}[mp4]"

For 25fps video change the value of g to 250 and keyint_min to 25, or delete them, since those are the defaults. Actually, setting those 2 options at all is debatable, but I'm just matching the output that my Frameserver > MeGUI workflow has successfully given me for so long (and which I personally will be sticking to for now).

x264 presets can also be added. Slower presets could make renders smaller for the same quality, but the encoding will be slower and you run the risk of losing compatibility with some devices, players and NLEs. You would add them like this:

-ss {start} -i "{input}" -c:v libx264 -preset slow -crf 18 -pix_fmt yuvj420p -g 300 -keyint_min 29 -c:a aac -b:a 320k -t {duration} "{output}[mp4]"

See the FFmpeg and H.264 Encoding Guide for more options. Also their AAC guide, which still states that the Fraunhofer FDK AAC codec library is preferable to the native FFmpeg AAC encoder, which I don't think is supported in the FFmpeg build bundled with Vegasaur. You'd have to compile your own build to use that. But their December 5th news posting stated that "Subjective quality tests put the (native) encoder to be of equal or greater quality than most of the other encoders available to the public" so it's probably easier just to use that. It sounds OK to me!

Here are a couple more:

"Lossless" h.264 with original audio in mov container (Decodes very slowly in Vegas. Actually not 100% lossless... slightly bandy. Superfast is the sweetspot):
-ss {start} -i "{input}" -c:v libx264 -preset superfast -qp 0 -pix_fmt yuvj420p -c:a copy -t {duration} "{output}[mov]"

Convert to ProRes with standard profile (beware the dreaded Quicktime for Windows gamma shift, which I haven't tried to address):
-ss {start} -i "{input}" -c:v prores -profile:v 3 -c:a copy -t {duration} "{output}[mov]"

H.265 (HEVC). Haven't yet figured out how to maintain levels. Luminance gets "squeezed". Haven't tested for YouTube upload yet:
(x265 documentation here):
-ss {start} -i "{input}" -c:v libx265 -pix_fmt yuv420p -x265-params crf=22:keyint=300:min-keyint=29 -c:a aac -b:a 320k -t {duration} "{output}[mp4]"

Here are the FFmpeg Documentation and FFmpeg Codecs Documentation for further options.

And I was supposed to be getting some work done today....

Please share any other useful custom commands.
NormanPCN wrote on 2/12/2016, 10:52 AM
"When you say 'you frameserve directly' – you mean using Debugmode Frameserver?"

Yes. Debugmode frameserver and Avisynth need to be installed. When ffmpeg is given an .avs Avisynth file for input it triggers ffmpeg to use Video for Windows directly and thus the frameserving can work directly in ffmpeg. No pseudo filesystems necessary as with Handbrake.

So after I start debugmode in Vegas I just run one of the Windows command scripts which does the encode I want. I was primarily encoding AVC MP4 files via the x264 encoder option. I did create command scripts that did ProRes, DNxHD and HEVC/H265 x265 encodes from ffmpeg.
NickHope wrote on 2/12/2016, 10:59 AM
Would be interested to see the code of those scripts Norman.
NormanPCN wrote on 2/12/2016, 11:40 AM
Here is a zip file. It has a readme with some basic description.
Marco. wrote on 2/12/2016, 2:02 PM
Here is one I used yesterday for lanczos downscaling to 720p:

-ss {start} -i "{input}" -s 1280x720 -sws_flags lanczos -c:v libx264 -preset slow -crf 20 -t {duration} "{output}[mp4]"

Wonder which Lanczos version is used by ffmpeg.
VidMus wrote on 2/12/2016, 5:57 PM
@ Marco.

I am now using Sony AVC to render 1080p for my internet files. I am no longer interested in 720p.

The 1080p looks much better in full screen than the 720p does.

My settings are:

18,000,000 bps
1 slice
Render using GPU if available
Enable progressive download

384,000 bps

Video rendering quality: Best


I no longer use the re-sizing that Vegas does because there is none except for the DVD file renders. The render quality I am getting is excellent.

I have the 20 gig a week subscription on Vimeo so the larger video files are no longer a problem. Even with the Vegas2Handbrake workflow, a number of my videos would exceed the 5 gig limit anyway if I wanted to have really good quality for 1080p. If I need more than one video a week, I can now do so. With the 5 gig a week subscription, more than one video a week was not possible no matter what the workflow is.

This way I do not need to install a lot of junk on my system. The leaner the system is, the better!

Note: MC is much faster but when it comes to AVC for online videos but the quality is sub par so I will not use it.

As for Vegas to DVD, I am using MC and got the best quality I ever had with it. Maybe that has something to do with my new clean install and system?

It all works great now, and so far there have been no crashes or errors of any kind, so I am not going to fix it.

So far this is the most stable and fastest system I ever had!

Thanks much,

NickHope wrote on 2/13/2016, 1:16 AM
Thanks Norman. So I may try some future renders by frameserving to FFmpeg via AviSynth instead of MeGUI.

I figured out a H.265 command line and have edited my previous post.

-ss {start} -i "{input}" -c:v libx265 -pix_fmt yuv420p -x265-params crf=22:keyint=300:min-keyint=29 -c:a aac -b:a 320k -t {duration} "{output}[mp4]"

However luminance is not maintained (levels end up at 16-235 on playback). Anyone know how to maintain it. I tried adding a "j", as in yuvj420p, but then I get "Incompatible pixel format 'yuvj420p' for codec 'libx265', auto-selecting format 'yuv420p'". I read that yuvj420p is deprecated in favour of using yuv420p plus color_range settings, but that didn't change anything for me.

By the way, is everyone else's Smart Trim log screen white with very pale grey text? (ie. unreadable without highlighting it)
Marco. wrote on 2/13/2016, 5:32 AM
The log text is fine here, black text on white screen.
relaxvideo wrote on 1/27/2021, 4:32 PM

So with Vegasaur smart trim it is possible to save the project as in the old mpeg2/DV days?

I like to save only that parts of the h264 files (in original quality) which are edited on the timeline. Create new video files from these (to separate files or the whole into a big one?) and then replace the events with the new video files. Fx/transition, etc should remain too.


#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas21 latest

altarvic wrote on 1/28/2021, 2:40 AM


But keep in mind that Smart Trim is NOT frame accurate as it only trims at key frames.

You can test it for free and see if it works with your footage.

relaxvideo wrote on 1/28/2021, 2:03 PM

Yes, if the newly created files are not frame accurate that's not a problem if it start earlier and end later, but i hope Vegasaur will place it on the timeline frame accurate automatically. Right?

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas21 latest

lan-mLMC wrote on 1/29/2021, 4:20 AM


But keep in mind that Smart Trim is NOT frame accurate as it only trims at key frames.

You can test it for free and see if it works with your footage.

@altarvic Can you make Smart Trim frame-accurate by recoding tiny part? Just like SolveigMM Video Splitter.

altarvic wrote on 1/29/2021, 5:00 AM

i hope Vegasaur will place it on the timeline frame accurate automatically. Right?

Currently no, it does not sync the files

altarvic wrote on 1/29/2021, 5:06 AM

@altarvic Can you make Smart Trim frame-accurate by recoding tiny part? Just like SolveigMM Video Splitter.

As @relaxvideo said, it's not so important. The main thing is that new video files are synchronized when they are placed on the timeline (it's on my to-do list)

relaxvideo wrote on 1/29/2021, 5:16 AM

thank you! pls write when finished, so we can work as easily as in old HDV days :)

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas21 latest

wwaag wrote on 1/29/2021, 11:29 AM

The VideoSmartTrim tool in HOS is already frame accurate. Like Vegasaur, it trims to the nearest key frame preceding the start of the event. However, it then employs an image matching algorithm, that compares frames in the copied FFmpeg file to the first frame of the timeline event. Once an exact match is found, an offset is defined and the position of the new event on the timeline is adjusted so there is a match to the trimmed event to the existing timeline event. Here's a demo and a link to the tool description.

AKA the HappyOtter at System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia 1050ti graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Joelson wrote on 1/29/2021, 11:52 AM

@lan-mLMC @relaxvideo

The HOS SmartVideoTrim mentioned above has the same precision as SolveigMM Video Splitter and still has the advantages of being able to be used directly from Vegas, automatically adding files processed in the timeline and being about three times faster in processing compared to SolveigMM Video Splitter.

The Vegasaur developer also mentioned above that he is improving the Smart Trim tool. Therefore, I believe that Vegasaur users will soon have a Smart Trim more accurate.