Why is there is no specifications for file format (e.g. HLS or DASH) in Media Source Extension? - http-live-streaming

I'm trying to understand what does impose support of certain media file formats by different browsers.
Why there is no specifications for file format (e.g. HLS or DASH) in Media Source Extension? And if file format is not specified by MSE, then which standart specifies it? Is it up just to browser implementation?

HLS and DASH are not file formats, they are adaptive streaming standards. They can use various containers and codecs.
For MSE there's a registry of byte stream formats here:
https://www.w3.org/TR/mse-byte-stream-format-registry/
At the time of writing they are WebM, MP4, MPEG-2 TS and MPEG/AAC audio-only.

Related

Platform support for arbitrary codecs in HEIF

Apparently, the hip way to define a new image format is to combine the ISO base media file format with an existing image or intra-frame video codec, generalized in HEIF / MIAF with existing explicit HEVC, AVC and AV1 adaptations. JPEG 2000 employs ISOBMMF in a different way.
Can I expect platforms (i.e. operating systems, browsers, ...) that support HEIF in general and a random codec in general to support the specific combination of both as well? or does every codec need custom boxes/atoms?
For instance, could I simply put VP8 or VP9 streams, as known from WebM and WebP, into a HEIF container? or more ancient, exotic or futuristic video codecs like MPEG-1/2, ASP, Ogg Theora, Daala, Thor, Dirac, Cineform, VVC, EVC? What about JPEG XL/XR/XT/LS/2K, PNG or even BMP/RLE still images?

Why should a video uploaded to Azure Media Service be encoded?

I have recorded a video on my phone, I don't get why it needs to be encoded at all. Doesn't the format persist? Maybe I missing the point of encoding here. After the recording is it not already in format that is viewable to users?
It's a valid question if you wanted to just upload the existing MP4 file that was encoded on your phone and just stream it as a single bitrate HLS or DASH packaged file.
Most users of our service prefer that the uploaded MP4 file is first encoded to multiple bitrates and resolutions to allow for Adaptive Bitrate Streaming.
If you are not familiar with what Adapative Streaming is or how it works, I recommend watching a few of these - https://www.youtube.com/results?search_query=Adaptive+bitrate+streaming+overview
Or read through this article
https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming
We have two types of encoding presets to enable this. One called Adaptive Streaming, which will generate a fixed "ladder" of bitrates and qualities, and one called Content Aware Encoding, which will look at your video, analyze it, and generate the best set of tracks and bitrates for the content type.
https://learn.microsoft.com/en-us/azure/media-services/latest/content-aware-encoding
Thanks,
John D.

Difference between audio encoding/decoding and format conversion

Recently i have been trying to convert an audio file from one format to another through ffmpeg. i was trying to do some google but results made me a little confused about the difference between encoding and decoding an audio file and converting from one format to another.
Let me describe it this way: There are several different file formats for video files (sometimes also called "wrappers"). There are also several different codecs which can be used to encode (or compress) the audio and video. Audio and video use different codecs - and the encoded formats can be sorted in different file types/formats.
So when you talk about "encoding" vs. "converting" a couple of things come into play.
"Encoding" would be the act of taking audio/video and encoding them into a given codec(s). "Converting" implies having stuff in one format, but wanting it in another. There are two ways of looking at this:
Often called "repackaging" - this is when the video (for example) has been encoded correctly (let's say h264, with a bunch of parameters), but you want it in a different file-type - maybe it's an .AVI and you wanted it in an .MP4. This doesn't involve changing the actual video - just re-wraping the h264 stream in a new "wrapper", and is thus a fast operation.
Re-encoding. Let's say your audio was in a MP3 format, and you wanted it in an AAC format. This would require decoding the entire MP3 stream, and re-encoding it into AAC.
Obviously you can also do "1" and "2" together.
Refer Formats and Codecs for detailed information.
Hope it helps!

How do I create an mp4 file from a collection of H.264 frames and audio frames?

I have a program that captures and stores H.264 encoded video as well as audio into a proprietary format file. I need to be able to export that video and audio to an mp4 file. I prefer C# but will use C++ if necessary. Any suggestions?
To produce MPEG-4 Part 14 .MP4 file you need a multiplexer. There is a choice of multiplexers out there:
FFmpeg (libavformat)
DirectShow filters (free and open source from GDCL, commercial)
Windows 7+ Media Foundation file sink
API and complexity might vary because some of multiplexers are expected to be a part of pipeline, they are not completely standalone classes. You might want to check respective samples (and license agreements, perhaps, too) to see what is best for you.
Take a look at libmp4v2. Fairly straightforward to use..
http://code.google.com/p/mp4v2/

Direct show samples (AMCap) on Platform SDK with MP4 file

I want to generate .mp4 file using Direct show samples (AMCap). But i don't know how to implement this.
Can anyone please help me about this?
Thanks in advance,
Dhaval Kariya
AMCap Sample captures and displays video. No encoding and choices of multiplexing into files (only basic capture/recording through a basically obsolete helper interface).
Video capture application.
This sample application demonstrates the following tasks related to
audio and video capture:
Capture to a file
Live preview
Allocation of the capture file
Display of device property pages
Device enumeration
Stream control
The items above might be confusing as they mention capture and file allocation. This is a trail of 15 years old history when file capture was a big deal. The helper object to initialize capture targets AVI and ASF/WMV only, you neither can extend it to support other formats, nor you need to.
You need to check how to store video/audio into files (see below) and follow the same steps in building the pipeline with MPEG-4 encoders and multiplexer. You will need to use a third party MPEG-4 multiplexer for MP4 file format because Windows does not provide you with such out-of-the-box usable component.
See:
Capturing Video to a File
Free DirectShow Mpeg-4 Filters

Resources