BASS_DSHOW Video Library

Started by Ionut Cristea,

Ionut Cristea

QuoteI have no audio even I play it with Mediaplayer.
I have K-Lite-Codec Pack installed, but I will look for another codecs. Did you hear audio?
I thought, the video is anyway without audio.

It plays very well with Media Player Clasic(with audio).If you don't mind, can i ask were are you from?

Ionut Cristea

Oh...sorry for that...thanks Erazer for reply...It seems that MPC loads an audio from my hard disk so that i've tell that audio from that video is ogg:(

The right info about that audio is:
General
Complete name                    : C:\1.mpg
Format                           : MPEG-PS
File size                        : 4.84 MiB
Duration                         : 16s 0ms
Overall bit rate                 : 2 535 Kbps
Writing library                  : Created by Nero

Video
ID                               : 224 (0xE0)
Format                           : MPEG Video
Format version                   : Version 1
Format settings, Matrix          : Default
Duration                         : 16s 0ms
Bit rate mode                    : Variable
Bit rate                         : 2 435 Kbps
Nominal bit rate                 : 10 000 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16/9
Frame rate                       : 25.000 fps
Standard                         : PAL
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.235
Stream size                      : 4.64 MiB (96%)
Writing library                  : Created by Nero

quickmic

QuoteIt plays very well with Media Player Clasic(with audio)

Apparently there must be a problem with my codecs....I will check it.

QuoteCan i ask were are you from?
My location is Austria (Europe) not Australia  ;D

Erazer

Quote from: quickmicMy location is Austria (Europe) not Australia  ;D

But my first try to read gave me Australia  ;D

Ionut Cristea

 Hi...i've uploaded a new version to the first post:
+fixed bugs when tryed to stop,pause etc
+added writewav(for you and only you Erazer ;D)

Erazer

You are crazy, guy!  ;) ;D

I do not need writewav example, in your bass_dshow.zip
I ask you to make your dll working WITH  writewav example... If it would allow to ectract sound from video files just being added into writewav example folder, this will mean your dll really works like bass plugin.

jeffdavis

I am still having trouble getting the latest BASS_DSHOW to work in VB6.  I get a Invalid Handle 5 when calling BASS_StreamCreateFile with a video file.  I have tried this with AVI and MPG files.   I assume if I can open it in Windows Media Player on my system then BASS_DSHOW should be able to open it?

Opening audio files works fine.

I am loading the plugin like I load all other plugins for bass in VB (the plugin DLL is always in the same project folder).  It looks like I am getting a valid handle when loading the plugin and no errors.

Do I need to be using a specific version of BASS?  I am using 2.4.5.0

 

Erazer

U still can't understand ?! It does not work like bass plugin. Forget about your VB, BASS_DSHOW does not work not in delphi nor in VB LIKE BASS PLUGIN that's why WE have this problem.

Ionut Cristea

#233
And why you(ERAZER) don't understand that that BASS_DSHOW is capable now to extract audio from video and it is almost a bass_plugin.

Erazer

May be... BUT not like bass plugin, thats the main problem...  ;)

Ionut Cristea

 No...thats is possible like a bass plugin.

jeffdavis

I don't understand?   Erazer says that BASS_DSHOW does NOT work like a BASS plugin?

But Sharky08 says that it does?

My understanding is that if I load a plugin using the BASS_PluginLoad after the BASS_Init then I should be able to call the bass functions like BASS_StreamCreateFile and if the file format is support by the plugin it should work.  

In the case of BASS_DSHOW all I have to do after the stream create is call BASS_DSHOW_CHannelSetWindow and the video file will display in my window and audio will play as well.  Which is NOT working!

Am I misunderstanding something?



Erazer

NO it's impossible.. No one except you cant do that... Check my gift for you _http://masterstyles.com/downloads/writewav.zip
There writewav example, built in d2009, avi files and so on. Show us please how it works and can extract audio...  ;)

Ionut Cristea

 Of course...please wait until i will download it:D

Ionut Cristea

One question: to get the buffer you use:
   BytesRead := BASS_ChannelGetData(chan, @buf,20000); or
   BytesRead := BASS_ChannelGetData(chan, @buf,BASS_DATA_AVAILABLE); 

Erazer

Forgot to add BASS_PluginLoad(FileName, BASS_UNICODE);... ;)

Erazer

I use from example BytesRead := BASS_ChannelGetData(chan, @buf, 10000);

Ionut Cristea

 So...i download your zip...and BASS_DSHOW extract succesfully audio from all 3 videos.

One more question...you sad that bass_dshow can't play anything in your program but works in the demos released by me. What's the error that it returns?

Ionut Cristea

 Have you tried with the latest dll?

Erazer

#244
No any errors...  and makes empty wav file with wav header (44 bytes).

by the way.. MPC showed me this http://my.jetscreenshot.com/11/20100118-nqbm-78kb   :)

By the way, could you at last updete bass dll at your project to the latest version ?!

And remove unnecessary links from the first page?


Ionut Cristea

  I've tried your writewav exe and indeed make 44bytes files(don't know the reason)(i have delphi2007) and can't compile a demo for you.

Btw: video files can be played by bass_dshow?

Erazer

Yes, all of them can, also when I try to close your demo after playing videos I get http://my.jetscreenshot.com/11/20100118-fa0g-47kb

Erazer

#247
Quote from: Sharky08I've tried your writewav exe and indeed make 44bytes files(don't know the reason)(i have delphi2007) and can't compile a demo for you.

Btw: video files can be played by bass_dshow?

What's the problem ? Open original writewav example from bass, add loadiong of your plugin build it in d2007  and check yourself, it it works (bass_dshow like plugin)  :)

My changes are only temp : ANSIstring; instead temp : string; (hi Ian  ;)) and support *.* by open dialog,  it seems nothing more

Ionut Cristea

QuoteBy the way, could you at last updete bass dll at your project to the latest version ?!

And remove unnecessary links from the first page?

OK. It will be done right now. I have upload a package with compiled writewav and demo example.
QuoteYes, all of them can, also when I try to close your demo after playing videos I get http://my.jetscreenshot.com/11/20100118-fa0g-47kb
Yes, i know about that bug. I will fix it tomorow.
QuoteWhat's the problem ? Open original writewav example from bass, add loadiong of your plugin build it in d2007  and check yourself, it it works (bass_dshow like plugin)  Smiley
I did. I'll find compiled example in the package.
Cheers, Sharky.

Erazer

Clear. Your writewav example build in D2007 really works fine. But does not work in D2009. In 2009 I have to use chan := BASS_StreamCreateFile(FALSE, PChar(SourceFileName), 0, 0, BASS_STREAM_DECODE or BASS_UNICODE); It seems problem is here. If I try to open mp3 file here is OK but if I try to open avi file Chan = 0!  ???