Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th December 2002, 22:10   #1  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
MPASource: direct MP2 MP3 reading

Hi!

I made an AviSynth 2.0 plugin which can read mp2 and mp3.
(the decoding is based on mpg123 in a version from the lame project)

You simply put

MPASource("filename.mp3", normalize=false)

and get the audio.

Trimming and seeking is supported, although it may be a little slow.

When opening a script the whole file is scanned (fast without normalize, 5x slower with normalize) which can take 20-120 sec for one hour video, but this is the only way to always get the exact sample count (don't use it while preparing the video filters).

MPASource

Last edited by WarpEnterprises; 20th February 2008 at 22:48.
WarpEnterprises is offline   Reply With Quote
Old 27th December 2002, 22:18   #2  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,455
Hu, I can't imagine what it's all good for, but I think the purpose is to feed it with i.e. an avi+it's dewmuxed soundtrack to create a SVCD or something similar.

In that matter, since I only use ogg in ogm (and sometimes find avi+ac3), would it be possible to extend that plugin with that?

Like a general "CompressedAudioSource()"?

Cheers,
Koepi
Koepi is offline   Reply With Quote
Old 27th December 2002, 22:29   #3  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
My main purpose is for MP2 source (DVB or SVCD reencoding).
It completely depends on mpg123 and can read only what this lÝbrary can read.
So I fear it can't.
WarpEnterprises is offline   Reply With Quote
Old 28th December 2002, 18:49   #4  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
As far as I know, DSPguru is planning on making a BeSweet version for AviSynth (BeSynth). That one would do the trick, but I don't know when this will be finished.

bb
bb is offline   Reply With Quote
Old 29th December 2002, 15:59   #5  |  Link
BaronVlad
Jetzt nochmal auf Deutsch
 
BaronVlad's Avatar
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 411
Hi WarpEnterprises,

thanks alot. This is the most useful Plugin that I have seen for a while as a Newbie in avisynth.

Now I am able to cut out the commercials of my DVB caps without pvacut and at the frame I like to, very easy to use, 100 % in sync. Great.

__________________
Hochachtungsvoll

BaronVlad

Deutsch >> Capture FAQ - Capture Guide
Englisch >> Capture FAQ - Capture Guide
BaronVlad is offline   Reply With Quote
Old 30th December 2002, 21:35   #6  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Compiled a version for AviSynth 2.5
mpasource for AviSynth2.5

Last edited by WarpEnterprises; 10th January 2004 at 00:00.
WarpEnterprises is offline   Reply With Quote
Old 31st December 2002, 00:54   #7  |  Link
jcsston
Matroska Dev
 
jcsston's Avatar
 
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
Nice plugin

Great plugin! Now I don't have to decode and normalize the audio of my TV captures
jcsston is offline   Reply With Quote
Old 31st December 2002, 17:22   #8  |  Link
BaronVlad
Jetzt nochmal auf Deutsch
 
BaronVlad's Avatar
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 411
@Warpenterprises:

As you are from Austria, you may be able to read something in German language I have implemented your great plugin in my little DVB guide here:

http://doom9.de/extern_guides/digiCa...de/Inhalt.html

Happy new year.
__________________
Hochachtungsvoll

BaronVlad

Deutsch >> Capture FAQ - Capture Guide
Englisch >> Capture FAQ - Capture Guide
BaronVlad is offline   Reply With Quote
Old 1st January 2003, 20:44   #9  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Are there sometimes corrupt audio tracks in DVB?
It would be interesting (if this is a common thing) how this could be handled.
WarpEnterprises is offline   Reply With Quote
Old 2nd January 2003, 04:38   #10  |  Link
soulfx
The Digital Soul
 
soulfx's Avatar
 
Join Date: Jun 2002
Location: Nebraska, USA
Posts: 114
Great plugin WarpEnterprises, this saves me from having to convert my TV caps MP2 audio tracks into WAVS.

It's worked great as far as I can tell. No bugs or crashes to report on my end.

I do have a question though. How can I handle delayed audio? When I demux an audio track with DVD2AVI and I get something that has a delay of 10ms, does this filter compensate for that? Do I need to delay the audio by some other method?
soulfx is offline   Reply With Quote
Old 2nd January 2003, 06:09   #11  |  Link
jcsston
Matroska Dev
 
jcsston's Avatar
 
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
You use a script like this
Code:
video = mpeg2source("masterpiece_part3_vd.d2v")
audio = MPASource("MASTERPIECE_PART3_VD MPA T01 DELAY -123ms.mpa", normalize=false)
DelayAudio(audio,-0.123)
AudioDub(video, audio)
This is actually exactly what my small program I made MPEG-2 to VirtualDub does.
Select an MPEG-2 file
Create a d2v project with DVD2AVI commandline
Decode the mpa to wav with MADPlay, use DirectShow Decoder, or Use the MPASource AviSynth plugin
Write a AviSynth script
Open the script in VirtualDub
Download
Put the mpasource.dll in your AviSynth Plugin dir.

@WarpEnterprises: Is it ok for me to distribute the .dll with my program?
jcsston is offline   Reply With Quote
Old 2nd January 2003, 10:56   #12  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
@jcsston
Brilliant

The simplest way yet to get a normal MPEG-2 into an avi that doesn't need a degree in video processing.

Is there an existing thread/forum to discuss your program - you've made a killer app.

And should be easier/quicker if you use WarpEnterprises plugin

regards

Simon
Si is offline   Reply With Quote
Old 2nd January 2003, 19:03   #13  |  Link
jcsston
Matroska Dev
 
jcsston's Avatar
 
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
@siwalters
I made a new thread here
I also have an older thread at the 'Unofficial VirtualDub Support Forums' here
__________________
The Matroska Effect
jcsston is offline   Reply With Quote
Old 2nd January 2003, 19:43   #14  |  Link
onesoul
miau
 
onesoul's Avatar
 
Join Date: May 2002
Location: Lisbon
Posts: 594
Quote:
Originally posted by BaronVlad
Now I am able to cut out the commercials of my DVB caps without pvacut and at the frame I like to, very easy to use, 100 % in sync. Great.
Could you post an example script of a cutting you made using mpasource?

Thanks
__________________
"... but where are those missing pieces of eternal soul, I can feel them but I can't reach them with my vision"
Petition for a software patent free Europe
Another vision of what happened at 9/11
onesoul is offline   Reply With Quote
Old 3rd January 2003, 17:27   #15  |  Link
cweb
Registered User
 
cweb's Avatar
 
Join Date: Oct 2002
Location: The Pandorica
Posts: 527
Sometimes there are clicks. To eliminate them I'm currently
using Winamp to convert the mp2 file into a wav using the MAD plugin.
The MAD plugin has a feature to remove this kind of clicks and pops.
Any utility to remove clicks should replace them possibly with silence,
so that audio sync is not lost.

It would be useful if mpasource would handle this automatically.

Thank you anyway. I will be experimenting with mpasource.

Quote:
Originally posted by WarpEnterprises
Are there sometimes corrupt audio tracks in DVB?
It would be interesting (if this is a common thing) how this could be handled.
cweb is offline   Reply With Quote
Old 3rd January 2003, 17:47   #16  |  Link
BaronVlad
Jetzt nochmal auf Deutsch
 
BaronVlad's Avatar
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 411
Quote:
Originally posted by onesoul
Could you post an example script of a cutting you made using mpasource?

Thanks
I think this is a misunderstanding.

I have my avs created from GKnot or written on my own and add the audio with mpasource. After this I load the new avs with VDub Mod and cut there. After this compress to divx:

http://doom9.de/extern_guides/digiCa.../Avisynth.html

(example for avisynth script, explanation in German)

DVB and audio: I have a problm with my source (antenna = DVB-T). The most interesting channels have not much power yet and because of this I have damaged mpeg streams from time to time (like a broken SVCD). And then there are also the probs with the audio. But they will fix it in March I think, no other audio problems apart from that occured
__________________
Hochachtungsvoll

BaronVlad

Deutsch >> Capture FAQ - Capture Guide
Englisch >> Capture FAQ - Capture Guide
BaronVlad is offline   Reply With Quote
Old 3rd January 2003, 18:25   #17  |  Link
onesoul
miau
 
onesoul's Avatar
 
Join Date: May 2002
Location: Lisbon
Posts: 594
Oops

I don't want to put down the work being done but wouldn't make more sense to use an universal language, which is english, so that useful information wouldn't spread out for just some guides?

Cheers
__________________
"... but where are those missing pieces of eternal soul, I can feel them but I can't reach them with my vision"
Petition for a software patent free Europe
Another vision of what happened at 9/11
onesoul is offline   Reply With Quote
Old 3rd January 2003, 18:41   #18  |  Link
BaronVlad
Jetzt nochmal auf Deutsch
 
BaronVlad's Avatar
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 411
Quote:
Originally posted by onesoul
Oops

I don't want to put down the work being done but wouldn't make more sense to use an universal language, which is english, so that useful information wouldn't spread out for just some guides?

Cheers
You may be right, but I had not so much time and my "natural born" language is German and i am more active in the german board. There also is an analogue Capture Guide that is waiting for its translation, so everybody who is able to do so, feel free to contact me ! There were some thoughts about that in the past, but that was the last I heard from it somehow. I think the analogue stuff should be done when the VCR function of Joe Redfish is integrated into VDub Mod but however. I would be happy if someone would translate all this.
__________________
Hochachtungsvoll

BaronVlad

Deutsch >> Capture FAQ - Capture Guide
Englisch >> Capture FAQ - Capture Guide
BaronVlad is offline   Reply With Quote
Old 3rd January 2003, 21:14   #19  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Quote:
Originally posted by cweb
Sometimes there are clicks. ....
It would be useful if mpasource would handle this automatically.

Thank you anyway. I will be experimenting with mpasource.
Could you mail me a short (<2MB) example?

peche at aon dot at.
WarpEnterprises is offline   Reply With Quote
Old 30th January 2003, 22:59   #20  |  Link
BaronVlad
Jetzt nochmal auf Deutsch
 
BaronVlad's Avatar
 
Join Date: Oct 2001
Location: Berlin, Germany
Posts: 411
hi WarpEnterprises,

let me allow one short question... would it be possible for you to update your great plugin to avisynth2.5 beta ... that would be very nice and highly appreciated...


thanks for your efforts

regards BaronVlad
__________________
Hochachtungsvoll

BaronVlad

Deutsch >> Capture FAQ - Capture Guide
Englisch >> Capture FAQ - Capture Guide
BaronVlad is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.