Author Topic: BassVideo  (Read 340548 times)

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #800 on: 20 Jun '09 - 08:55 »
I wondered what the message meant about discontinue the beta?

Is the new version going to be a plugin or are we going back to a separate video functions?

I am using the beta 3 because it was the ONLY version that worked with our DSP decode process.    We needed the DECODE flag and also need it to work with the BASS audio.

As for the AddText function I'm not doing anything that compicated

HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)

Call BassVideo_SetVideoWindow(HandleIn, Form1.hwnd, rRect, 0)
Call BassVideo_Effect_AddText(HandleIn, StrPtr("This is a test"), 0, 0, "Times New Roman", 80, 50, RGB(0, 255, 0), 0)





kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #801 on: 20 Jun '09 - 09:14 »
I wondered what the message meant about discontinue the beta?

Is the new version going to be a plugin or are we going back to a separate video functions?

I am using the beta 3 because it was the ONLY version that worked with our DSP decode process.    We needed the DECODE flag and also need it to work with the BASS audio.

As for the AddText function I'm not doing anything that compicated

HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)

Call BassVideo_SetVideoWindow(HandleIn, Form1.hwnd, rRect, 0)
Call BassVideo_Effect_AddText(HandleIn, StrPtr("This is a test"), 0, 0, "Times New Roman", 80, 50, RGB(0, 255, 0), 0)

May be because you have input the ANSI instead of UNICODE.
BassVideo_Effect_AddText requires UNICODE string

New version will have maximum compatibility with old, i can promise that. One thing is : can you explain how your dsp work ? that will help me much when write the new version

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #802 on: 20 Jun '09 - 18:21 »
I converted the text to Unicode and it still doesn't display any text

BassVideo_Effect_AddText(HandleIn, StrPtr(StrConv("This is a test", vbUnicode)), 0, 0, "Times New Roman", 80, 50, RGB(0, 255, 0), 0)


jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #803 on: 20 Jun '09 - 18:34 »
The way we implement our DSP is a little different.  Not only do we enhance the decoded stream but we also have our own formula for down/up mixing the channels of the stream.  Because of this we have to create a separate input and output stream. 

First we create an input stream from the source content as a DECODE stream
HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT)

We determine the number of system speaker channels and the number of channels of the source
BASS_GetInfo(info)
BASS_ChannelGetInfo(HandleIn, cinfo)

Then we create a output stream with our DSP callback and the input stream
HandleOut = BASS_StreamCreate(cinfo.freq, info.speakers, BASS_SAMPLE_FLOAT, GETBASSCALLBACK, HandleIn)

We call a function in our DSP library that intializes the stream with the proper frequency and number of channels down/up mixed
OurInitStream(cinfo.freq, cinfo.chans, info.speakers)

Then we play the audio
BASS_ChannelPlay HandleOut, 0

In order to get Video to work we have always had to play the video from the input stream
BassVideo_Play HandleIn


I hope that helps explain how we use DSP with BassVideo





Latch

  • Posts: 90
Re: BassVideo
« Reply #804 on: 20 Jun '09 - 18:38 »
Any idea when the new version will be released?   Also, can you verify that you will also make both 32 and 64 bit versions with each release from now on?

kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #805 on: 20 Jun '09 - 19:06 »
Any idea when the new version will be released?   Also, can you verify that you will also make both 32 and 64 bit versions with each release from now on?

~1-2 month later, can't say exactly when :)
of course 64bit is available ^^

The way we implement our DSP is a little different.  Not only do we enhance the decoded stream but we also have our own formula for down/up mixing the channels of the stream.  Because of this we have to create a separate input and output stream.  

First we create an input stream from the source content as a DECODE stream
HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT)

We determine the number of system speaker channels and the number of channels of the source
BASS_GetInfo(info)
BASS_ChannelGetInfo(HandleIn, cinfo)

Then we create a output stream with our DSP callback and the input stream
HandleOut = BASS_StreamCreate(cinfo.freq, info.speakers, BASS_SAMPLE_FLOAT, GETBASSCALLBACK, HandleIn)

We call a function in our DSP library that intializes the stream with the proper frequency and number of channels down/up mixed
OurInitStream(cinfo.freq, cinfo.chans, info.speakers)

Then we play the audio
BASS_ChannelPlay HandleOut, 0

In order to get Video to work we have always had to play the video from the input stream
BassVideo_Play HandleIn


I hope that helps explain how we use DSP with BassVideo

