-
-
Notifications
You must be signed in to change notification settings - Fork 827
Description
Describe the Bug
In some downloaded videos from youtube where the file has not been recompressed, such as when the download max size is set to -1, the stream is h264 encoded but firefox can't deal with the matroska container.
In firefox, the message "No video with supported format and MIME type found" is shown in the video player, and the error
Media resource https://files.catbox.moe/6w5twb.mp4 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) Details: static MP4Metadata::ResultAndByteBuffer __cdecl mozilla::MP4Metadata::Metadata(mozilla::ByteStream *): Cannot parse metadata is logged in the console.
Steps to Reproduce
CRAWLER_VIDEO_DOWNLOAD_MAX_SIZE=-1
CRAWLER_VIDEO_DOWNLOAD=true
Download a youtube video like https://www.youtube.com/watch?v=Ntraj80qN2k
Expected Behaviour
Archived videos should play in firefox rather than displaying an error about MIME type
Screenshots or Additional Context
I've fixed it in my local instance by specifying the merge output format for yt-dlp in the videoworker.ts file by using the line below.
ytDlpArguments.push("--merge-output-format", "mp4");
This fix works for me but I think it would annoy some people that prefer the existing .mkv default. Therefore, I suggest adding an environment variable that defaults to the current mkv but that can be user-specified to mp4 or whatever for people who want to be able to use firefox to see their videos. I suspect safari might also have this problem but I didn't bother to check. I would think it should be something like the below:
CRAWLER_VIDEO_MERGE_FORMAT="mp4"
Device Details
Firefox 132, tested on Windows 10 and Ubuntu
Exact Hoarder Version
v0.20.0
Have you checked the troubleshooting guide?
- I have checked the troubleshooting guide and I haven't found a solution to my problem