jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.27k stars 1.2k forks source link

Support AV1 in mp4 #1241

Open cromefire opened 4 years ago

cromefire commented 4 years ago

Support detection of av1 in mp4 in firefox and chrome:

To probe support use:

video.canPlayType("video/mp4; codecs=av1");
cromefire commented 4 years ago

To try av1 in firefox (desktop), turn on "always prefer" here and then try this (ensure av1 is used in the stats for nerds)

heyhippari commented 4 years ago

We already do: #1167

cromefire commented 4 years ago

Okay but av1 in mp4 support is still missing. This would be video/mp4;Codecs=av1

cromefire commented 4 years ago

This is what YouTube for example does

Artiume commented 4 years ago

So av1 files can't be streamed in .ts containers. we have to use mp4 containers. I tried disabling video transcoding to verify it would work in the browser and it kept failing. Turns out it was trying to Direct Stream and ffmpeg ate itself.

https://github.com/SPBTV/video_av1_samples

cromefire commented 4 years ago

Yeah webm and mp4 only and some weird format (ivf or so?) for now

stale[bot] commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

cromefire commented 4 years ago

Not stale

cromefire commented 4 years ago

Shush bot

Extarys commented 3 years ago

Can we also add mkv containers? I know how to work with mkv and it's tools,etc. I must not be alone using mkv containers with av1? I tried streaming a mkv av1 50fps video in jellyfin and got a not supported error, quite sad.

It would feel weird having a bluray collection locally with a "webm" file format, or is it? I used mp4 "back in the days" when the video was x264 encoded but that is pretty much it. all my videos are mkv now.

heyhippari commented 3 years ago

MKV is unfortunately not supported by browsers.

Historically, MKV was treated as WebM (By Emby, then that behavior was inherited by Jellyfin). However, we removed that behavior because, while WebM is essentially a small subset of MKV, it's not fully compatible with MKV, and caused some errors when files weren't compatible.

Extarys commented 3 years ago

@MrTimscampi Oh I see, thank you for the explanation. :heart: I guess it's easier in the backend to support webm only than trying to support both :disappointed:

It is a little off topic so feel free to redirect me if needed, but I'll get faster answer and probably a better one too asking this here and now: If I want my library to be as jellyfin-friendly possible while having the flexibility and audio quality I currently have, should I start using webm for my new encodes with opus/av1 instead DTS and stuff? I mean, opus rocks. :v:

x264 videos inside mkv should be pretty easy to "port", just need to transcode the audio track. Main issue is vodsub but I know there is plan to extract the images on the server and support them in browser or something so no biggy on that part. The sad thing is aas subtitles won't have the custom fonts because webm doesn't support attachments. Kodi and the mpv-shim can use those tho, but I understand the browser's limitation too.

EDIT: Ohhh I think mp4 does pretty much everything I want compared to webm and is supported in browser, so... woops.

stale[bot] commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

Nothing4You commented 3 years ago

bad bot

stale[bot] commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

Extarys commented 3 years ago

No, bot!

stale[bot] commented 2 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

Nothing4You commented 2 years ago

insert useless comment here that generates activity for the bot to see

LinAGKar commented 2 years ago

So av1 files can't be streamed in .ts containers. we have to use mp4 containers

Same goes for FLAC. I can directstream AV1+FLAC to Firefox just fine if it's in MP4, but if it's in MKV it will be transcoded into H.264+AAC to be put into a TS container.

gaalos commented 2 years ago

hi everyone ! did you notice Firefox support AV1 codec since rev 100 ? :)

LinAGKar commented 2 years ago

hi everyone ! did you notice Firefox support AV1 codec since rev 100 ? :)

It's supported it for a lot longer than that

gaalos commented 2 years ago

@LinAGKar Ok if found post talking about it, but still not working in jellyfin on firefox ?

LinAGKar commented 2 years ago

@LinAGKar Not sure what you're trying to say, but Firefox has supported AV1 since version 67 (and since 65 on some platforms). Though Firefox 100 added support for AV1 hardware decoding on Windows.

gaalos commented 2 years ago

@LinAGKar thx for your reply. i convert Movie to AV1 but when i read it on firefox, jellyfin convert it to 264

Edit : AV1 works inside webm but not mp4 Best regards

Extarys commented 2 years ago

@gaalos does it has DTS audio track of VobSub subtitles? If so, it'll need transcoding I believe.

gaalos commented 2 years ago

@Extarys image

nyanmisaka commented 2 years ago

Firefox doesn’t support EAC3 audio.

gaalos commented 2 years ago

@nyanmisaka nice reply! does it support AC3 ? edit : No It's better to convert it to opus or vorbis ?

nyanmisaka commented 2 years ago

No. Only a few browsers support AC3 and EAC3, such as Edge and Safari. I think Chrome and Firefox can handle OPUS well, but for the best compatibility you can also use AAC.

gaalos commented 2 years ago

@nyanmisaka thx for your reply. Apprently OPUS is better than AAC as same biterate. AV1 is made for low bitrate with good quality. Make sens to use OPUS with.

Opus support: image https://www.lambdatest.com/opus

Extarys commented 2 years ago

I tend to convert DTS and EAC3 to Opus. Usually 128kb per 2 channels, a little more if it's DTS and I really want to preserve more quality. I know about generation loss and all, but I prefer to direct stream instead of transcoding on the fly the whole video every time.

gaalos commented 2 years ago

@Extarys did you use AV1 with your Opus format ?

Extarys commented 2 years ago

@gaalos Yes, and when I have VobSub as subtitles I disable the subtitles before playing the episode.

The Jellyfin desktop client would work fine with EAC3 audio, but doesn't support AV1 lol

gaalos commented 2 years ago

@Extarys, i don't have issues with desktop client But i have with Android TV Client

Issues link

I upload some videos test if you want test it @Extarys Here

You can found AV1 with OPUS and AV1 with EAC3, i don't have issues except on android TV

Extarys commented 2 years ago

I do not own any Android TV client to try and replicate your current issue. Perhaps another member of the community will be able to test and help provide logs.

DesertCookie commented 2 years ago

I upload some videos test if you want test it @Extarys Here

I'd be happy to test on my Shield TV if you were to reupload the files.