Every video gets the audio reverted at the last second when frame serving from Vegas.
This doesn't happen when encoding existing video files in Ripbot or Vegas.
Here's the video converted from an mpeg2 using Ripbot.
Here's the video with faulty audio encoded via frameserver from Vegas to Ripbot.
Any clues on what's happening?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 53
Thread
-
-
I just rendered a 5 minute entire project (loop region unchecked) and the faulty audio is there.
-
I have no idea, the audio is loaded separately as DirectShowSource, but video just says "Import()"
Code:video=Import("Z:\Zoomin Games\renders\fs.avs").ConvertToYV12() #AudioSource audio=DirectShowSource("Z:\Zoomin Games\renders\fs.avs",video=false) audio=ResampleAudio(audio,48000) #AudioDub audio=ConvertAudioTo16bit(audio) AudioDub(video,audio) #AVSameLength Trim(0,7280)
-
Post fs.avs
Directshowsource is a potential source for many problems in the avisynth world
ResampleAudio() only does something if there is a difference. So if input is 48Khz, output is 48Khz , it's a no-op (nothing is done). So this assumes the audio is correctly "seen" as 48Khz. however Directshow filters might be resampling it (whenever you have directshowsource - it relies on your current ds system filter configuration -so it can be very unreliable and inconsistent)
Try changing that line to Import()
Instead of
audio=DirectShowSource("Z:\Zoomin Games\renders\fs.avs",video=false)
use
audio=Import("Z:\Zoomin Games\renders\fs.avs")
To rule out loop region / frame server / vegas issues, take the original avs script and encode with something else eg. soundout(), megui , ffmpeg etc... If audio is ok, you have your answer - something wrong with ripbot implementation. If audio is NOT ok then then the problem lies upstream - either with frameserver, vegas or something else -
Here's another frame server conversion:
Code:#VideoSource video=DirectShowSource("Z:\Zoomin Games\renders\wiiu.avi",audio=false).ConvertToYV12() #AudioSource LoadPlugin("C:\Program Files\Ripbot\tools\AviSynth plugins\NicAudio\NicAudio.dll") audio=RaWavSource("C:\Temp\RipBot264temp\job5\audio.wav",1) audio=ResampleAudio(audio,48000) #Delay audio=DelayAudio(audio,0) #AudioDub audio=ConvertAudioTo16bit(audio) AudioDub(video,audio) #AVSameLength Trim(0,223)
Also tried with:
Code:audio=WAVSource("C:\Temp\RipBot264temp\job5\audio.wav")
-
How are you loading audio in the last one ? Directly as separate wav? from frameserver as an AVI, or from AVS ? or was the wav generated by ripbot ? from what ? (Where is "audio.wav") coming from ?
If you want to systematically figure out what is wrong, do what I suggested above , or even preview the avs in mpchc to listen if the audio is frameserved correctly or not . If it's already b0rked from the frameserve, you're wasting your time fiddling with ripbot because the error is upstream
AVISource("signpost.avi") -
As you suggested, Ripbot doesn't have anything to do with the faulty audio, opening the fs.avi through VirtualDub and Mpchc does preview faulty as well. Tested with Vegas 13 and Frameserver 2.15 and also Vegas 12 with Frameserver 2.14. The results are the same.
Last edited by lonrot; 3rd Jul 2014 at 17:29.
-
I don't recall that happening with older vegas + dmfs versions . Did you try with different source files, different projects ?
If it always and only occurs at the end, maybe as a workaround you can extend the audio in vegas (blank audio) and blank video, then use Trim() in the avs script
Or export audio separately from vegas (partially defeats the purpose of frameserver....)
Did you notice your test files in the 1st post were different? The "working" file is 1 frame less and correspondingly 40ms shorter . I thought it might have been related to the issue or loop region, hence the suggestion to render the whole file. -
Did you notice your test files in the 1st post were different? The "working" file is 1 frame less and correspondingly 40ms shorter . I thought it might have been related to the issue or loop region, hence the suggestion to render the whole file.
Faulty render from Frameserver:
https://dl.dropboxusercontent.com/u/62131673/video/Untitled.mp4
Working render from Vegas:
https://dl.dropboxusercontent.com/u/62131673/video/wiiu.m2t
Both have the same number of video frames, but the audio is longer in the Frameserver version.
Frameserver:
Video: 00:00:04.280, 25.000 fps progressive, 1920x1080x12, AVC
Audio: 00:00:04.330, 48,000 Hz, Stereo, AAC
Video: 00:00:04.280, 25.000 fps progressive, 1920x1080x12, MPEG-2
Audio: 00:00:04.280, 48,000 Hz, Stereo, MPEG Layer 2
Maybe there's a function for avisynth to match the audio track with the video track and ignore the extra bit.
Something like: AudioTime = VideoTime?
Or: EndAudioSecond = EndVideoSecond?
Edit: In Vegas both audiotracks take the same lenght in the timeline but the faulty area is 0:00.292 secs (14 004 samples) aproximately, It matches the audio being longer as I mentioned earlier. What a mess.Last edited by lonrot; 3rd Jul 2014 at 19:02.
-
This one is ok frame wise in terms of video . Mixed up audio, mixed up video frames can also be the result of DirectShowSource() which isn't always frame accurate
This problem is more than 1 or 2 frames duration, or 25-50 ms for 25fps - it's about 300 ms . Open it up in an audio edtior like audacity and you will see - It's skipping to an earlier section that overlaps what should be the actual audio. But the video is fine . When DirectShowSource() fails, usually the video fails (frames out of order), not the audio, so I doubt this is a DSS issue
There is no function to fix this in avisynth
If you did the add blank video/audio workaround in vegas then trim() in avisynth I suspect it would work if this error only occurs at the end
Or just save out audio separately from vegas, but it would be nicer to get frameserver working for both video & audioLast edited by poisondeathray; 3rd Jul 2014 at 18:48.
-
Can you provide a trimming code reference for 300 ms at the end?
Is there a way to make Frameserver render the audio in 48000 as the original project settings? -
Checking "write audio as PCM ..." in dmfs export causes it.
If it is not checked, then it is ok.
Ripbot then would not load audio I think, if it is unchecked, but personally I use command lines.
Maybe it also showing that symptom if changing audio frequency , as you investigate it now, not sure, but I think only with that button checked it shows that symptom.
I'd like to know advantages of checking that box as oppose leaving it empty. I always thought that by checking it I do a favor to receiving application having audio neatly in PCM already prerendered (it is stored in singnpost.avi) but debugmode frame server can do it on the fly as well without problems, is that right? I think yes. -
1) Frameserver should be serving same as what your project settings are . Project properties, audio tab. Double check it's not set to 44100
2) Trimming it as-is isn't a good option, because that "bad" part is on top of some good audio. Hence the suggestion to "add" some blank frames and blank audio (Unless you don't care about the end of each project)
Trim works inclusively on frames
e.g
Trim(0,200) would include frames 0-200
If you include both audio & video in the script, both audio & video will be cut
Of course you have to figure out where you want to cut (what frame number), the value would be different for each clip , and the "bad" part might not always be the same exact value -
Hurray! That fixes the faulty audio when reproducing with VirtualDub and MPC-HC. But no audio in Ripbot.
Here's what MHPC says about the audio:
Audio: PCM 48000Hz stereo 1536kbps [A: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s] -
I have batch files for different type of video coming from dmfs (Vegas project properties), it has to be that way, separate batch files for different Vegas project properties because mediainfo (I can use it for reading video parameters in batch file) is not able to figure out fields in signpost.avi automatically (and therefore adjust encoding etc).
I posted it here once or more, it is dmfs from Vegas.zip, inside are batch encoders for making:
-DVD from HD interlace project
-mp4 HD double frame rate from HD interlace project
-mp4 HD interlace from HD interlace project
-mp4 HD progressive from HD progressive project
-m2v and AC3 from HD interlace project
these batch files can be easily modified to different projects or settings -
Yes , if it's fine in vdub with the fake AVI loaded directly, you should be fine with AVISource() in ripbot... Go back to the other thread, but you need audio=true (just leave it out, because it's true by default)
Or learn to use commandline and batch scripts like _Al_ is suggesting - that way you don't waste time with ripbot and GUI's which waste time analyzing files , demuxing audio etc... You can start encoding right away -
It's more accurate because the samples are rendered.
That's the way I've done it in vegas for years, premiere for years, I've always had write PCM... checkmarked when I needed audio, I've always used AVISource() to read the signpost, because it's more reliable, less prone to those DSS issues . If you leave it unchecked, then non linear seeks can have problems . In programs that need non linear access, encoders that use b-frames or have lookahead, you can get problems
In fact , I just did a quick test and I can reproduce similar error with truncated audio when it was unchecked.
The negative is the "dummy" AVI is larger, but the advantages far outweight the disadvantages IMO -
Last edited by lonrot; 3rd Jul 2014 at 20:17.
-
Last edited by lonrot; 3rd Jul 2014 at 20:40.
-
-
I have no idea what that is happening. It shouldn't matter how many times you open/close access it, as long as vegas is opened and the frameserver is serving - especially if you have PCM samples written (they are physically written to disc)
Is only the audio affected ? you can open video any number of times without having to restart the frameserver ?