Bitstream analyzer for MPEG-4 Part 2 - h.264

Why do most commercial bitstream analyzers not support MPEG-4 Part 2 (MPEG-4 Visual), i.e. codecs such as DivX and XVid? I tried out the one from Codecian and checked out the features of Elecard software. Neither of them seem to support MPEG-4 Part 2. Codecian works smoothly with Part 10 (H.264) though.

Related

Why won't MP4 video work with HTML5 <video> tag on Firefox

Because I dislike Youtube and Vimeo is too expensive, I chose to upload my videos directly to the server at my web host and embed the videos on my site using the HTML5 tag (see photos for the code). The videos play fine on all browsers except for Firefox and I can't figure out why. https://memoriaelinguagrumentina.org/english/saponareseCuisine.html
I've seen several other posts on here asking about very similar problems; however, nearly all are at least 8 years old. I've gone through them as part of my troubleshooting process, but without any luck.
I've seen it recommended here to use multiple video formats (.mp4 AND .ogv) because there is no universal format supported by all browsers. Firefox did not always support mp4, but I believe it does now. So I don't believe this is the root of the problem.
I checked with my web host to see if they have the correct MIME types (see photo).
I cleared the cache on my browser, set the privacy settings to normal, and checked hardware acceleration.
What am I missing?
*note: To save disk space, I'd like to not have to upload duplicate videos in different video formats to the server, ideally. Since Firefox now claims to support mp4, I was hoping to get away with using only mp4.
Firefox doesn't support all video files. They generally support MP3, WebM, Ogg, and Wave containers, and if you are using an MP4 container then it usually depends on the platform decoders for AAC and H.264 audio and video streams. The video encoder format that you are using isn't supported by firefox. You should use supported encoders for your video.
You can find more information here:
https://support.mozilla.org/en-US/kb/html5-audio-and-video-firefox
Your MP4 videos are using H.265 video codec.
You need to have them encoded as H.264 to work in most browsers.
Solution: This means you must re-save your videos as a new format.
The problem is not just Firefox, even Windows Chrome does not play H.265 encoded video.
Things to fix:
Re-encode as H.264 (use High or Main profile for better compression-vs-quality output).
Re-size your videos (when doing re-encode). 720p should be okay for demos/intros. You don't need a large 3840 x 2160 pixels video showing inside a small 672 x 398 pixels box.
Your file size is not good. 286 mb is too much data loading for just a mere 6 minute video.

PCM support in WebM, and Chrome's WebM implementation

Does WebM support PCM for the audio codec?
I didn't think it did, but I see on the WebM documentation page that there is support for a BitDepth field with the following comment:
BitDepth - Bits per sample, mostly used for PCM.
If WebM does support PCM, does Chrome's implementation? And if it does, what is the appropriate content type for use with MediaRecorder? These all return false:
MediaRecorder.isTypeSupported('video/webm;codecs=h264,pcm');
MediaRecorder.isTypeSupported('video/webm;codecs=h264,wav');
MediaRecorder.isTypeSupported('video/webm;codecs=h264,adpcm');
MediaRecorder.isTypeSupported('video/webm;codecs=h264,pcm_s16le');
MediaRecorder.isTypeSupported('audio/wav');
PCM is now supported in the latest Chromium. Here is a reference for the list of valid mime types for MediaRecorder in Chromium.
As a snapshot, here is the ones currently supported in Google Chrome Version 64.0.3282.167 (Official Build) (64-bit):
MediaRecorder.isTypeSupported("video/webm")
MediaRecorder.isTypeSupported("video/webm;codecs=vp8")
MediaRecorder.isTypeSupported("video/webm;codecs=vp9")
MediaRecorder.isTypeSupported("video/webm;codecs=vp8.0")
MediaRecorder.isTypeSupported("video/webm;codecs=vp9.0")
MediaRecorder.isTypeSupported("video/webm;codecs=h264")
MediaRecorder.isTypeSupported("video/webm;codecs=H264")
MediaRecorder.isTypeSupported("video/webm;codecs=avc1")
MediaRecorder.isTypeSupported("video/webm;codecs=vp8,opus")
MediaRecorder.isTypeSupported("video/webm;codecs=vp8,pcm")
MediaRecorder.isTypeSupported("video/WEBM;codecs=VP8,OPUS")
MediaRecorder.isTypeSupported("video/webm;codecs=vp9,opus")
MediaRecorder.isTypeSupported("video/webm;codecs=vp9,pcm")
MediaRecorder.isTypeSupported("video/webm;codecs=vp8,vp9,opus")
MediaRecorder.isTypeSupported("video/webm;codecs=h264,opus")
MediaRecorder.isTypeSupported("video/webm;codecs=h264,vp9,opus")
MediaRecorder.isTypeSupported("video/x-matroska;codecs=avc1")
MediaRecorder.isTypeSupported("audio/webm")
MediaRecorder.isTypeSupported("audio/webm;codecs=opus")
MediaRecorder.isTypeSupported("audio/webm;codecs=pcm")
Note that if you are running Chromium, you need to have it built with proprietary_codecs support for some of the more exotic ones with h264/avc1 to work.
WebM does not support PCM audio.
WebM files consist of video streams compressed with the VP8 or VP9
video codecs and audio streams compressed with the Vorbis or Opus
audio codecs.
Source - http://www.webmproject.org/about/
VP8/VP9 video and Vorbis/Opus audio are the only codecs allowed in a valid .webm file. Why did you define WebM so narrowly?
We decided to define WebM files in this way because we wanted to do what’s best for users.
Source - https://www.webmproject.org/about/faq/
Regarding your documentation note:
I didn't think it did, but I see on the WebM documentation page that
there is support for a BitDepthfield with the following comment
WebM is a subset of the Matroska format. The page you are quoting is simply a carbon copy of the Matroska specification from its website:
https://www.matroska.org/technical/specs/index.html
The WebM page borrows all the content and notes whether a propery is supported or not. The line 'Bits per sample, mostly used for PCM.' - is the original Matroska specification, just like all the other lines, e.g. 'Table of horizontal angles for each successive channel, see appendix.' - note that there is no appendix given, but on the original Matroska specification page there is a hyperlink to an appendix. Matroska specification has that particular property description because Matroska supports PCM audio.
For PCM support in Chrome, see a great answer by Sepehr.

