Really Fast Browser Inside! (mp4 video & mp3 audio support)


47 posts   Page 1 of 2   1, 2
by Gomoto » Tue Feb 26, 2013 11:00 pm
New version 1.0-6 rc3 (23.Mar.2013) of the fast and featureless :shock: minimal-web-browser (aka web) now available on google code!

:arrow: http://code.google.com/p/minimal-web-browser/

Features:

Instant Start!
Login once to your favourite sites (cookies supported)
Download files in the background! (wget powered)
Search the web & the current page
Toggle javascript
Playback mp4 video (mimetype video/mp4 and application/octet-stream) supported
Test video playback on http://www.tagesschau.de (a german news site). Press q to quit video playback.
Playback mp3 audio ( *.m3u internet stream now supported with: sudo apt-get install mpd mpc)


Or start it with command web in a terminal if you want to follow the download progress.

(Or download the code and make your own fun & featureless browser. Only 200 lines of code.)


read more about the browser here: (but do not download the old junk in that thread)
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=34652
Last edited by Gomoto on Fri Mar 22, 2013 11:48 pm, edited 10 times in total.
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by bfagioli » Wed Feb 27, 2013 3:08 am
It is fast and works fine on Raspbian but I mistakenly downloaded and installed on Debian softfp first and that does not run. What is the dpkg command to uninstall? Thanks.
User avatar
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm
by Gomoto » Wed Feb 27, 2013 4:04 pm
(On the softfloat os you compile the source with make, then you could test the command in place with ./web)

If you want to uninstall the web .deb package, remove the package with:

Code: Select all
sudo apt-get remove web
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by bfagioli » Thu Feb 28, 2013 12:48 am
On softfp I tried to compile it but got these errors:
gcc web.c -o web `pkg-config --cflags gtk+-2.0 --libs webkit-1.0`

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package webkit-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit-1.0' found
web.c:18:21: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
make: *** [game] Error 1


I ended up removing it. I don't use softfp that much anyway.
User avatar
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm
by Gomoto » Thu Feb 28, 2013 6:48 am
thank you for the feedback
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by kbailey » Sat Mar 02, 2013 4:46 am
Pity apt-get does not know it. Hopefully Debian will soon add it to the ARM division.
-Cheers!
-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-
Computers are the new Logos.
Does this compute?
User avatar
Posts: 40
Joined: Fri Feb 08, 2013 6:22 am
Location: Largo Florida USA
by gkreidl » Sat Mar 02, 2013 12:11 pm
I compiled it without any problems.

Download doesn't work, if you simply click on a link. You have to add some settings and catch some signals (it works from the popup menu).

See: http://webkitgtk.org/reference/webkitgt ... -requested

(terrible doc)

Could you replace the call to "wget" by a call to a script "webdownload", which calls wget? Then this script could be replaced by the user with something more elaborate, like calling omxplayer for movies or mupdf to show pdf files. The script should get the uri and the mime type.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer
Posts: 5066
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany
by Gomoto » Sat Mar 02, 2013 1:41 pm
The source code of the browser is only 150 lines of code. I prefer the wget way for downloads. Why change settings or scripts in some configuration file when I can use the source code for this? That is my philosophy for this minimalist browser. But you are welcome to use the code as starting point for something more comfortable.

I like it that everybody interested can understand the code at a glance. I see this code as a learning resource, allthough I use it as my standard browser for day to day use. Maybe I will add a on page search function after I decide on the minimalist way to do it ;)
Last edited by Gomoto on Mon Mar 04, 2013 6:19 pm, edited 2 times in total.
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by Gomoto » Sat Mar 02, 2013 7:40 pm
New Features:
    Autocomplete URI (Just enter www.somesite.com is now enough, no need for http:// prefix anymore)
    Search functions added (Enter blank text to search the web, use /text to search for text on the current webpage)
Last edited by Gomoto on Mon Mar 04, 2013 12:30 am, edited 1 time in total.
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by Gomoto » Mon Mar 04, 2013 12:30 am
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by bfagioli » Mon Mar 04, 2013 1:44 am
Gomoto wrote:Download at http://code.google.com/p/minimal-web-browser/ available.

Your latest version web_1.0-2_armhf_rc1.deb did not install correctly. Here is the dpkg output:
Code: Select all
pi@raspberrypi ~ $ sudo dpkg -i web_1.0-2_armhf_rc1.deb
Selecting previously unselected package web.
(Reading database ... 70480 files and directories currently installed.)
Unpacking web (from web_1.0-2_armhf_rc1.deb) ...
Setting up web (1.0-2) ...

Your last version had this addtional line in the output:
Code: Select all
Processing triggers for desktop-file-utils ...

I don't see your "web" anywhere on my system after installing the web_1.0-2_armhf_rc1.deb package.

I'll go back to your prior release until you sort this out.
User avatar
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm
by whowantspi » Mon Mar 04, 2013 2:16 am
Would it be possible for someone to post installation instructions for those of use who don't know how.

Thanks Max
Posts: 30
Joined: Mon Feb 11, 2013 12:00 am
Location: USA Alabama
by bfagioli » Mon Mar 04, 2013 2:42 am
whowantspi wrote:Would it be possible for someone to post installation instructions for those of use who don't know how.
Thanks Max

You download the. deb file from Gomoto's web site and then you use the dpkg command with the .deb file. Like this:
Code: Select all
sudo dpkg -i web_1.0-2_armhf_rc1.deb

But, as you can see from my previous post, Gomoto's latest version (e.g. 1.0-2) did not install for me. Fortunately I still had the old .deb file (1.0-1) so I went back to that old version.

I created a defect for Gomoto. Hope you don't mind me doing that. I figured that's what the issue tracking system is for right?
https://code.google.com/p/minimal-web-browser/issues/detail?id=2
User avatar
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm
by Gomoto » Mon Mar 04, 2013 6:04 pm
Updated debian package available at http://code.google.com/p/minimal-web-browser/
Install it with: sudo dpkg -i web_1.0-3_armhf.deb

Yes, your feedback is welcome and the issues system on google code is spot on for this task.
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by whowantspi » Mon Mar 04, 2013 11:29 pm
I get error messages while web is being used.

pi@raspberrypi ~ $ web
Xlib: extension "RANDR" missing on display ":1.0".
** Message: console message: @0: event.layerX and event.layerY are broken and
deprecated in WebKit. They will be removed from the engine in the near future.

** Message: console message: @0: event.layerX and event.layerY are broken and
deprecated in WebKit. They will be removed from the engine in the near future.

** Message: console message: @0: event.layerX and event.layerY are broken and
deprecated in WebKit. They will be removed from the engine in the near future.

I have a few dozen of these error messages but the browser does work.

Max
Posts: 30
Joined: Mon Feb 11, 2013 12:00 am
Location: USA Alabama
by Gomoto » Tue Mar 05, 2013 7:09 am
These are warnings (not error) messages from libwebkitgtk web engine, (most are) related to javascript. They are only shown when you start web from a terminal. Like gtk warnings sometimes shown from other desktop software started on a terminal.

Nothing I can do, but surpress them (which I do not want to do, they are there for a purpose :-) ).

