Log in

View Full Version : Exporting a VEGAS project directly to VapourSynth


Couleur
18th March 2022, 13:53
Hey,

What are some good ways to export a VEGAS project?

I've tried to mess with these old vegas2handbrake scripts from www.vegasvideo.de (website's dead), using DebugMode/CuminCode frameserver and AVFS, but it either crashed my explorer, did not work and the rare times when it did it was very slow and the colors were messed up. (As you guessed it I'm no colors expert, MPV reports my content is yuv420p, with a bt.709 colormatrix and Limited levels)

One other alternative I tried would be to losslessly export using Voukoder (e.g UTVideo) but it ends up making a huge (but temporary) file you then need to import in VapourSynth. My end goal would be making a vegas script that automates everything. If you want more context about what I'd use it for / full context, check this thread (https://forum.doom9.org/showthread.php?t=183826)

What would you guys recommend without having to go through an AviSynth script? (Or even better, a guide)

PS: If you know about doing this on other NLEs like Premiere Pro / After Effects I'm all ears as well

_Al_
19th March 2022, 20:52
using debugmode frameserver (https://www.debugmode.com/frameserver/), latest version, now 3.1 you import video and audio.
You need to fix video levels, because Vegas might treat your original to Studio RGB, so you need to import it and convert it to RGB full. Or you need to apply SudioRGB to Computer RGB effect within Vegas. Preferred is that last one. Look at your colors in previewer because there is a chance Vegas would not confirm your video to Studio RGB.
loading that avi into vapoursynth:
rgb_vnode = core.avisource.AVISource(frame_server.avi)
clip = core.resize.Point (clip=rgb_vnode, range_s="full")
you do not change to full if colors are ok from frame server, because that change to full is not optimal at all, you might get information disappearing from highlights, you better conform it in Vegas , before frame server handles data or you might try vapoursynth line:
clip = core.resize.Point(rgb_vnode, format=vs.RGBS)
clip = core.std.Levels(clip, min_in=0.063, max_in=0.92, gamma=1, min_out=0, max_out=1, planes=[0,1,2])

As for audio, there were some bugs, it used to confirm always to 44100Hz and there was a glitch at the end of audio, check it out here (https://forum.videohelp.com/threads/388684-Vegas-Pro-14-available-for-20#post2517096),
those glitches might be gone by now, not sure, I did not tested it lately. You can always use original audio, if not cutting video in Vegas.

vspipe --y4m input.py - | x264 --demuxer y4m --crf 18 --vbv-bufsize 20000 --vbv-maxrate 20000 --colorprim bt709 --transfer bt709 --colormatrix bt709 --output output.264 -
to cut that audio glitch from the end, created by debugmode, using time variable, that is length of video:
ffmpeg -i source -t {time} -vn -f wav - | neroAacEnc -ignorelength -lc -cbr 256000 -if - -of output.m4a
or use audio from original while muxing:
mp4box -add "output.264:fps={fps}" -add "{source}#audio -new "output.mp4"
just to show some things, with syntax mistakes for those variables, you'd need to use proper syntax

Couleur
23rd March 2022, 18:52
Don't you need to do some kind of folder mapping with AVFS.exe before revving up vspipe?

poisondeathray
23rd March 2022, 19:04
Don't you need to do some kind of folder mapping with AVFS.exe before revving up vspipe?

Why are you using avfs ?

avfs is for mounting avs or vpy scripts. You don't need it for frameserving out of vegas

You can open the signpost AVI from vegas directly with AVISource