View Full Version : Vegas x264vfw: Video delay on playing output file.
Bleck
26th December 2012, 12:43
Hello. Im using x264vfw + ac3 on Sony Vegas Pro 12. It renders good, without errors, but all the output files that creates are video delayed like 3 seconds on the start, so the audio is not sync.
i have noticed that when starting render process, in the preview video window of Vegas, there is a speedup of the first 3 seconds, and later it becomes slow.
This is my settings:
http://s2.postimage.org/xilyu2mp5/image.jpg
http://s2.postimage.org/6ska2l2eh/image.jpg
http://s2.postimage.org/c1fb0gktl/image.jpg
My Sony Vegas is up to date, and I only have this problem with x264vfw.
sneaker_ger
26th December 2012, 14:11
Try using a different output mode (to *.h264 file) and mux video and audio manually afterwards with mkvmerge or l-smash or mp4box or a different muxer of your choice, unless you absolutely need avi.
Komisar (http://komisar.gin.by/) has updated vfw versions, btw.
Bleck
26th December 2012, 14:21
Thanks, but that build doesnt have the presets.
I will test it. And I cant output it raw or mp4 because I need the audio. I would use cli instead of that.
sneaker_ger
26th December 2012, 14:34
I never use x264vfw, but I think Vegas should still create an AVI file with the audio in it. Only the video in the AVI will be fake. I don't understand what you mean with the "cli" part.
Bleck
26th December 2012, 14:39
I mean I use vfw to avoid the process import -> edit -> render uncompressed avi -> encode with x264.exe. Also, for some reason, I get a bit more speed with vfw with same settings. So its very convenient for me to use it.
And same delay problem with Komisar's builds.
sneaker_ger
26th December 2012, 14:49
I don't quite understand what you're trying to say, but, well, H.264 in AVI is shit and as long as Vegas uses vfw output, you will have to either create a temporary file and mux with a different muxer later on or use some kind of frameserver (which does exist for Vegas IIRC) and combine it with CLI tools. It sucks, but that's the way it is.
The temporary file can be either:
1. lossless intermediate (meaning two encodes and lots of HDD stress because of the huge file)
2. AVI with audio and fake video(<- what I would recommend)
3. AVI with audio and video
You may be able to fix your #3 files if you run them through mkvmerge once, but I'm not sure about that. That's why I recommend #2. You encode the video properly to an external file and mux it together with the fake AVI's audio part using mkvmerge. If your muxer needs raw AC3 you can use e.g. Avi Mux GUI to extract the raw AC3 data from the avi.
Bleck
26th December 2012, 14:58
I was using a .bat to do all of that already. If its impossible to render the audio and the video properly with vfw on vegas, Im not asking for anything more. Im going back to cli.
sneaker_ger
26th December 2012, 15:14
So you've been using Vegas solely as an encoding front-end and not actually for editing? Sounds like very expensive over-kill.
Bleck
26th December 2012, 15:27
I have to edit all my files, so I use it for edit and export uncompressed avi. But the ability of x264 vfw can skip a step for me (less time).
Update on the problem: The delay occurs when using CRF. Using Multipass - Nth Pass render files without dealy at start. Also, 2pass files are black in VLC, and empty in media player.
sneaker_ger
26th December 2012, 15:48
I have to edit all my files, so I use it for edit and export uncompressed avi. But the ability of x264 vfw can skip a step for me (less time).
If you use option #2 you will still save some time, because you don't encode the video twice and also you will have less stress on the HDD.
Also, did you try remuxing output of #3 (what you have been using till now) with mkvmerge?
Update on the problem: The delay occurs when using CRF. Using Multipass - Nth Pass render files without dealy at start. Also, 2pass files are black in VLC, and empty in media player.
Yeah, vfw reacts in strange ways because it is not suited for H.264. That's why people around here usually recommend to stay away from it or at least use the raw .h264 file output. Maybe it can be worked-around (I don't know how Vegas reacts to the VirtualDub hack), but I don't know. AVI/vfw is not suited to b frames.
poisondeathray
26th December 2012, 16:18
Have you considered debugmode frameserver as another option?
Bleck
26th December 2012, 17:09
Have you considered debugmode frameserver as another option?
Not available for 64 bits. Vegas is current only 64.
If you use option #2 you will still save some time, because you don't encode the video twice and also you will have less stress on the HDD.
Also, did you try remuxing output of #3 (what you have been using till now) with mkvmerge?
I do that. I encode the uncompressed avi from vegas with a batch script:
@echo off
cd\
cd C:\Users\Developer\Desktop\ffmpeg
x264_8.exe --demuxer avs --output-csp i420 --threads 0 --crf 25 --preset veryslow --subme 11 --no-fast-pskip --output video.264 input.avi
ffmpeg.exe -y -i input.avi -vn -acodec copy audio.wav
neroaacenc.exe -br 64000 -2pass -hev2 -if audio.wav -of audio.aac
mp4box\mp4box.exe -hint -add video.264 -add audio.aac final_%random%.mp4
del /f /q video.264
del /f /q audio.wav
del /f /q audio.aac
pause
exit
The point is, if I can create a final compressed video directly from Vegas, I save the batch step...
Probably some x264 developer here know the reason of the delay, sounds bit distribution problem to me...
sneaker_ger
26th December 2012, 17:19
I do that. I encode the uncompressed avi from vegas with a batch script:
If you use a lossless compression this will take much more time than #2. If you do not compress at all, it might also take some time depending on how fast your HDDs are.
Bleck
26th December 2012, 17:32
Yeah, vfw reacts in strange ways because it is not suited for H.264. That's why people around here usually recommend to stay away from it or at least use the raw .h264 file output. Maybe it can be worked-around (I don't know how Vegas reacts to the VirtualDub hack), but I don't know. AVI/vfw is not suited to b frames.
What if I do not use bframes?
EDIT: Same...
poisondeathray
26th December 2012, 18:16
Have you considered debugmode frameserver as another option?
Not available for 64 bits. Vegas is current only 64.
It works for earlier 64bit versions of vegas, maybe something changed in 12?
You need to put the config file in the 64-bit installed folder
See this guide, and the comments
http://forum.videohelp.com/threads/332602-%5BGuide%5D-Using-DMFS-on-Windows7-64bit-%28with-Sony-Vegas-Pro-10-64bit%29
MasterNobody
26th December 2012, 18:35
Image for references:
http://i45.tinypic.com/2re2uxc.png
Originally you supposed to see such log window with warning and suggestions how to fix this problem:
http://i48.tinypic.com/33ua8t4.png
But because in 1 you set to "None" it wouldn't show up. Even if you return it to "Warning" you probably wouldn't be able to read it due the way how Vegas dispatch windows messages (log window show but is not responsive) and that this probably the reason of your change to "None" (sorry, in near time I am not going to do any workaround for this log problem in Vegas).
Now about suggested ways to fix this from log window:
"if you use VirtualDub or its fork than you can enable 'VirtualDub Hack' option" - you can NOT use this because you use Vegas not VirtualDub so keep 2 unchecked.
"you can enable 'Zero Latency' option" - you can use this by checking 3 BUT this will go with significant quality hit (due disabling B-frames, MBTree and other) so I wouldn't recommend it.
"you can enable 'File' output mode" - I would recommend to use this in your case by changing 4 to "File" and specifying path to output file in 5 (for example, c:\output.mkv; here you can use output format like AVI/FLV/MKV/MP4/H264 by changing file extension). But because this out file will have only video part you will have to mux it latter with audio part yourself.
Bleck
26th December 2012, 18:44
It works for earlier 64bit versions of vegas, maybe something changed in 12?
You need to put the config file in the 64-bit installed folder
See this guide, and the comments
http://forum.videohelp.com/threads/332602-%5BGuide%5D-Using-DMFS-on-Windows7-64bit-%28with-Sony-Vegas-Pro-10-64bit%29
The files created with frameserver are corrupted.
With lavf:
[avi @ 00000000015064E0] non-interleaved AVI
[avi @ 00000000015064E0] max_analyze_duration reached
[NULL @ 00000000015802E0] No codec provided to avcodec_open2().
With avc:
avs [info]: trying AVISource... failed
avs [info]: trying FFmpegSource2... not found
avs [info]: trying DSS2... not found
avs [info]: trying DirectShowSource... failed
avs [error]: unable to find source filter to open `input.avi'
x264 [error]: could not open input file `input.avi'
With ffms:
ffms [error]: could not create index
x264 [error]: could not open input file `input.avi' via any method!
And its serving:
http://s9.postimage.org/u4de6wp33/free.jpg
Bleck
26th December 2012, 18:46
Image for references:
http://i45.tinypic.com/2re2uxc.png
Originally you supposed to see such log window with warning and suggestions how to fix this problem:
http://i48.tinypic.com/33ua8t4.png
But because in 1 you set to "None" it wouldn't show up. Even if you return it to "Warning" you probably wouldn't be able to read it due the way how Vegas dispatch windows messages (log window show but is not responsive) and that this probably the reason of your change to "None" (sorry, in near time I am not going to do any workaround for this log problem in Vegas).
Yes, just because that.
Now about suggested ways to fix this from log window:
"if you use VirtualDub or its fork than you can enable 'VirtualDub Hack' option" - you can NOT use this because you use Vegas not VirtualDub so keep 2 unchecked.
"you can enable 'Zero Latency' option" - you can use this by checking 3 BUT this will go with significant quality hit (due disabling B-frames, MBTree and other) so I wouldn't recommend it.
"you can enable 'File' output mode" - I would recommend to use this in your case by changing 4 to "File" and specifying path to output file in 5 (for example, c:\output.mkv; here you can use output format like AVI/FLV/MKV/MP4/H264 by changing file extension). But because this out file will have only video part you will have to mux it latter with audio part yourself.
Well ok, I will try. Now Im trying to get frameserver working with x264 and download a 64 bits version of vp8vfw (cant find it anywhere over the internet).
poisondeathray
26th December 2012, 18:59
The files created with frameserver are corrupted.
In the past, certain versions of vegas with dmfs required you make the avs script separately instead of feeding directly to x264 (even though the x264 binary was compiled with avs support - I can't why, but it worked) . It's worth a try
Warperus
27th December 2012, 10:24
Bleck
1) Try frameserving in RGB24.
2) As your quality setting is not visually transparent you can render in sony mxf format instead of uncompressed avi without noticeble quality loss (if you don't mess with levels). It will be probably quicker than uncompressed avi rendering (depends on disk and processor speed).
3) You can simply set up audio delay in remuxing stage if it's stable/predictible.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.