Why is firefox able to read m4a/aac file but not if embedded with HTML5?

I understand that Firefox has decided not to support AAC because of licensing issue but how come is it possible to read m4a files directly in Firefox ? (I'm using 28.0)
For instance with this file :
http://www.jplayer.org/audio/m4a/TSP-01-Cro_magnon_man.m4a
(ffmpeg: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s)
And it expectingly does not work with :
<audio controls>
<source src="http://www.jplayer.org/audio/m4a/TSP-01-Cro_magnon_man.m4a">
</audio>
The embedding code above works fine for me in Firefox 28 on Windows 7.
My understanding is that while Firefox doesn't support MP4 H.264 AAC from within the software (to avoid licensing issues) it instead farms it out to OS media capabilities automatically (rather than demanding a plugin), relying on external software to deal with the licensing (at least on Windows; Linux looks like it still needs a plugin(?) https://www.mozilla.org/en-US/firefox/26.0/releasenotes/).
If you're having difficulties with m4a files online (but not locally) since upgrading to Firefox 28, I had the same issue and it turned out to be down to MIME types; our default 'audio/mpeg' seemed to work with Firefox 27, but 28 needs 'audio/mp4 m4a' or reports the files corrupted. Don't know why that would affect the above though; you could try putting the type in the source tag, see if that helps.
https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats

Which formats should a video be encoded to

I am embedding a video feature on my website, and I am planning to use HTML5 player to play those videos.
2 questions:
1. Which formats should I encode the uploaded videos to (I need mobile support + PC + mac).
2. How can I prevent people from downloading the movie (HTML5 plays directly from my CDN, hence the link can be fetched easily)
Can CDN protect the content by issuing an access token that will expire in X time?
Thanks all!
1)
If you need to support also Firefox 3.6 you will need to ensure at least 3 formats: mp4, webm and ogv. Otherwise mp4 and webm are enough. mp4 is loaded by the apple mobile devices (ipad, iphone), Safari and it can be loaded by a flash player (supposing you have installed flash player plugin 9r3 as a minimum version). webm is supported by firefox and chrome
http://diveintohtml5.info/video.html#what-works
2)
take a look at How to prevent downloading HTML5 videos
First, Zencoder has a fantastic page on HTML5 video encoding recommendations:
The minimum for HTML5 video is MP4 + WebM or Ogg (or both), using the MP4 version for Flash fallback.
For mobile support, one H.264/MP4 output can take you a long way. 2-3 enables better quality and wider compatibility.
Second, at the moment, your videos will be downloadable with minimal effort (e.g., View Source). See the related question, "Is there a way to use DRM on HTML5 video?"
The HTML5 specification allows for any video format.It is the browser implementation that determines what formats are actually supported.
MP4 container with H.264 Video and AAC Audio
MP4/H.264 is supported by Safari and IE9+. You may find support in some versions of Chrome.
WebM container with VP8 Video and Vorbis Audio
WebM/VP8 is supported by Firefox, Chrome and Opera.
Ogg container with Theora Video and Vorbis Audio
Ogg/Theora is supported by Firefox, Chrome and Opera.
Bottom-Line
Use more than one format to be assured your client doesn't see blank frame.
As far as the Content Protection, I am bit short on that knowledge and also suppose that it doesn't make sense to go after this issue when your user might be running a slow connection
For content protection. seems like, today there is no straight forward way to do this. However, there is an active interest inside HTML5 camp where some form of DRM can be applied for this.
See this: http://gigaom.com/video/mdialog-tackles-html5-video-security/

