View Full Version : Video+Audio,how
Dogway
11th March 2010, 23:38
I would like to know if Im doing something wrong. I cant get to mux audio into video.
SetMTmode(5)
video=MPEG2Source(VIDEO_TS.d2v", cpu=0)
audio=nicac3source("VIDEO_TS T80 2_0ch 256Kbps DELAY -1ms.ac3")
SetMTmode(2)
audiodub(video,audio)
trim(18010,18970)
Im encoding this into x264
Didée
11th March 2010, 23:50
I'm not sure if I remember correctly (didn't use Nic's audio source for ages), but wasn't it acting so as to perform an inherent audiodub to inherent last? - Try just this:
MPEG2Source(VIDEO_TS.d2v", cpu=0)
nicac3source("VIDEO_TS T80 2_0ch 256Kbps DELAY -1ms.ac3")
return info
Dogway
12th March 2010, 00:02
"No video" message. I don't mind not using Nicaudio, whatever is useful to mux audio into video taking into account my video trims is nice. I did some searches but this code was the nearest I could get.
Guest
12th March 2010, 00:07
I would like to know if Im doing something wrong. I cant get to mux audio into video.
...
Im encoding this into x264 Your script is correct to combine the audio and video for serving via Avisynth. But when you open that in x264 and encode, only the video is processed. You must mux the audio and video after transcoding the video, e.g., with mkvmerge, tsmuxer, or some equivalent for your target container.
txporter
12th March 2010, 00:12
I also mux audio and video separately, but possibly it can be done with this fork/version (http://forum.doom9.org/showthread.php?t=151733) of x264?
Dogway
12th March 2010, 00:21
Until now, I was just encoding each of them separately and muxing with megui. I thought I could do an automated type of muxing with avisynth.
My real script is:
video
audio
audiodub(video,audio)
a=trim1
b=trim2
...
return a+b+...
so I dont have to delete audio gaps between trims manually in an audio editor for each one of the episodes.
osgZach
12th March 2010, 02:59
I think what you need to do is..
Load that script into virtualdub, save the audio-only using one of Vdubs codec options (there are codecs out there for MP3, AC3, and I think it supports output to WAV internally).
So you've got your audio file with cuts. Now serve the video file, with the same cuts, to x264 in another script, or just modify your current one to take the audio dubbing portion out.
You should now have an audio file and video file that can be muxed together, and hopefully match.
Sounds like it would work?
Otherwise, just use MeGUI's one-click / auto-encode option.. I can recall the differences but you can do cutting in MeGUI too, and it should work for your audio as well. Then it will handle the encoding and muxing as per normal.
Dogway
12th March 2010, 06:34
I think what you need to do is..
That was smart, it worked thank you.
By some reason I thought I could crop audio without reencoding, like cropping videos, but seeing its not possible then thats the best solution.
Gavino
12th March 2010, 11:17
You could also look at using the SoundOut plugin (use search) to save the audio from your script in your required format (it will still be re-encoded, of course).
osgZach
12th March 2010, 15:49
For what its worth. If your source is AC3, I believe MeGUI's audio cutting tools allow you to cut without damaging/re-encoding the whole file.
It may be worth it to look for a guide that handles A+V in MeGUI via its various script builders
tebasuna51
13th March 2010, 02:54
Yes, use MeGUI -> Tools -> AVS Cutter to create a .clt file and after use Tools -> Audio Cutter to split and join the audio without re-encode.
Dogway
14th March 2010, 13:04
tebasuna51: thank you, that worked too, looks like besplit can crop audio without reencoding.
At last I encoded video by episodes because the variables (each a script by itself) were killing the performance.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.