Log in

View Full Version : 2 Audio Streams & reading a ssa file out of an AVI


DvdKhl
11th July 2004, 22:44
I want to cut out the Start & End credits of an series and attach them all together, so I can watch without needing to load another file when one episode ends.

I don't want to reencode them just cut, join them and then load them into BSPlayer.

So, in my AVIs are 4 files:
1x Video *g*
2x Audio (mp3)
1x Subtitle (ssa)

Now I'm having 2 problems:
1. There is only one audio stream available
2. I don't know how to read the muxed ssa file so TextSub() can work with it


This is my best result so far.

N1 = avisource("Nr 01.avi").AssumeFPS(23.976)
N1 = TextSub(N1,"Nr 01.ssa")
N1 = trim(N1,0,16200) + trim(N1,16410,32524)
.
.
.
NR = N1 + N2 + N3 + N4 + N5 + N6 + N7 + N8 + N9 + N10 + N11 + N12 + N13 + N14 + N15 + N16 + N17 + N18 + N19 + N20 + N21 + N22 + N23 + N24 + N25 + N26

RETURN NR

But this only works if the ssa file isn't mused into the AVI file.

Is there a way that Avisynth can load both Audio streams?
Can I access an ssa file which is muxed into an AVI?

DarkNite
12th July 2004, 01:41
Demux to seperate files, and then revise your script.

However, wouldn't it be a whole lot easier to just make a playlist?

DvdKhl
12th July 2004, 09:05
The problem with playlists is,
that I can't set the beginning and the ends of each file.
Thats why I used Avisynth.

So there is no way accessing the second Audio-stream and
the ssa file without demuxing them?
Because I would like to have one file
instead of three per episode.

Cyberia
12th July 2004, 19:57
OK, so you don't want to reencode. Then you can't use AviSynth to do what you are attempting. AviSynth is decoding the frames, not passing on the encoded frames. See the difference? Also, AviSynth ONLY supports one audio stream, and I don't think it supports muxed subtitles (but I could be wrong there)

You need to use VirtualDubMod. That will allow you to cut a section of the AVI (including cutting both audio streams) out without reencoding. I am not sure if/how VdubMod will cut the subtitles however.

DvdKhl
13th July 2004, 15:04
OK, so you don't want to reencode.
Then you can't use AviSynth to do what you are attempting.
AviSynth is decoding the frames, not passing on the encoded frames.OK. But for me it is just important that the AVS I made
can be played by a softwareplayer like BSPlayer and it work fine so far.
So with "don't want to reencode" I just meant that I don't want to create a new AVI.

The last problems I had was to read the ssa out of an AVI and
the second audio stream.

Since it seems that isn't possible,
I'm going to use only one audio stream and demux the ssa file.

I can live with that too. Just wanted to know if it's possible.


You need to use VirtualDubMod.
That will allow you to cut a section of the AVI
(including cutting both audio streams) out without reencoding.
I am not sure if/how VdubMod will cut the subtitles however.That was the first thing I did but since VDM only
cuts between keyframes it is no use to me,
because in my source aren't many keyframes.
AviSynth will do this just fine.