Meaning you have your own Up/Down mixing audio data ? And this can be done only in decoded stream ?
If you want the best compatibility your dsp should be in mode of received data and process dsp instead of Request & send it to another stream.
Unlike bass,  BassVideo allow dsp to modify the size of output buffer... If your dsp can change to this way then the data is audio SYNC best with the video
otherwise it hard to make it work like normal.
« Last Edit: 20 Jun '09 - 19:13 by kenshin1101 »

Finalspace

  • Posts: 4
Re: BassVideo
« Reply #806 on: 23 Jun '09 - 09:38 »
I tried the latest version 2.4.1.2 with bass 2.4.3.1 (and 2.4.0.1) and almost every video file i tried to play,
had loud noises in the audio stream. Only PCM based audio stream worked.
Even mpeg-layer 3 based audio streams had the noices in it.

OS: Vista Business x86 with SP1

My own directshow media player had no problems with sound at all,
so this is a bass video problem.

And one question i got:

Is it possible to create your own graph, by coding ?
Do bass video use the Graph->RenderFile ? (For detecting media codecs)

Thanks in regards,
Final
« Last Edit: 23 Jun '09 - 14:27 by Finalspace »

drloakes

  • Posts: 4
Re: BassVideo
« Reply #807 on: 23 Jun '09 - 11:41 »
hi kenshin1101,

Which capture demo ??? i've looked in the bassvideo latest and older files and can find no Capture demo... can u give a link to it so i can have a look through it...

Cheers

papsot01

  • Posts: 40
Re: BassVideo
« Reply #808 on: 26 Jun '09 - 10:11 »
Hi kenshin1101
I am trying to get pictures from video every 5 secs
BassVideo.BassVideo_CaptureBitmap isn't working with all video files
please read this code in delphi and tel me where is wrong.
thank you

if not OpenDialog1.Execute then exit;
source := OpenDialog1.FileName;
chan := BassVideo_StreamCreateFileEx(source, 0,nil, nil);
if chan = 0 then exit;
   BassVideo_Play(chan);
   BassVideo_Pause(chan);
   vLength  := BassVideo_GetLength(chan);
   while (vPos < vLength) do begin
      vPos := vPos + 5;
      BassVideo_SetPosition(chan,vPos);
      dc := GetDC(BassVideo_GetVideoWindow(chan,0));
      BitBlt(buffer.Canvas.Handle ,0,0,vWidth, vHeight,dc,0,0,SRCCOPY);
      Form3.Image1.Canvas.Draw(0,0,Buffer);
   end;

drloakes

  • Posts: 4
Re: BassVideo
« Reply #809 on: 29 Jun '09 - 16:53 »
Hi, still trying to get a webcam device to be displayed via bass_video.... the FullDemo works fine but the source in in pascal only and my skills at converting to c / c++ are a little poor so would appreciate any help...

Cheers

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #810 on: 30 Jun '09 - 01:29 »
I converted the text to Unicode and it still doesn't display any text

BassVideo_Effect_AddText(HandleIn, StrPtr(StrConv("This is a test", vbUnicode)), 0, 0, "Times New Roman", 80, 50, RGB(0, 255, 0), 0)



I am getting an errorcode 59 when calling this fuction the return value is 0.  What does this mean?


kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #811 on: 30 Jun '09 - 02:48 »
I tried the latest version 2.4.1.2 with bass 2.4.3.1 (and 2.4.0.1) and almost every video file i tried to play,
had loud noises in the audio stream. Only PCM based audio stream worked.
Even mpeg-layer 3 based audio streams had the noices in it.

OS: Vista Business x86 with SP1

My own directshow media player had no problems with sound at all,
so this is a bass video problem.

And one question i got:

Is it possible to create your own graph, by coding ?
Do bass video use the Graph->RenderFile ? (For detecting media codecs)

Thanks in regards,
Final

maybe the sound is not supported by Bass or i had enter a wrong information to bass, please upload that file to somewhere. I'll check it but the fixing is not going now, it depend on the next version :)

hi kenshin1101,

Which capture demo ??? i've looked in the bassvideo latest and older files and can find no Capture demo... can u give a link to it so i can have a look through it...

Cheers

ops, sorry, there a capture form in the DemoFull example :D

Hi kenshin1101
I am trying to get pictures from video every 5 secs
BassVideo.BassVideo_CaptureBitmap isn't working with all video files
please read this code in delphi and tel me where is wrong.
thank you

