VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 53
Thread
  1. 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?
    Quote Quote  
  2. Yes it's messed up

    Is that a render loop area , or the complete project in vegas ?
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    Yes it's messed up

    Is that a render loop area , or the complete project in vegas ?
    Loop area.
    Quote Quote  
  4. I just rendered a 5 minute entire project (loop region unchecked) and the faulty audio is there.
    Quote Quote  
  5. How are you loading the signpost ? AVISource or DirectShowSource ?
    Quote Quote  
  6. 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)
    As a side note: The audio was already 48000, but Ripbot always has the audio frequency option grayed out.
    Quote Quote  
  7. 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
    Quote Quote  
  8. Originally Posted by poisondeathray View Post
    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)
    Replaced RaWavSource for Import and Ripbot simply skipped rendering all together.

    Also tried with:

    Code:
    audio=WAVSource("C:\Temp\RipBot264temp\job5\audio.wav")
    And rendered with the faulty audio.
    Quote Quote  
  9. 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")
    Quote Quote  
  10. 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.
    Quote Quote  
  11. 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.
    Quote Quote  
  12. Thanks for the advice, I'll try with different source files and projects in Vegas.

    What I do since the audio comes from Frameserver in 44100 Hz is to render the audio track in 48000 and merge with Avidemux.
    Quote Quote  
  13. 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.
    Here's another render test of a complete project (no loop regions), the original video is an mpeg2 put in a sigle track. The project settings are the same as the source format.

    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
    Vegas:
    Video: 00:00:04.280, 25.000 fps progressive, 1920x1080x12, MPEG-2
    Audio: 00:00:04.280, 48,000 Hz, Stereo, MPEG Layer 2
    Perhaps the video player forces the video track to get in sync with the longer audio track, that's why we don't see the last microsecond looking black.

    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.
    Image Attached Thumbnails Click image for larger version

Name:	2014-07-03 16_42_27-Untitled _ - Vegas Pro 12.0.png
Views:	193
Size:	100.9 KB
ID:	26052  

    Click image for larger version

Name:	2014-07-03 16_53_56-Untitled _ - Vegas Pro 12.0.png
Views:	174
Size:	88.9 KB
ID:	26053  

    Last edited by lonrot; 3rd Jul 2014 at 19:02.
    Quote Quote  
  14. 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 & audio
    Last edited by poisondeathray; 3rd Jul 2014 at 18:48.
    Quote Quote  
  15. 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?
    Quote Quote  
  16. 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.
    Quote Quote  
  17. 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
    Quote Quote  
  18. Originally Posted by _Al_ View Post
    Checking "write audio as PCM ..." in dmfs export causes it.
    If it is not checked, then it is ok.

    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]
    So in essence loading a custom avs script might fix the problem altogether?
    Quote Quote  
  19. 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
    Quote Quote  
  20. 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
    Quote Quote  
  21. Or another idea, that was already mentioned in the other thread, load Avisynth script into Ripbot. In that case Ripbot should load audio.
    Quote Quote  
  22. Originally Posted by _Al_ View Post
    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.
    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
    Quote Quote  
  23. Originally Posted by _Al_ View Post
    Or another idea, that was already mentioned in the other thread, load Avisynth script into Ripbot. In that case Ripbot should load audio.
    Can you do that without creating a separate wav file?

    I tried with this:

    Code:
    AVISource("Z:\Zoomin Games\renders\fs.avi")
    OR

    Code:
    AVISource("Z:\Zoomin Games\renders\fs.avi",audio=true)
    And Ripbot apparently detects the audio track, but after rendering there's no sound.
    Last edited by lonrot; 3rd Jul 2014 at 20:17.
    Quote Quote  
  24. I have a sound rendered in ripbot.
    In this case for troubleshooting you should drop that avs script onto MPCHC desktop icon - if you can hear sound, something weird is going on, delete everything in ripbot and try again.
    Quote Quote  
  25. Originally Posted by _Al_ View Post
    I have a sound rendered in ripbot.
    In this case for troubleshooting you should drop that avs script onto MPCHC desktop icon - if you can hear sound, something weird is going on, delete everything in ripbot and try again.
    I have tried several times and discovered that MPHC only plays the audio track for the first time, If I close and reopen the avs file MPCHC won't detect sound anymore so I have re-open frameserver to get the audio back.
    Last edited by lonrot; 3rd Jul 2014 at 20:40.
    Quote Quote  
  26. Is the script created by ripbot ok? Try to drop that script job#.avs onto MPCHC.
    Quote Quote  
  27. Originally Posted by _Al_ View Post
    Is the script created by ripbot ok? Try to drop that script job#.avs onto MPCHC.
    MPCHC reads the job1.avs file perfectly during the first playback, with a second reproduction the sound is gone and I must reopen Frameserver to get it back
    Quote Quote  
  28. Huh? did you leave vegas and dmfs alone during those tests ?
    Quote Quote  
  29. Originally Posted by poisondeathray View Post
    Huh? did you leave vegas and dmfs alone during those tests ?
    Yes, I don't even ALT-TAB afraid of messing something up
    Quote Quote  
  30. 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 ?
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!