If you do not want to see them start web in a new process like this:

web &

(but you will loose the download progress view as well this way)
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by -rst- » Tue Mar 05, 2013 3:52 pm
I would assume/hope the warning (and error) messages go to stderr and download progress to stdout, so redirecting these might be a solution?
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland
by Gomoto » Sat Mar 09, 2013 11:52 am
bump (this is the newer thread)
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by Gomoto » Sat Mar 09, 2013 9:40 pm
New version available: http://code.google.com/p/minimal-web-browser/

Even faster browsing
Less memory used
Javascript now optional
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by nhslzt » Sat Mar 09, 2013 11:33 pm
thx!!
User avatar
Posts: 63
Joined: Thu Feb 16, 2012 9:41 pm
Location: Dresden, Germany
by Gomoto » Sun Mar 10, 2013 2:18 pm
mp4 video support 8-) (mimetypes video/mp4 and application/octet-stream - powered by omxplayer)
entry bar shows uri of current webpage

command line support:

open uri:
web http://www.somesite.org

search the web:
web something

Test the video playback feature on german news site: http://www.tagesschau.de (Press q to quit video playback)
(or reply if you have other legal sites available that offer mimetypes video/mp4 and application/octet-stream)
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by Gomoto » Sun Mar 10, 2013 3:48 pm
I have to change my omxplayer script. For now it crashes when the download is not available at a fast enough rate (daytime). Will update the browser asap.

Update: www.tagesschau.de downloads now up to speed again.

If omxplayer crashes due to slow streaming rate a ctrl+alt+backspace xserver kill is always possible ;-)
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by gkreidl » Mon Mar 11, 2013 10:15 am
it's working really nice now! I patched the source a little bit (changing the length of the string comparison for mimetype video to 6) and now it plays all kinds of movies from my streaming media server (not only mp4, but also avi, mkv and so on). And a can play TV from my dvb-s Server (HD only at the moment because I have not bought the mpeg license yet). Audio files (I tested mp3 and flac) are played within the browser directly.

I plan to use web for a small and fast media player solution, similar to a popcornhour (100/200). No fancy stuff like XMBC, but a very simple solution based on a small and fast browser and two webservers written in python: a streaming media server and a second server based on the Karrigell framework (I've already written lots of applications for this framework, including a dvb-(t,s) server based on either mumudvb or vlc).

I'm only missing two things now: playing audio (and video) from m3u playlists and opening PDFs (similar solution as with video) in a simple PDF-Viewer (including opening on a special page with links like ...pdf#page=100). It can be done with mupdf.

Guenter
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer
Posts: 5066
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany
by Gomoto » Mon Mar 11, 2013 1:39 pm
I like the pdf idea and mupdf looks promising, but the version in the raspian repositories seems to have a problem. I get this error on different pdfs using mupdf:

+ fitz/filt_dctd.c:89: read_dctd(): jpeg error: JPEG parameter struct mismatch: library thinks size is 488, caller expects 448
| fitz/stm_read.c:53: fz_read(): read error
Speicherzugriffsfehler

Could you elaborate on a good solution to provide audio playlist support?
Do you have any legal websites with other mimetypes to test any source changes?

Thanks
Posts: 106
Joined: Tue Feb 12, 2013 1:21 am
by gkreidl » Mon Mar 11, 2013 3:32 pm
mupdf: this happens with scanned images in pdf files

I downloaded the source code of mupdf 1.2 and compiled it on the raspi. (mupdf has to be removed first). Afterwards you have to copy mupdf and mudraw from /usr/local/bin to /usr/bin. The errors are gone then.

xpdf (from the repo) is a good alternative; not quite as fast but more comfortable. They can be called in the same way:
xpdf pdf-file page or mupdf pdf-file page
You should leave that to the script, so anyone can change it easily. The script should download the pdf file (wget) and open it afterwards.

m3u: this is more critical, as m3u files can also contain video files or streams, not only audio. It would be nice to play audio in the background, without the black screen or terminal window. I'm just experimenting with audio playback (looking for low cpu usage), so I'm not sure yet. All programs I've tested so far use between 30 and 50% of cpu. Using the hardware hardware audio decoding for sound in omxplayer might provide a better solution. But for omxplayer you need a looping script, while other players (mpd/mpc, gst123 etc.) can be given the complete playlist.

Guenter
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer
Posts: 5066
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany