You are not logged in.
Hi, so I've been trying to resolve this issue for quite a while now. At some point I just gave up on it and switched to Brave, but I want to have more options to test what works best for battery life in my case, but because of this issue, I can't used Firefox browser or its forks. I do not have this issue with all videos, for example Youtube works fine, but only with some of them. The codec they use is H.264, so it's not because HVEC isn't supported or something.
The error I get on some videos is
The media could not be loaded, either because the server or network failed or because the format is not supported
OpenH264, ffmpeg are both installed
LIBVA_DRIVER_NAME is set and vainfo shows proper output
The output:
Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.2.7-arch1.1 for AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.8, DRM 3.59, 6.12.1-2-cachyos)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Only the CachyOS kernel is used, not their whole distro. So I guess it still counts as Arch and not it's derivatives?
Logs show this
[Child 14689, MediaDecoderStateMachine #1] WARNING: Decoder=78ae34a1db00 state=DECODING_METADATA Decode metadata failed, shutting down decoder: file /home/runner/work/Floorp/Floorp/dom/media/MediaDecoderStateMachine.cpp:372
[Child 14689, MediaDecoderStateMachine #1] WARNING: Decoder=78ae34a1db00 Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) - static MP4Metadata::ResultAndByteBuffer mozilla::MP4Metadata::Metadata(ByteStream *): Cannot parse metadata: file /home/runner/work/Floorp/Floorp/dom/media/MediaDecoderStateMachineBase.cpp:167
Play DRM-controlled content is checked
MOZ_DISABLE_RDD_SANDBOX=1 is set too
media.ffmpeg.vaapi.enabled media.hardware-video-decoding.force-enabled media.rdd-process.enabled are all set to true.
I'm using an AMD iGPU for hardware-acceleration to work, so no additional configuration should be needed as per my research. But video playback just refuses to work.
The issue persists on Firefox and Floorp, but the video playback on Brave browser is fine
Last edited by righN (2024-12-07 14:25:18)
Offline
What is "certain videos"? Youtube?
I do not have this issue with all videos, for example Youtube works fine, but only with some of them.
"No"
What makes you assert that it's h.264? Is is a local video? How was it created? Can you link/share it?
Or does eg. mpv complain about defects in the video when playing it?
Does it play if you disable HW acceleration?
Online
What is "certain videos"? Youtube?
I do not have this issue with all videos, for example Youtube works fine, but only with some of them.
"No"
What makes you assert that it's h.264? Is is a local video? How was it created? Can you link/share it?
Or does eg. mpv complain about defects in the video when playing it?
Does it play if you disable HW acceleration?
At the moment, the only videos I have this issue with are the ones that our lecturers upload for us into our learning platform - Moodle, but not all of them. So to answer another question, I can't share the exact link, only to upload the video somewhere else and then share it.
I downloaded the video from the platform using an extension called Video DownloadHelper and then checked it with ffmpeg -i <video file name>
Here's an output of the same command on the video that doesn't work
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.1 (GCC) 20240910
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, matroska,webm, from 'FMITB17504 J Janutenaite-Bogdaniene Kaip prideti komentarus apie.mp4':
Metadata:
ENCODER : Lavf59.16.100
Duration: 01:07:39.97, start: 0.000000, bitrate: 455 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn
Metadata:
DURATION : 01:07:39.966000000
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
Metadata:
title : simple_aac_recording
DURATION : 01:07:39.882000000
At least one output file must be specified
And the output on the video that does work
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.1 (GCC) 20240910
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FMITB17504 J Janutenaite-Bogdaniene Teorija 2024-09-10 VILNIUSTE.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.12.100
Duration: 01:27:56.74, start: 0.000000, bitrate: 1255 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 992 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
At least one output file must be specified
Both video files play fine on VLC. I see that ffmpeg output is a bit different on them, but I don't really know where to go from there.
I noticed this issue before even enabling Hardware Acceleration, but I read the Wiki, asked on Discord and enabling Hardware Acceleration might've been one of the solutions, but it didn't help in my case.
If it helps, here's the output from about:support#media
Codec Name Software Decoding Hardware Decoding
H264 Supported Supported
VP9 Supported Supported
VP8 Supported Unsupported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
Theora Supported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported
Last edited by righN (2024-12-02 10:17:52)
Offline
The bad video is a webm mkv, not an mp4 like the other video.
Can you play it locally in firefox, file:///path/to/the/video.mkv ?
What if you turn it into an mp4
ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
Online
The bad video is a webm mkv, not an mp4 like the other video.
Can you play it locally in firefox, file:///path/to/the/video.mkv ?
What if you turn it into an mp4ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
It seems to be upload as .mp4 into the learning platform though, at least the browser tries to load it as .mp4 (both on Firefox and Brave (Chromium)) and I downloaded it as .mp4 and it still plays fine on VLC.
And no, I can't play it locally. This is what I get, when I try to play it locally
No video with supported format and MIME type found
Path was definitely correct, as the other video, that works on the learning platform, played locally in Firefox without an issue.
Last edited by righN (2024-12-03 11:38:54)
Offline
It seems to be upload as .mp4
It's not. The suffix is utterly meaninless.
mediainfo shady_file.mp4
Apparently it's not a streaming issue then, try to recontain it as mp4 and to play that.
Online
It seems to be upload as .mp4
It's not. The suffix is utterly meaninless.
mediainfo shady_file.mp4
Apparently it's not a streaming issue then, try to recontain it as mp4 and to play that.
General
Unique ID : 72856387366775018709145622881234893419 (0x36CFA13B0751A07F9B441C3A4160BA6B)
Complete name : video.mp4
Format : Matroska
Format version : Version 4
File size : 220 MiB
Duration : 1 h 7 min
Overall bit rate mode : Variable
Overall bit rate : 455 kb/s
Frame rate : 30.000 FPS
Writing application : Lavf59.16.100
Writing library : Lavf59.16.100
ErrorDetectionType : Per level 1
FileExtension_Invalid : mkv mk3d mka mks
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 7 min
Bit rate mode : Variable
Maximum bit rate : 11.2 Mb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Default : No
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 1 h 7 min
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Title : simple_aac_recording
Default : No
Forced : No
Here's the output of mediainfo
Trying to run ffmpeg -i video.mp4 -vcodec copy -acodec video.mp4 (as the file is saved as .mp4 in my case) gives me this:
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.1 (GCC) 20240910
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Output #0, mp4, to 'video.mp4':
[out#0/mp4 @ 0x5910236438c0] Output file does not contain any stream
Error opening output file video.mp4.
Error opening output files: Invalid argument
Even if I try ffmpeg -i video.mkv -vcodec copy -acodec video.mp4, result is the same
Last edited by righN (2024-12-03 18:30:42)
Offline
ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
Online
seth wrote:ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
Ah yes, thank you. It does play locally now on the browser. And the new ffmpeg -i video.mp4 output is:
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.1 (GCC) 20240910
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video3.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.7.100
Duration: 01:07:39.93, start: 0.000000, bitrate: 460 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 329 kb/s, 30 fps, 30 tbr, 16k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 121 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
At least one output file must be specified
But this only solves the issue for one video when there are a few of them and it wouldn't really be practical to download every video and then recontain it. Also, I can't really reupload those videos to the platform. And who knows, maybe I'll run into the same issue on other platforms.
Last edited by righN (2024-12-03 22:06:10)
Offline
So basically firefox cannot play that mkv container (as you preserved the streams as copies)
Can you play https://test-videos.co.uk/vids/bigbuckb … 0s_5MB.mkv ?
( https://test-videos.co.uk/bigbuckbunny/mkv has a whole bunch of them)
Online
Firefox does not support playing mkv files
https://connect.mozilla.org/t5/ideas/ad … di-p/15935
Some options may be:
https://addons.mozilla.org/de/firefox/a … r-for-you/
https://addons.mozilla.org/en-US/firefo … -with-vlc/
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
So basically firefox cannot play that mkv container (as you preserved the streams as copies)
Can you play https://test-videos.co.uk/vids/bigbuckb … 0s_5MB.mkv ?
( https://test-videos.co.uk/bigbuckbunny/mkv has a whole bunch of them)
Yes, I can play this one locally.
Offline
In firefox?
Despite progandy's links?
But not the url itself?
Regardless, inform the entity uploading those videos about their encoding mistakes, use an external player (vlc and mpv can play http streams) or use a different browser.
Online
In firefox?
Despite progandy's links?
But not the url itself?Regardless, inform the entity uploading those videos about their encoding mistakes, use an external player (vlc and mpv can play http streams) or use a different browser.
Yes, in Firefox it plays fine locally. If I click on the URL, it just downloads the video.
I'll inform the lecturer about the issue, but I'll doubt anything will be done about it. I'll just use a different browser, maybe you have any suggestions that wouldn't have an issue with this and also would be battery efficient?
Offline
progandy already listed some addons to make FF play videos in an external application - I also doubt that FF is much leaner or more battery conserving than chromium (as long a you get HW video acceleration to work)
You could also test vivaldi which optionally ships its own https://archlinux.org/packages/extra/x8 … eg-codecs/ and there's a couple of low-profile browsers but with limited html5 support.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Online