samirkumardas / jmuxer

jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Other
561 stars 114 forks source link

Media Resource Could Not Be Decoded in Firefox #126

Open Marco77577 opened 1 year ago

Marco77577 commented 1 year ago

I am using jmuxer in Chrome and it works perfectly fine.

On Firefox, however, I get the following warnings in the console, while the image is black or you can see a single frame at a time at best.

Media resource blob:http://localhost:4200/f0d9d5dc-148e-4bb5-93ab-c7c0fb44f7eb could not be decoded.

Media resource blob:http://localhost:4200/f0d9d5dc-148e-4bb5-93ab-c7c0fb44f7eb could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, MediaDataDecoder::DecodedData &): avcodec_send_pac

Do you know why this could be happening? Why does it work on Chrome, but not on Firefox?

Do you need any more information from me to solve this?

chrivers commented 1 year ago

I'm seeing the same problems - working in chrome, not working in firefox. And those same log messages.

Marco77577 commented 1 year ago

I am also still interested in any insight the developer could shed on this.

chrivers commented 1 year ago

I figured out the cause! (At least for my installation).

I've installed firefox from Flatpak, and I hadn't installed the full codec pack to go along with it, so h264 support was actually broken across my firefox installation.

Running flatpak install org.freedesktop.Platform.ffmpeg-full + restarting firefox fixed it.

If you have this issue, I highly recommend you start by verifying that h264 works in your browser at all.