if not OpenDialog1.Execute then exit;
source := OpenDialog1.FileName;
chan := BassVideo_StreamCreateFileEx(source, 0,nil, nil);
if chan = 0 then exit;
   BassVideo_Play(chan);
   BassVideo_Pause(chan);
   vLength  := BassVideo_GetLength(chan);
   while (vPos < vLength) do begin
      vPos := vPos + 5;
      BassVideo_SetPosition(chan,vPos);
      dc := GetDC(BassVideo_GetVideoWindow(chan,0));
      BitBlt(buffer.Canvas.Handle ,0,0,vWidth, vHeight,dc,0,0,SRCCOPY);
      Form3.Image1.Canvas.Draw(0,0,Buffer);
   end;


BassVideo_CaptureBitmap is open video and try grab some frame, if you can't get bitmap from that maybe the VideoWindow not support or some error appear

You can't use GetDC with the videowindow because the video is work using other way

try use BassVideo_StreamCreateFile with BASSVIDEO_VIDEOEFFECT flags and call BassVideo_Set_Draw_CallBack, you'll have dc of the image in the callback

Hi, still trying to get a webcam device to be displayed via bass_video.... the FullDemo works fine but the source in in pascal only and my skills at converting to c / c++ are a little poor so would appreciate any help...

Cheers

i'm busy at this moment. I'm currently write C++ version, so please wait until next version complete.

I converted the text to Unicode and it still doesn't display any text

BassVideo_Effect_AddText(HandleIn, StrPtr(StrConv("This is a test", vbUnicode)), 0, 0, "Times New Roman", 80, 50, RGB(0, 255, 0), 0)



I am getting an errorcode 59 when calling this fuction the return value is 0.  What does this mean?



meaning you don't have BASSVIDEO_VIDEOEFFECT flags in the BassVideo_StreamCreateFile

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #812 on: 30 Jun '09 - 02:56 »
can you have BASSVIDEO_VIDEOEFFECT flag along with BASS_STREAM_DECODE wiht BASS_StreamCreateFile()?


kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #813 on: 30 Jun '09 - 04:53 »
can you have BASSVIDEO_VIDEOEFFECT flag along with BASS_STREAM_DECODE wiht BASS_StreamCreateFile()?

yes

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #814 on: 30 Jun '09 - 04:59 »

they why error 59?

HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)


Jeff

kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #815 on: 30 Jun '09 - 08:49 »

they why error 59?

HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)


Jeff


Error 59 mean no effect detected
hmm, is
HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)
work when
HandleIn = BASS_StreamCreateFile(BASSFALSE, StrPtr(FileName), 0, 0, BASS_STREAM_DECODE Or BASS_SAMPLE_FLOAT Or BASSVIDEO_VIDEOEFFECT)
doesn't work ?

Sometime the VideoEffect cannot connect just because the VOB Sub filter always requires YV12 input color space when i provide only RGB input. This will be fix in the future

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #816 on: 30 Jun '09 - 20:42 »
We are currently using 2.4.1.3  plugin version within some of our applications.  These apps are only used internally for demonstration of our audio DSP.   We have needed the ability for video file support in our demo player that uses BASS for audio for quite a while.   We first took a look at this DLL in Dec 08 and in Jan 09 when you created teh Plugin we were able to get it to work.   Now you are abandoning this for the re-write but we still have issues.   Hopefully they will be fixed in the C++ version.

We have 2 questions.

1.  When will the C++ version realistically be available?  Rough number of months is fine.

2.  Can you explain the underlying technology that is being used to create 2.4.1.3 BassVideo?  What would the best system configuration be?  Codec versions, OS version, DirectX versions, RAM, CPU Speed.   We are seeing some performance issues with video on some systems and want to know what would be best?  If we know more about what is going on under the hood we might be able to avoid issues like CPU utilization and long caching delays etc.


kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #817 on: 1 Jul '09 - 02:52 »
We are currently using 2.4.1.3  plugin version within some of our applications.  These apps are only used internally for demonstration of our audio DSP.   We have needed the ability for video file support in our demo player that uses BASS for audio for quite a while.   We first took a look at this DLL in Dec 08 and in Jan 09 when you created teh Plugin we were able to get it to work.   Now you are abandoning this for the re-write but we still have issues.   Hopefully they will be fixed in the C++ version.

We have 2 questions.

1.  When will the C++ version realistically be available?  Rough number of months is fine.

2.  Can you explain the underlying technology that is being used to create 2.4.1.3 BassVideo?  What would the best system configuration be?  Codec versions, OS version, DirectX versions, RAM, CPU Speed.   We are seeing some performance issues with video on some systems and want to know what would be best?  If we know more about what is going on under the hood we might be able to avoid issues like CPU utilization and long caching delays etc.

I stop write this in delphi just because delphi doesn't have correct header for DirectShow. I can't write splitter filter with them and sometime cause some unknown error when free filter.
I just want my customer have a stable version with some features i had promises (eg: like streaming FLV)

