rmottola / Arctic-Fox

Web Browser for Mac OS X 10.6+, Linux (PowerPC, x86, amd64, ARM, MIPS), NetBSD, OpenBSD, and Windows XP.
Other
290 stars 35 forks source link

H264 (MP4) videos can't play #202

Open alarixnia opened 2 months ago

alarixnia commented 2 months ago

Hello, I'd like to use the Indivious or ViewTube frontends for YouTube with ArcticFox. Currently, these sites fail to play videos because they try to load a h264 video and it fails.

Is there any way I can build Arcticfox with H264 support enabled? I'd like to distribute these builds with the NetBSD package.

Thanks.

alarixnia commented 2 months ago

Related invidious issues:

https://github.com/iv-org/invidious/issues/3993 https://github.com/iv-org/invidious/issues/3677

rmottola commented 1 month ago

To be honest, I don't know if there is an option not enabled or still some code path missing. Do you know what component should provide h264 decoding? ffmpeg?

rmottola commented 1 month ago

Are you able to use h264 for wha tyou need on latest firefox?

I am on linux with latest and testing https://canonical.github.io/inbrowser-encode-test/ only works for vp8, but that is encoding

rmottola commented 1 month ago

https://tools.woolyss.com/html5-audio-video-tester/

this confirms that SeaMonkey and Firefox can play 264, but ArcticFox does not. At least we have an easy test.

alarixnia commented 1 month ago

Yeah I believe the h264 support should be provided through ffmpeg.

rmottola commented 1 month ago

Yeah I believe the h264 support should be provided through ffmpeg.

hmm.. Just by chance do you know if FF52 ESR has h264 support? and FF 45ESR? that way I have targets to compare. ArcticFox has some PaleMoon deriving ffmpeg updates.

alarixnia commented 1 month ago

it appears my memory is playing tricks on me, I thought firefox52 had h264 support on unix.

https://html5test.com/ reports no.

it's built against ffmpeg.

rmottola commented 1 month ago

Then it will be quite a bit more work and won't get mad over it right now. First goal is to match FF 52 as best as possible. If you have FF52 handy, you can use my proposed test to have more granular checks. https://tools.woolyss.com/html5-audio-video-tester/

according to https://caniuse.com/mpeg4 support was provided by gstreamer, which became obsolete and removed. So I don't know when it added different support.

According to https://caniuse.com/mpeg4 it was for WebRTC only back then.

rmottola commented 1 month ago

Hmm.. more complicated. Read here: https://askubuntu.com/questions/389437/how-do-i-get-html5-h-264-video-working-on-firefox

and I now test on Linux firefox 125 and it has an addon installed for H264. Seamoneky has not! Wonder...

I guess ArcticFox doesn't get this ad on and FF52 neither. I suppose there is no easy way, especially on BSD?

alarixnia commented 1 month ago

We don't need an addon for h264 on BSD, it's just ffmpeg compiled with h264 support enabled as far as I know.

alarixnia commented 1 month ago

I saw that tenfourfox supports h264 through ffmpeg: https://github.com/classilla/tenfourfox/wiki/PlayingH.264

rmottola commented 1 month ago

It has some very custom plugin and libraries, apparently. Or do seamonkey and firefox also use ffmpeg? This needs a lot of investigation.

alarixnia commented 1 month ago

Seamonkey and firefox both just need ffmpeg in recent versions.

rmottola commented 1 month ago

Seamonkey and firefox both just need ffmpeg in recent versions.

I noticed that Firefox between v52 and v60 added ffmpeg v58. Can you see if FF60 works for you where you already said 52 didn't? On the other side, AF had 58, since it came from PaleMoon which it backported it. There was a typo in loading versions, I fixed it, but it does not improve the situation. I tried to import quite some media related code, but no help. If you want to try building dev branch, try yourself.

rmottola commented 1 month ago

@alarixnia hmm.. Current dev branch has H264 working on MacOS, but same code does not enable it on Linux or NetBSD.

I wonder if WebRTC has to be enabled...

K4sum1 commented 1 month ago

roytam1's New Moon 27 plays H.264 videos that Arctic Fox can't play. Although I'm testing on Windows, idk if the code could work on Mac or Linux.

rmottola commented 3 weeks ago

@K4sum1 that is not test.. I don't know if @roytam1 changed something or it just works on windows. As I wrote, H264 works on Mac...

roytam1 commented 3 weeks ago

I don't know if @roytam1 changed something or it just works on windows.

yeah I did change it to load external libav(LAV Filter) decoder to do decoding.