Tiny Core Linux

Tiny Core Extensions => TCE Corepure64 => Topic started by: GNUser on October 02, 2019, 08:53:58 PM

Title: chromium-browser missing video support
Post by: GNUser on October 02, 2019, 08:53:58 PM
Hopefully you guys are not tired of me yet :-[

I'm using chromium-browser.tcz on Pure64 10.1. The browser works beautifully, except that all videos I try to watch (with notable exception of those on youtube.com) fail. The error shown varies per website, but is usually some variant of "format not supported". Here is a random example from amazon.com: https://tinyurl.com/y3ybf6gh

ffmpeg4.tcz and Xorg-7.7-3d.tcz are loaded. I'm obviously missing extension(s) or setting(s), but am not sure what to try next. Any ideas?
Title: Re: chromium-browser missing video support
Post by: Rich on October 03, 2019, 07:24:41 AM
Hi GNUser
The video plays for me using Firefox ESR 52.1.2. The only "extras" it has is listed under  Plugins  as:
Quote
OpenH264 Video Codec provided by Cisco Systems, Inc. 1.6

This plugin is automatically installed by Mozilla to comply with the WebRTC specification and to enable WebRTC calls with devices that
require the H.264 video codec. Visit http://www.openh264.org/ to view the codec source code and learn more about the implementation.
Title: Re: chromium-browser missing video support
Post by: GNUser on October 03, 2019, 07:38:21 AM
I'm trying to stick with chromium because firefox requires both dbus and pulseaudio, which I would rather do without.

chromium can play that video out of the box in Devuan, without any browser plugins or ancillary packages (in Devuan's list of installed packages, the only one with "chromium" in the name is chromium itself). I'm guessing there is something missing from my TC system that is required for video playback within the browser. (I wish I knew how to figure out what chromium is using from the Devuan system when it plays the video...)

CORRECTION: In Devuan I actually have both chromium and iridium installed. Iridium can play the videos, but not chromium. Chromium in Devuan gives the same errors as in TC. Oops. It seems h264 support needs to be enabled at compilation time. See this: https://unix.stackexchange.com/q/285120
Title: Re: chromium-browser missing video support
Post by: Rich on October 03, 2019, 07:54:32 AM
Hi GNUser
I was not suggesting you switch to Firefox. Just pointing out that it had a CODEC pre-installed. Speaking of which, I see the  .info
file for  firefox-ESR.tcz  lists  libavcodec.tcz  as an optional dependency, which is installed on my system.
Title: Re: chromium-browser missing video support
Post by: GNUser on October 03, 2019, 07:56:58 AM
Got it. Sorry to have assumed.
Indeed, it seems missing h264 support is the issue. See my correction above--it crossed with your last post. I will dig a bit more.
Title: Re: chromium-browser missing video support
Post by: Rich on October 03, 2019, 08:19:07 AM
Hi GNUser
Got it. Sorry to have assumed. ...
No problem. I  "ass u me"  all the time. :)  For what it's worth, there are some compilation notes here:
http://tinycorelinux.net/9.x/x86_64/tcz/src/chromium-browser/
Title: Re: chromium-browser missing video support
Post by: Juanito on October 03, 2019, 08:30:55 AM
If you start chromium-browser from a terminal window, do you get any more error details?
Title: Re: chromium-browser missing video support
Post by: GNUser on October 03, 2019, 08:42:55 AM
Yes:
Code: [Select]
[1:15:1003/114223.754644:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: no supported streams"}
[1:1:1003/114223.755877:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR DEMUXER_ERROR_NO_SUPPORTED_STREAMS
Title: Re: chromium-browser missing video support
Post by: GNUser on October 03, 2019, 10:06:46 AM
I figured out a workaround: Use iridium-browser instead. I prefer iridium anyway, as it's more secure by default.
WARNING: What follows is a horrible, horrible hack. I'm just too lazy to do things properly when I'm the only one who'll be using it.

Code: [Select]
1. Download the latest iridium browser:
$ cd $HOME/Downloads
$ wget https://downloads.iridiumbrowser.de/deb/pool/main/i/iridium-browser/iridium-browser_2019.04.73-1iridium0_amd64.deb

2. Extract the contents:
$ tce-load -wi flex bash # flex is needed by ar, bash is needed by iridium-browser itself (shame on them)
$ ar x iridium-browser_2019.04.73-1iridium0_amd64.deb
$ xz -d data.tar.xz
$ tar -xvf data.tar

3. Create a tcz extension from the contents:
$ mkdir root
$ mv ./etc ./root
$ mv ./usr ./root
 # strip everything to make smaller:
$ find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null
$ mksquashfs root/ iridium-browser.tcz

4. Put things in your tcedir/optional/ directory:
a. Copy iridium-browser.tcz to tcedir/optional/
b. Grab chromium-browser.tcz.dep from the TC repository, rename it iridium-browser.tcz.dep, add bash.tcz to it, copy it to tcedir/optional/

5. "Convert" your chromium profile:
$ cp $HOME/.config/chromium $HOME/.config/iridium

6. Enjoy!
$ tce-load -i iridium-browser
$ iridium-browser

I'm happy with this workaround until a proper solution comes around. h264 support must be baked-in, since h264 videos play just fine even without ffmpeg4.tcz loaded.
Title: Re: chromium-browser missing video support
Post by: jazzbiker on October 03, 2019, 12:39:37 PM
Ohh, nnnnoooo! Upsssss, What? ZZZZapppp,,,, Yea........
Title: Re: chromium-browser missing video support
Post by: GNUser on October 03, 2019, 05:17:32 PM
Hmmm... jazzbiker must either really like or really hate my workaround ;)
Title: Re: chromium-browser missing video support
Post by: neonix on October 04, 2019, 05:49:00 AM
If you start chromium-browser from a terminal window, do you get any more error details?

I tested chromium-browser.tcz 66.0.3343.0 and it looks like it doesn't play h.264, Theora (VP3) and Webm (VP8) but it plays VP9 + opus (on youtube).  Terminal doesn't display any error when I go to youtube livestream or https://www.quirksmode.org/html5/tests/video.html
but when I open http://techslides.com/demos/sample-videos/small.mp4 I get:

Code: [Select]
[1:15:1004/144047.674512:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: no supported streams"}
[1:1:1004/144047.678277:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR DEMUXER_ERROR_NO_SUPPORTED_STREAMS

This file also work:
http://techslides.com/demos/sample-videos/small.ogv
I didn't installed any ffmpeg extension.

If you want to determine you browser version go to:
https://www.whatismybrowser.com/