+ Next version will available in few month later
+ BassVideo 2.4.1.3 use DirectShow technology to play video and use bass to provide sound output.
Minimum system requirement is : Intel Pentium 2 with 64 MB Ram, at least 4mb graphic card and
recommended system is : Pentium 4 (or higher), 128MB Ram (or higher), 32MB Graphic Card.
I recommended K-Lite-Codec-Pack to decode video, audio.

Note: the system requirement is depend on what type of video user playing and codec installed on the system.
Example the minimum system requirement is possible to play VCD with normal performance.
But if user play HD-Video with large screen then system must have higher than system requirements. 

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #818 on: 1 Jul '09 - 16:39 »
In our case we are mostly playing MPeg4 video clips of a few minutes from movies.  We also play AVI, and WMV videos but they are always just short videos playing in a preview window.   We do not play full DVD's or VCD's.   We only use the simple Play, Pause, Stop, Seek functions.  We see a number of performance issues depending on the machine video is viewed on.

1.   a LONG delay at application startup as the disk thrashes for a while.
2.   Random brief stuttering of the audio and video during play.
3.   The BassVideo_Pause  command randomly not pausing the video and not returning an error code.
4.   Sync issues with the audio and video ocasionally

All of these issues besides the LONG delay happen only on certain systems and not all the time. 

Is there a specific version of DirectShow that should be installed that works best?   When running under Vista or XP are there prefered service packs or updates that should exist?

Which version of K-Lite Codec Pack download is prefered?


kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #819 on: 1 Jul '09 - 17:25 »
In our case we are mostly playing MPeg4 video clips of a few minutes from movies.  We also play AVI, and WMV videos but they are always just short videos playing in a preview window.   We do not play full DVD's or VCD's.   We only use the simple Play, Pause, Stop, Seek functions.  We see a number of performance issues depending on the machine video is viewed on.

1.   a LONG delay at application startup as the disk thrashes for a while.
2.   Random brief stuttering of the audio and video during play.
3.   The BassVideo_Pause  command randomly not pausing the video and not returning an error code.
4.   Sync issues with the audio and video ocasionally

All of these issues besides the LONG delay happen only on certain systems and not all the time. 

Is there a specific version of DirectShow that should be installed that works best?   When running under Vista or XP are there prefered service packs or updates that should exist?

Which version of K-Lite Codec Pack download is prefered?



Most problem is cause by my way to make it work as a normal bass plugin. It seem i need other way :D
K-Lite-Codec Pack newest version is recommended.

jeffdavis

  • Posts: 297
Re: BassVideo
« Reply #820 on: 1 Jul '09 - 17:30 »
K-Lite can be downloaded as Basic,Standard, Full, Mega, and Corporate.  Which is best?

http://www.codecguide.com/download_kl.htm

kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #821 on: 1 Jul '09 - 17:31 »
K-Lite can be downloaded as Basic,Standard, Full, Mega, and Corporate.  Which is best?

http://www.codecguide.com/download_kl.htm

FULL

papsot01

  • Posts: 40
Re: BassVideo
« Reply #822 on: 1 Jul '09 - 19:50 »
K-Lite can be downloaded as Basic,Standard, Full, Mega, and Corporate.  Which is best?

http://www.codecguide.com/download_kl.htm

FULL
Can i after SetPosition refresh the videowindow ?
When in a loop i change the video position with setposition the video window isn't refreshing and i get the same picture from dc.

kenshin1101

  • Posts: 545
Re: BassVideo
« Reply #823 on: 2 Jul '09 - 01:33 »
K-Lite can be downloaded as Basic,Standard, Full, Mega, and Corporate.  Which is best?

http://www.codecguide.com/download_kl.htm

FULL
Can i after SetPosition refresh the videowindow ?
When in a loop i change the video position with setposition the video window isn't refreshing and i get the same picture from dc.


you must play to get the frame, if you don't want to display video then you can config video renderer to null

JeffJeffJeff

  • Guest
Re: BassVideo
« Reply #824 on: 2 Jul '09 - 17:22 »
Hi,

Just stumbled on this thread and it seems Bass may be what I'm looking for on my Motorola q9h (windows mobile 6) smartphone.

My end goal is to record audio and stream it real-time to a server somewhere out on the WWW.

Though, up to now, without Bass, I've only been able to save audio in WAV format to the local device.

I'm now trying to get Bass working though I think I need the special bass.dll for CE that Ian sent to others earlier in this thread.  Ian can you send me too please?

That aside, anyone got any suggestions/tips to accomplish what I'm trying to do?

Thanks,

Jeff