How to select audio stream while playing?

2009-11-21
2013-04-14
  • Haziman Hashim
    Haziman Hashim
    2009-11-21

    Hi,

    I already been able to implement media player in my code using DirectSHow.net
    in VB.net.

    I want to add another functionality that is - ability to switch audio stream
    (track - left / right / center) while the video is playing (likes karaoke
    system)

    Plus, Why my player get hanged ( i cant access any control - such as button or
    textbox of my application) when the media is playing?

    Does anyone has any idea?

    Thanks in advance, any help would be appreciated,
    Sincerely.

     
  • Haziman Hashim
    Haziman Hashim
    2009-11-23

    Does anyone here would like to help?
    Im sorry if this is a bit forcing... But would someone point me to at least an
    article that would let me understand the concept?

     
  • Peter_B
    Peter_B
    2009-11-23

    You could find the number of audio streams and change the audio pin.

    You could probably use IBasicAudio and put_Balance for right/left/center.

    Peter

     
  • Peter_B
    Peter_B
    2009-11-23

    I think I misunderstood the question about tracks.
    I was thinking about a video file with more than one audio stream. But I
    suppose changing the balance would still work for left/right/center.

    Peter

     
  • Haziman Hashim
    Haziman Hashim
    2009-11-23

    "You could find the number of audio streams and change the audio pin."

    Yes, this is the one i meant.
    Do you know how to do that?

     
  • Peter_B
    Peter_B
    2009-11-23

    There is a thread somewhere in this forum where I demonstrate how I use
    DES.IMediaDet to find the video pin. Our guru didn't really like the way I did
    it but it works for me with wmv files. I never found out what I did wrong. You
    can modify it to find the number of audio streams. As far as I remember I
    posted the VB.NET code as well as a translation to C Sharp.

    Peter

     
  • Haziman Hashim
    Haziman Hashim
    2009-11-24

    That was a good point to start. I should play with the code to understand
    more. I will let you know if i found something.

    Meanwhile, i wanted to add an external filter (ffdshow Audio Decoder if im not
    mistaken). But i did not find any in the popup list in VB. I did some research
    and found something about GUID. Does it has anything to do with using external
    directshow filter? If so, how do i do to use it?

     
  • DMAN
    DMAN
    2009-11-24

    Getting the audio types is very much dependent on the source.
    Are you doing this with an analog tv card, digital tv card or just playing a
    file with multiple audio streams?

    Check out the IAMTVAudio interface for analog TV as an example.
    Also the TVAudioMode enum.

     
  • Haziman Hashim
    Haziman Hashim
    2009-11-25

    Actually i'm building a player (only player) that plays an MP4 file with audio
    with stereo format (dual track) - one track is the song with vocal, and the
    other one is the minus one. I want my application to be able to switch between
    the minus one stream and the vocalized stream at real time. I already found a
    directshow filter that is - ffdshow. but it is an external filter (i think).
    The ffdshow filter has a feature called mixer (it's control is like a matrix -
    if you go to the filter's properties page, you will find this feature). This
    is what actually i wanted to do.

     
  • woonhow
    woonhow
    2013-04-14

    HI, Haziman Hashim. I also face same problem with you. Do you already got some solution about it?

     
  • woonhow
    woonhow
    2013-04-14

    If got any solution, can you email to me on woonhow@yahoo.com. Thank You so much! Hope that you already got solution..