I need to show internal subtitles with android MediaPlayer.
I am playing a .ts stream, subtitles are coming on a seperate stream with DVB sub codec.
Currently working on Android 4.2.2, DVB sub is not supported with native media player.
Any Alternative?
You can take a look at Google's open source video player https://github.com/google/ExoPlayer
They don't have DVB, but you can either add your own parser or if you already have it somewhere, then just plug it to the player.
Otherwise, if you want to do it with MediaPlayer, then you need to keep track of current playback time and display the subtitles on top in a separate view.
Related
I am using an FFMPEG component in embarcadero C++ Builder to capture video from a Direct show video camera. The capture works fine and gives me good quality mp4 files which I can play back using VLC player or FFMPEG, but the video file is not compatible with windows media player and windows won't give the nice video image when you view a file list with windows explorer.
I have seen suggestions which say you simply need to set the capture format to YUV420P, however if I do this, FFMPEG raises an exception -5 (input / Output error) and the capture device will not open.
Is there any other setting I should be looking at to allow FFMPEG to open the camera and capture the stream so media player will accept it.
I want to stream an audio from server using windows phone 7
the audio extension is mp3. I have tried Mp3MediaStreamSource class but the problem was that it downloads all the audio then start playing it.
I want to know what is the best way to play audio in WP7 for platform 7.0 ( with buffering -> not waiting until the entire audio file is downloaded.
Thanks in advance
I use Background Audio agent do stream mp3 radio broadcast. Take a look at this tutorial http://msdn.microsoft.com/en-us/library/hh202978(v=VS.92).aspx
I'd like to know if it's possible to grab snapshots from previously recorded videos. Those videos are recorded in the app itself.
By the way, I'd like to grab the snapshot from a video file saved in IsolatedStorage without having to play the video.
Is it possible? If so, how can I do it?
Cheers,
Rafael
I am not aware of an official platform feature to do this. However, if the video file is within your app's isolated storage, you might be able to:
Send the video to a server to do the processing
Add codecs/C# code to your app to process the raw MPEG4 frames.
Try using WriteableBitmap to capture a specific frame when using the media element. Since most media is handled in hardware, however, it is possible that the frame will be blank.
I solved the problem by creating the thumbnail while recording the video (captureSource.CaptureImageAsync()). To do that, I used the same instance of the CaptureSource I'm using to record the video.
In my application i am playing an audio file (let it be .mp3) using MediaPlayerLauncher. File is downloaded from network and stored in IsolatedStorage.
I managed to play the audio but it was a bit disapointing to see that there is absolutly no details about the played track.
Is there a way to show picture and/or track name when launched with MediaPlayerLauncher? Or am i forced to use MediaElement?
Unfortunately, if you're just playing an audio stream using the MediaPlayerLauncher there si no way to specifyu additional (meta) data for the launcher to also display.
If you want additional information displayed then you'll need to create the UI yourself and play the track via a MediaElement (or background audio).
what I want to achieve is this:
Play background music from the media library
On a certain trigger, fade out the music, play another mp3 file (of various lengths, seconds up to a minute)
After that piece of audio is played, resume previous music from the library
Now I run into these constraints:
In order to access and play music from the user's library, I need to use the MediaPlayer XNA class.
In order to play an arbitrary mp3 file, I need to use either MediaPlayer or MediaElement, but not SoundEffect or SoundEffectInstance
If I play anything using the MediaElement, MediaPlayer stops. It completely loses the audio queue so I would need to play the remaining music which would be ok BUT
MediaPlayer doesn't support seek so I cannot open the previous song and just go the the position before it got paused
So:
I don't want to use SoundEffect or SoundEffectInstance as the audio would have to be wav files.
I can't use just MediaPlayer because if I played the audio there to interrupt the song I wouldn't be able to seek to its previous position
I can't use the combination of MediaPlayer and MediaElement as MediaPlayer stops the MediaPlayer which again prevents me from resuming previous playback
I can't just use MediaElement because it can't play songs from the library
Do you see anything I missed or is really the only option I have to suck it up and use wav files? (There would be many of these downloaded on the fly and it is just plainly inefficient this way!) Any suggestions?
Thanks!
Unfortunately you've hit a limitation of the platform.
In addition to the alternative you've identified you could play the music streamed from an external source through a MediaElement. By using a timer to keep track of how much has played, when resuming the track start that far through the track by including the start point in your request to the streaming server. This does of course mean you need to provide or find a suitable streaming capability. :(
Neither of these are ideal but for now that's the best we have. The background audio facilites coming in Mango may help but until details are announced we can't say for sure.
can't use just MediaPlayer because if I played the audio there to interrupt the song I wouldn't be able to seek to its previous position
You will get mediastatechanged event using MediaPlayer and inthat event you could check the state of the mediaplayer and Pause the Song and then you could also Resume the song