how to listen to markers/cue points on videos - marker

I would like to ask if it is possible for visual studio (c#), to listen to markers/cue points embedded into video files (flv or Mpeg4)?
Currently, I'm playing flv video using the QuartzTypeLib dll. I am able to play the video successfully. Is it possible for c# to observe a marker on the video so that I can trigger an event if that marker is reached?
Thank you very much.

Related

How to play sound from resources using windows media player?

I am making a game, so at one point I need to play two sounds at once, so I played the first one using the "My.Computer.Audio.Play()" Method to load from resources.
As for the second, I used Windows Media Player to load the second sound In A SPECIFIC FOLDER, now I know it is possible to extract files to a folder and program it to play from there to avoid trouble, but I don't want them to be extracted.
So I'm trying to get the file path from resources and put it in WMP's URL, but couldn't get any result after searching the internet.
Am I missing something?
And if you know any better alternative, make sure it can:
1- Replay sound (coding with timer is ok),
2- Change Sound Position
You can use the MediaPlayer class in code or MediaElement in XAML for playing audio files in a WPF application. Check out the article WPF Media Player In VB.NET for code samples.

Using Audio Unit (Mixer Host) to play from iPod library instead of pre selected sound files.

For a university project i'm working on a DJ mixing app. I'm essentially tackling this project from a 'teach yourself from scratch by googling everything and analysing pre existing source code' type of way so go easy.
I have looked at the Mixer Host sample project from apple found here: http://developer.apple.com/library/ios/#samplecode/MixerHost/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010210
I can't work out how to replace the pre selected audio files (guitar + beat) with a song URL from the iPod library selected from a media picker, or, in this case - 2 media pickers.
Is it a case of grabbing the URL of the iPod library song selected and putting in place of the URL of the preselected audio file?
If someone could point me in the right direction, tell me how i'm completely going about this the wrong way, or even do the coding for me (joke), it would be greatly appreciated.
You can't actually simply stream from the ipod library; you need to copy the files into the documents directory of the app.
try this: http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/
You can use third party libraries to play a iPod library songs using AudioUnit. The below link is useful to you
Clickhere!

How to embed a video in a tile as a Web UI in Windows8 Application C#

I am currently developing an windows 8 application using C# and XAML. In the Grouped Item Page, I need to launch a video hosted on youtube.
The video needs to play in the tile, as an itenm.
Is there any way to do this?
Thanks...
No, there is no way to play a video in a tile. Tile updates must go through the predefined tile templates, and there is only the capability to display text and images in those templates.
I recently published a blog post on working with live tiles that might also be helpful.

Access WPF MediaElement Sound Stream form NAudio

I am new to using NAudio so sorry if my question sounds naive.
My project is to play a video file using WPF MediaElement control then access the audio stream of the played video (using NAudio) to represent the audio track of the video while being played (waveform, etc.).
I looked into how to let the NAudio access the audio track of a video file in MediaElement control but could not find a resource..
Any suggestion will be appreciated
If you are willing to try the preview release of NAudio 1.7 (available on NuGet) it can now read soundtracks out of video files using Media Foundation. Use the MediaFoundationReader class. Here's how you would save the soundtrack to a WAV file:
using (var reader = new MediaFoundationReader("mymovie.m4v"))
{
WaveFileWriter.CreateWaveFile(reader, "soundtrack.wav");
}
Obviously for waveform drawing you would not need to make a WAV file. Just look at the sample values to get peaks for a waveform renderer.
Note that Media Foundation is only supported on Windows Vista and above.

Loop wav file seamleassly in the background on windows 8

I have managed to get seamsless looping of wav files using the SharpDX library.
But this does not seem to work while the app is minimised (in the background).
Using the metro players I do not get a seamless loop this is why I use XAudio2 in the SharpDX library.
Hope someone can help with this.
When your app is in the background it no longer has access to the CPU so your audio will stop playing.
The only way around this is with background agents running the audio component. The issue here is that the certification process will be hard on you if you are just playing looping audio. Playing audio in the background is intended for audio player apps (like the inbuilt "Music" app).
If I were a user of your app I would likely be unhappy that it clogs up the audio system when it isn't in the foreground (if, for example, I went to answer a Lync call). If the only way to stop your app playing audio is to go and turn it off manually or exit the app then my opinion is that the user experience isn't great.
Of course, you may have a different opinion, or your app might be doing something I haven't considered.