How to play video and audio extracted from mkv file in metro app - mediaelement

I have managed to read matroska container and able to extract video and audio streams from a mkv file in my metro app. Now, I don't know how to feed the streams for playing. I want to know the concept of throwing media data on display. I have another option to repack the video and audio(s) with subtitles into MP4 container which will be played by MediaElement by default but that will not look like having a matroska codec in my metro app.
So, basically my question is: How to use MediaElement or any display graph to read the video and audio pulled out from any video container.
Please guide me. Thanks.

Related

Extract CMSampleBuffer from HLS video stream on iOS

How can I save what AVPlayer is currently playing (both video and audio) from Live HLS stream?
I know how to load and play m3u8 video file using AVPlayer.
Please note that the HLS stream is live and not Video on demand so cannot use AVAggregateAssetDownloadTask In the perfect scenario will get CMSampleBuffer objects which can save to file easily. Also AVPlayerItemOutput is not entirely an option because I am unable to see how will get the audio channel.
Seems not possible with the current SDK. I've implemented it using ffmpeg

How to download a m3u8 video file chunk by chunk?

I'm not sure whether this question is eligible to ask in this forum. I just want to know how the video streaming applications like,
Hotstar
Youtube
Spuul
and all developed a downloading manager which handle a video downloading process smoothy. How can we develop the same in my application? What are all the things i need to check for developing this? How should i develop it properly?
Any suggestions?
There now exists a Chrome extension which unites segments from m3u8 list and combines them in a video which then is saved to your computer.
Here's the link HLS Video Saver.
Your best shot is HLS. Segment your video file on server side with lets say
apple segmenter. Then create m3u8 playlist with these files. Next open the playlist file with the media player of your choice.

Stream only audio track from mp4 file

I have a remote MP4 file that has video and sound. I want to only stream the audio track of the mp4 file. I don't need the video and want to decrease the internet usage in my app. I have no idea where to start with this, Google doesn't seem to help. Is this impossible? Any ideas?
You can't... If you want audio only, you need to split video / audio on the server or put a stream software (like vlc, ffmpeg or mplayer) who can re-encode file in realtime (so you can drop video for new stream)
It's better, for me, to process all files on server and extract audio track...

create YouTube video slideshow from image and audio inputs

I'd like to upload an audio file to my website, programmatically create an video slideshow using an image already on the server, and then upload that video to YouTube using its API. The website is built on Grails, so a Java solution would be great; Linux command line could also work.
Uploading videos using the YouTube API is working well. I also have no trouble getting avconv or ffmpeg to create videos that will play in, for example, Windows Media Player. This works to make a playable movie:
avconv -i image.jpg -i audio.mp3 video.mpg
However, manually uploading that video to YouTube results in a format error. I can create other files that YouTube will process successfully, but the audio plays back with regular stutters. (A second or so of clear audio, then a brief gap, then some clear audio, ...) For example:
avconv -i image.jpg -i audio.mp3 video.mkv
I have experimented with a variety of output formats and codecs, but all fall into one of those categories: apparent encoding success but YouTube processing failure, or processing success but unacceptable audio playback.
I wonder if anyone can point me in the right direction. I'm open to any solution that will let me solve the basic problem of uploading audio to YouTube via my Grails website without forcing my users to create the video slideshow themselves.
Thanks in advance for any clues.
It is quite easy to create a YouTube slideshow video on iPad. This guide shows the steps.
Adding music, applying transitions, editing photos can all be done there.
I built a pretty similar web service, based on ffmpeg: it's called tovid.io — uploads user-provided mp3 to YouTube as a video, using uploaded image file for a visual track. User uploads mp3 file, an image, then we render a video in the backend, and publish it on YouTube under the user's account.
It is very easy to render an h264 mp4 video following YouTube specs using Linux command line ffmpeg. Let me know if you're interested in our particular command line.

How to play an in downloading progress video file in IOS

I'm assigned to implement a iphone app that can download video files from a server, and to play that video while the video file is written to the disk; something likes
(Movie player)<--read--[###### iphone flaskdisk ######]<--write---(Downloader)
I know that I would use HTTP video streaming play a remote video stream, but what i need is the video file is saved in flask mem after playing.
Any suggestion?
Thanks
If you know how to play a video from a URL, you can easily play the video while simultaneously download the video on another thread (if you are short on time)...
Alternatively, you can create your own video player that handles this function. Application sin the App Store do already do this (check out any video downloader application)
Thanks!

Resources