What video format does HTML5 use and why is it compatible with Safari on the iPad

What video format does HTML5 support that is compatible with the iPhone/iPad? I was thinking of putting together a website with some instructional videos and I'm now confused as I thought that only Quicktime was supported by Apple mobile devices.
It uses H.264 - though this isn't described as having to be used by the HTML5 spec. Most browsers (IE9, Chrome, Safari) use H.264, though currently Firefox only supports OGG when using the video tag.
If you aren't sure what to do, try this project: http://code.google.com/p/html5media/ it lets you use the video tag with an H.264 video, then backports it to older IEs using a flash fallback.
Its not Ogg Theora and never will be H.264. They were going to put Ogg Theora but Nokia and Apple disagreed because of Hardware Acceleration, Stupid patent fud, compression/quality concerns , and wanting to push the non-free(beer/freedom) H.264. So they didn't include specific codecs in the spec (also screwing over good quality/compression ratio and free Ogg Vorbis audio codec). H.264 is not going into the spec, but unfortunately it might end up being "the practical choice for a while".
Ogg Theora currently has a lead in percentage of html5 browsers market share(Firefox+Opera+Chrome+some others>Safari+Chrome+IE9 Preview+ some others)
, on the other hand H.264 is easier to use both with flash as a fall back if the browser doesn't support html 5 video or html 5 video with H.264 codecs(Ogg Theora can be played with Java and maybe Silverlight plugins but those are not as popular/ubiquitous as flash). Plus people tend to care (I would argue too much over iphone/ipad which support H.264, note Android supports both ).
I was hoping Microsoft would decide to be open and screw apple at the same time by supporting VC-1 and Theora but unfortunately they seem to have dicded to go with H.264, hopefully they will change their minds and include Theora in the final ie9 release or that may be the end of the war. Firefox and Opera will not support H.264 unless the war is lost but might or might not afterwards using gstreamer(with directshow/quicktime providing the nonfree codecs).
Ipad supports H.264(I think it uses Quicktime but I think it might limit other Quicktime formats)
.........IE9 preview Firefox>3.5 Opera>10.5 Safari Chrome GtkWebkit QtWebkit
(might change hopefully)
Audio mp3/AAC Ogg Vorbis/WAV Ogg Vorbis/WAV mp3/AAC Ogg Vorbis/mp3 *1 *2
*5 *3 *4
Video H.264 Ogg Theora Ogg Theora H.264 Ogg Theora/H.264 *1 *2
*5 *3
*1 System codecs:Gstreamer(probably free codecs(ogg), good chance of many non free codecs including H.264/mp3 either bought from fluendo or packaged with non free linux cd/computer or installed by user possibly slightly illegal but common/easy/little chance of punishment)
*2 System codecs:Phonon (Gstreamer/xine/vlc/Direct show/Quicktime backends)- on linux mostly gstreamer/xine
*3 Gstreamer shipping only free codecs on win/mac os x, using System codecs
*4 might support AAC???
*5 In mobile firefox/fennec planning to use Gstreamer, I think, might use it everywhere ala opera later on.
The HTML5 specification doesn't (yet) state which format(s) can/should be used.
Currently, H.264 is the most widely used, but some browsers (most notably Firefox) don't support H.264.
H.264's biggest rival is Ogg Theora, but it's not supported by all browsers either.
See http://en.wikipedia.org/wiki/HTML5_video#Browser_support for a table of H.264 and Ogg Theora support in major browsers.
With Apple's decision to leave out Flash in the iPad, the issue of HTML5 video has flamed again, and a format war has begun between H.264 and Ogg Theora. John Gruber has been writing extensively about the subject for the past week:
GIF, H.264, and Patents
On Submarine Patents vis-à-vis H.264 and Ogg Theora
CBS.com Prepping HTML5 Video Playback for iPad
Thom Holwerda Says I’m Wrong About Ogg Theora and Patents
TED Goes H.264
Brightcove to Add Support for HTML5 Video
The iPad can play HTML5 <video> elements in a .mov or .mp4 container using the H.264 codec.
Safari on the Mac can play any file that QuickTime can play.
It's important to stress that QuickTime isn't a codec, it's a container format. A QuickTime (.mov) file can contain one of many possible codecs (H.264, etc.). Not all .mov files should be treated equally as "QuickTime" files in regards to what/where they can be played and what codec they are. This is a similar concept to .AVI—it's a container format that can deliver several codecs.
H.264 codec right now...
The reason html5 videos work on the iPad, iPhone and iPod touch is because the video player itself is part of the code and does not require a separate program to run unlike flash videos which needs flash player installed, Which cannot be installed on apple mobile devices.