Log in

View Full Version : AVS file loads but will not play in Virtualdub


tyee
8th November 2013, 04:59
This is my script

aud = FFAudioSource("movie.mkv")
vid = FFVideoSource("movie.mkv").assumefps(24000,1001)
AudioDub(vid,aud)

Loads fine. I can scrub thru the timeline and see all frames. File Information sees the video and audio (pcm), but clicking play button results in nothing. If I load this same script into mpc-hc it plays just fine.

If I load this avs into Graphedit I get this. It plays fine if I hit play in graphedit.

http://www.tonyplay.net/hoo/vdub.jpg

raffriff42
8th November 2013, 05:41
If your compression or color depth is not set right, Play won't work, but you get an error message.

If you have a selection on the timeline, but your cursor is outside the selection, Play does nothing with no error message.

tyee
8th November 2013, 07:46
OK, after a lot of googling I find Vdub does not support 5.1 audio. It just would not play at all. As soon as I downmixed to stereo it plays. I will edit in this mode then remove the downmix to save. I hope I can save in 5.1.

I'm trying to shift the audio a few seconds here and there in a movie and this happens more than 15 times throughout it. I have done this last week using just avisynth script fed into mpc-hc and it worked out great, but I want to try it with Vdub and see if it is any faster. Without being able to drag an audio timeline it will be tedious I assume just like my first method. Any other tips to make this easier without using Sony Vegas? Even using Vegas I don't know if it exports 5.1 audio or even loads it, or even loads an mkv?

Videohelp Discussion (http://forum.videohelp.com/threads/344362-VirtualDub-doesn-t-play-audio-in-preview?p=2147474&viewfull=1#post2147474)

Downmix for Vdub

function Dmix6Dpl(clip a)
{
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.3205, 0.2265)
bl = GetChannel(a, 5)
br = GetChannel(a, 6)
sl = MixAudio(bl, br, 0.2265, 0.2265)
sr = MixAudio(bl, br, -0.2265, -0.2265)
blr = MergeChannels(sl, sr)
return MixAudio(lrc, blr, 1.0, 1.0)
}

Hey raffriff42
I found your Vdub tutorial today and it looks great! Well done! I was trying to find out how to use job control to do the edits I mentioned above. I found this --

Position time line cursor at start; set edit "in" point: {Home}
Position cursor at 15 minutes, or whatever your time limit is
(or less; choose a nice place to cut)
Set edit "out" point: {End}
File menu, Queue batch operation, Save AVI (see post #5)
make a name like "XYZ Part 1"
nothing happens yet, but the "Job" is "queued"
you should see your video under File menu, Job control
Keep time line cursor where it is; set "in": {Home}
Move to next 15 minute cut point, {End}
File menu, Queue batch operation, Save AVI
(REPEAT...)
File menu, Job control : you should see all your 15 min videos!
Hit Start to begin encoding!

I assume this is the technique I should use, yes? I just want to save the 5.1 audio after all the time shifts, will the above do it?

raffriff42
8th November 2013, 21:42
Thanks, tyee, glad it helped you! Let me think about your editing question... I think this is best done in a proper NLE

EDIT 1 Vegas does not load 5.1 AFAIK but will import 6 mono tracks and (I think) render to 5.1.
EDIT 2 Vdub does not do audio-video split edits. This could be worked around by making 15 sub videos, but...no.
I have done this using Avisynth, but it's tough because vdub audio sync in preview is not too good with high-bitrate video. It's best to spot-check sync with 5-10 second test encodes.

BTW vdub version 1.10.4 plays this 5.1 file just fine: General
Complete name : D:\...\! BarsHD+Grayscale+bars709flash+6ch vr18 709 ac3.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 636 KiB
Duration : 12s 867ms
Overall bit rate : 405 Kbps
Writing library : VirtualDub build 35475/release

Video
...

Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : 2000
Duration : 12s 783ms
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 299 KiB (47%)
Alignment : Aligned on interleaves
Interleave, duration : 36 ms (1.09 video frame)
Interleave, preload duration : 522 ms


This one tooGeneral
Complete name : D:\...\! Grayscale+bars709flash+6ch Rec709 vx20+pcm 2.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 3.45 MiB
Duration : 5s 873ms
Overall bit rate : 4 922 Kbps
Writing library : VirtualDub build 35475/release

Video
...

Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 00001000-0000-0100-8000-00AA00389B71
Duration : 5s 837ms
Bit rate mode : Constant
Bit rate : 4 234 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Back: L R, LFE
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Stream size : 2.95 MiB (85%)
Interleave, duration : 36 ms (1.09 video frame)
Interleave, preload duration : 500 ms