Video playback "Video can't be played because the file is corrupt" despite the file being perfectly fine. 的最新解答https://support.mozilla.org/zh-TW/questions/13169562021-01-02T00:45:23-08:00Well my solution was ... after days and days of fiddling around ... quite simply to update ffmpeg!
N2021-01-02T00:45:23-08:00davepolithttps://support.mozilla.org/zh-TW/questions/1316956#answer-1380763<p>Well my solution was ... after days and days of fiddling around ... quite simply to update ffmpeg!
</p><p>Now everything works fine!
</p><p>This is my favourite conversion:
</p><p>"ffmpeg -i input.mov -vcodec libx265 -acodec mp2 output.mp4"
</p><p>the libx265 codec produces very small files with no apparent loss in quality
</p><p>By the way: this problem often doesn't make itself apparent in many situations. For instance, uploading the video to Facebook poses no problems, sound and are there, but posting the same video to Instagram reveals this kind of problem. So *always* use the most recent version of ffmpeg
</p>I totally forgot to check out the console, it has some handy information.
Media resource file:///G:/2020-12-06T10:44:22-08:00dapal003https://support.mozilla.org/zh-TW/questions/1316956#answer-1373833<p>I totally forgot to check out the console, it has some handy information.
</p><p>Media resource file:///G:/Videos/clips/testsrc.mp4 could not be decoded. testsrc.mp4
Media resource file:///G:/Videos/clips/testsrc.mp4 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)
Details: auto __cdecl mozilla::SupportChecker::AddMediaFormatChecker(const mozilla::TrackInfo &amp;)::(anonymous class)::operator()(void) const: Decoder may not have the capability to handle the requested video format with YUV444 chroma subsampling.
</p><p>Turns out that the decoder used in Firefox isn't capable of decoding 4:4:4 or 4:2:2 videos, only 4:2:0. Once exporting to 4:2:0 videos play back in the browser.
<a href="https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs#AVC_H.264" rel="nofollow">Acording to the documentation:</a> Most of the profiles use 8-bit color components and 4:2:0 chroma subsampling; The High 10 Profile adds support for 10-bit color, and advanced forms of High 10 add 4:2:2 and 4:4:4 chroma subsampling.
</p><p>Testing this I found out that using 10bit 4:4:4 still resulted in an "corrupt video" error with the same console message about 444 chroma subsampling not being supported. Strangely enough 4:2:2 and 4:2:0 on 10 bit result in no warning being pushed into the console and the video frame/media controls loading fine but no actual media is present to be played back.
</p>Could you try checking for error messages in Firefox's Web Console. Here's how:
You can open the Web2020-12-06T10:39:31-08:00jscher2000https://support.mozilla.org/zh-TW/questions/1316956#answer-1373832<p>Could you try checking for error messages in Firefox's Web Console. Here's how:
</p><p>You can open the Web Console in the lower part of the tab using either:
</p>
<ul><li> "3-bar" menu button &gt; Web Developer &gt; Web Console
</li><li> (menu bar) Tools &gt; Web Developer &gt; Web Console
</li><li> (Windows) Ctrl+Shift+k
</li></ul>
<p>Then reload the video in the upper part of the tab and watch for error or security messages. Anything that sounds like it could be relevant?
</p>I've used FFMPEG for the encoding I tried with NVENC and also without any hardware acceleration. The2020-12-06T10:03:21-08:00dapal003https://support.mozilla.org/zh-TW/questions/1316956#answer-1373829<p>I've used FFMPEG for the encoding I tried with NVENC and also without any hardware acceleration. The video in question is without nvenc, FFPROBE shows:
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1280x720 [SAR 1:1 DAR 16:9], 94 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default), so just a h264 video (with to my knowledge nothing special)
</p><p>I've also tried Hvec/h265 which kind of half worked. It showed the media player bar and it played back audio, but there was no video.
</p><p>As for the HTML5 video, it shows supported for HTMLVideoElement under canPlayType and probably for VP8/H264. Under isTypeSupported they all show supported.
</p>What codec did you use to compress the video in your MP4 file? Firefox should be able to play H.264 2020-12-06T09:54:41-08:00jscher2000https://support.mozilla.org/zh-TW/questions/1316956#answer-1373827<p>What codec did you use to compress the video in your MP4 file? Firefox should be able to play H.264 encoded video in MP4 containers, using Microsoft's Media Foundation.
</p><p><a href="https://developer.mozilla.org/docs/Web/Media/Formats/Video_codecs" rel="nofollow">https://developer.mozilla.org/docs/Web/Media/Formats/Video_codecs</a>
</p><p>I have a copy of the old YouTube test page up here as a cross-check:
</p><p><a href="https://www.jeffersonscher.com/sumo/html5-video.html" rel="nofollow">https://www.jeffersonscher.com/sumo/html5-video.html</a>
</p><p>If it doesn't show H.264 support, see:
</p><p><a href="/en-US/kb/fix-video-audio-problems-firefox-windows" rel="nofollow">Fix video and audio problems on Firefox for Windows N editions</a>
</p>