Hey
I am using the actual versions of VirtualDub and AviSynth + ffmpeg.
For videos with variable bit rate audio streams I am using this script:
With this, the file gets opened in VDub without problems. I can select frames and render without asynchronity issues and other problems. But very often, I get an error, which causes I have to reload the AVS to be able again to edit the video in VDub. The Error gets displayed in the status bar of VDub:Code:ffmpegsource2("E:\video.avi", atrack=-1) ConvertToYV12()
"Error reading source frame 3801: Avisynth read error: CAVIStreamSynth: System exception - Access Violation at 0x201f8d0, readin"
This happens with all formats and codecs, but only with those using VBR audio. And it does not happen replicable. Sometimes it happens on frame 10000, the next time on frame 550, next time on 3844... . I don't get errors at renderings, only if I edit the video / jump around with the frame bar.
I hope you can help me as this is the only way I got VBR audio synchron with VDub...![]()
+ Reply to Thread
Results 1 to 9 of 9
-
-
There is another way:
Code:AVISource("E:\video.avi") EnsureVBRMP3sync()
So I also often use ffmpegsource2() when I need to fiddle around with trims and audio, as it's much more responsive.
Too much zipping back and forth though seems to overflow the Avisynth cache (my guess) and then you get the crashes you noticed. So just save your script after every change and restart if it crashes. -
-
what version of ffms2 ? try updating to the latest if you are not using it already
If it only occurs on VBR audio files, you can try converting those to CBR first -
I use the latest (r517)
Do you mean I should convert (reenocde) the whole vid before I edit it, or do you mean an AVS on-the-fly-convertion? -
I mean stream copy the video, but re-encode the audio using a different decoder, maybe to wav. And then use avisynth on that new video
ffms2 has known isses with non linear seeks (if you're moving all over the place) with MP3 and AC3 (because of ffmpeg)
from the documentation:
Seeking should be sample-accurate with most codecs in AVI, MKV, MP4 and FLV with two notable exceptions, namely MP3 and AC3 where FFmpeg's decoders seem to be completely broken (with MP3 in particular you can feed the decoder the same encoded data three times in a row and get a different decoded result every time). Still, results should usually be "good enough" for most purposes. Decoding linearly will almost always work correctly.
ffmpegsource2("E:\video.avi", atrack=-1, seekmode=0) -
Why would you think that?
It works for any input.
Once I worked that out I was able to cut and join (using Trim and ++) with gay abandon and keep sync.
I'm pretty sure that seekmode setting is the same effect as EnsureVBRMP3sync() (which is not only for MP3).
Also I rarely have any sync issues with ffms2.
It may help to use
FFmpegSource2("E:\video.avi",atrack=-1,fpsnum=-1,fpsden=1)
which locks down the framerate. (The -1 gives you the default rate read from the file, you can override that if you want, or need to adjust it slightly.)Last edited by AlanHK; 20th Aug 2011 at 11:40.
-
Similar Threads
-
AviSynth audio errors while converting with VDub x64
By klischee in forum EditingReplies: 0Last Post: 16th Dec 2011, 13:25 -
Transcoding audio -> ffmpeg - besweet - avisynth?
By wiseant in forum AudioReplies: 4Last Post: 18th Dec 2009, 22:14 -
converting MOD to AVI to MP4 using avisynth, x264, mp4box & ffmpeg
By Wakewatcher in forum Video ConversionReplies: 3Last Post: 27th Dec 2008, 16:58 -
Converting 30fps Progressive to 25fps interlaced ? (Avisynth & VDub)
By blewyn in forum Video ConversionReplies: 6Last Post: 12th Jun 2008, 17:51 -
Speeding up HDTV to DVD via AVISYNTH & VDub
By thymej in forum Video ConversionReplies: 12Last Post: 26th Oct 2007, 22:57