|
Post by alexfish on Jan 19, 2019 22:58:01 GMT 1
Hi All OMX Youtube Player; this exec is part of the web-kit, actually it is the main interface now using Curl , and added cli interface for youtube-dl hence works via the terminal the search is done with curl then parse with html2text(python) the keys are decoded by youtube-dl; as to some of the why in short googler does not accept a search string with 'youtube in it' and the pip install is now a mess after updating the system Re Python; as to the youtube-dl , in short it will be best to download from git and install that version youtube-dlto update sudo youtube-dl -u the exec and the html2text must be in the same folder , note this html2text is not same as html2text in the repos you may also find this version does more than the repo version html2text -h example search string pink floyd another brick in the wall Have Fun + BR Alex Attachments:omxplayer_yt.bz2 (70.05 KB)
html2text.bz2 (7.95 KB)
|
|
|
Post by alexfish on Jan 19, 2019 23:17:02 GMT 1
Example of the of the output in the terminal
if not sure about the omx interface
man omxplayer
if want quit type
q
Search youtube ? another brick in the wall https://www.youtube.com/results?search_query=another+brick+in+the+wall (1) = [Pink Floyd - Another Brick In The Wall (HQ)](/watch?v=YR5ApYxkU-U) \- Duration: 6:01.
(2) = [pink floyd - another brick in the wall](/watch?v=5IpYOF4Hi6Q) \- Duration: 3:50.
(3) = [Pink Floyd - Another Brick In The Wall, Part Two (Official Music Video)](/watch?v=HrxX9TBj2zY) \- Duration: 3:19.
(4) = [Pink Floyd HD Another Brick in the Wall 1994 Concert Earls Court London](/watch?v=WK5WLq4pBFg) \- Duration: 6:58.
(5) = [Pink Floyd - Another Brick in the Wall parts 1, 2, 3 (goodbye cruel world)](/watch?v=Zjh80iwj8rg) \- Duration: 11:22.
(6) = [Another Brick in the wall with lyrics](/watch?v=BN5Z28Dfl7o) \- Duration: 5:44.
(7) = [Korn - Another Brick In The Wall (Pink Floyd Cover)](/watch?v=xzkiJJ_NkD0) \- Duration: 7:10.
(8) = [Money - Pink Floyd + Lyrics](/watch?v=JkhX5W7JoWI) \- Duration: 6:23.
(9) = [Pink Floyd - Comfortably numb](/watch?v=_FrOQC-zEog) \- Duration: 6:54.
(10) = [R.E.M. - Losing My Religion (Official Music Video)](/watch?v=xwtdhWltSIg) \- Duration: 4:54.
(11) = [Another Brick in the Wall (Part 2) - Pink Floyd](/watch?v=34ZmKbe5oG4) \- Duration: 4:02.
(12) = [Pink Floyd - Another Brick In The Wall - Live - 1980](/watch?v=xBQsQoGodPY) \- Duration: 12:05.
(13) = ''[THE WALL'' \- PINK FLOYD / FULL HD.HQ.](/watch?v=0R_Kn5gq4Og) \- Duration: 1:21:04.
(14) = [Pink Floyd - Another Brick In The Wall (full version!)](/watch?v=cXgdMmYG8aU) \- Duration: 11:13.
(15) = [Pink Floyd – Another Brick In the Wall | Will Barber| The Voice 2017| Blind Audition](/watch?v=P6Q8eIVvDfM) \- Duration: 2:46.
(16) = [Mix – Pink Floyd - Another Brick In The Wall (HQ)](/watch?v=YR5ApYxkU-U&start_radio=1&list=RDYR5ApYxkU-U) \- Playlist
(17) = [How to Play the Solo to "Another Brick in the Wall" by Pink Floyd, David Gilmour](/watch?v=rJt7ru5vpNE) \- Duration: 24:34.
(18) = [Pink Floyd - Another Brick In The Wall](/watch?v=Y9d72n2fX6g) \- Duration: 10:16.
(19) = [Pink Floyd - Another Brick in the Wall (FULL SONG!!!)](/watch?v=zqKqbSPcr5s) \- Duration: 12:06.
(20) = [GDA - pink floyd another brick wall LIVE](/watch?v=96WWJg3IU8c) \- Duration: 5:59.
Enter playlist number : 1 Video codec omx-h264 width 480 height 360 profile 578 fps 29.970030 Audio codec aac channels 2 samplerate 44100 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 V:PortSettingsChanged: 480x360@29.97 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0 Stopped at: 00:01:14 have a nice day ;) Enter playlist number :
|
|
|
Post by vovchik on Jan 20, 2019 0:05:21 GMT 1
Dear Alex,
Thanks. Downloaded and unpacked and fixed permissions, but omxplayer_yt cannot find libgumbo.so.1, which is not in my repo. Any suggestions?
With kind regards, vovchik
|
|
|
Post by alexfish on Jan 20, 2019 3:42:03 GMT 1
Hi Vovchik and All install gumbo parser from github.com/google/gumbo-parserif this fails can post the version that is used: I can say this as in the final version of the tool-kit 'NglWeb-kit' as yet not released will as in frozen = forked into the ngl-toolkit: could say more. yet all will be amazed at this. bit. hopefully PS this cli does not take into account SCAN-COORDS . as in previous demos . that bit took some working out. Hence the usual "Scale Factor" is now in place in the toolkit; BR Alex
|
|
|
Post by alexfish on Jan 20, 2019 4:13:28 GMT 1
Hi All and Microsoft(TM) users if this works on linux then try this youtube-dl Added RPI beats any system Per what Linux RPI stands for added this in view of latest posts by "BigBass"= Joe GPI pinsBR Alex
|
|
|
Post by vovchik on Jan 20, 2019 10:32:43 GMT 1
Dear Alex,
Got it working with ./autogen.sh, ./configure --prefix=/usr, make, sudo make install. Nice...and thanks.
With kind regards, vovchik
|
|
|
Post by alexfish on Jan 20, 2019 13:16:35 GMT 1
Hi Vovchik
thanks for the install tips
@ All
the html2text is http ready: and is not RPI specific so can be used on any system that has python
example from the terminal
cd to the dir / folder
enter this command
./html2text http://www.basic-converter.org/
or to view this thread/posts/page
./html2text http://basic-converter.proboards.com/thread/902/raspberry-pi3?page=23&scrollTo=11822
Have Fun + BR Alex
|
|
|
Post by alexfish on Jan 22, 2019 22:42:22 GMT 1
Hi All
one final bit in the web kit CSS :
this has taken some time to crack in terms of understanding what is goes on and how to put bits into practice
I am a stage of combining two indexed buffers , one the html and html tags
this is a sample of what the indexes are, hard to explain , so read the indexes like [2432;3233]
and where they match also have a look at bacon.org with the browser
BR Alex
the bits
html buffer =============================
[2389;2430]<section id="home" name="home"> [2430;2432] [2432;3233]<div id="headerwrap"> [2453;2459] [2459;3204]<div class="container"> [2482;2489] [2489;3192]<div class="row centered"> [2515;2523] [2523;2613]<div class="col-lg-12"> [2546;2552] [2552;2589]<h3> [2556;2584]BaCon - BASIC to C converter [2589;2595] [2595;2599]<br> [2599;2607] [2613;2628] [2628;2830]<div class="col-2"> [2647;2656] [2656;2678]<h5> [2660;2673]Easy to learn [2678;2687] [2687;2736]<p> [2690;2732]BaCon syntax is based on old-school BASIC. [2736;2745] [2745;2816]<img class="hidden-xs hidden-sm hidden-md" src="assets/img/arrow1.png"> [2816;2824] [2830;2838] [2838;2956]<div class="col-8"> [2857;2866] [2866;2929]<img class="img-responsive" src="assets/img/app-bg.png" alt=""> [2929;2938] [2938;2942]<br> [2942;2950] [2956;2964] [2964;3179]<div class="col-2"> [2983;2992] [2992;2996]<br> [2996;3005] [3005;3076]<img class="hidden-xs hidden-sm hidden-md" src="assets/img/arrow2.png"> [3076;3085] [3085;3112]<h5> [3089;3107]Fast and powerfull [3112;3121] [3121;3165]<p> [3124;3161]You can use the power and speed of C. [3165;3173] [3179;3186]
html css buffer =================================
div@[2432;3233] background-color& #34495e padding-top& 60px
div@[2459;3204]
div@[2489;3192]
div@[2523;2613]
h3@[2552;2589] color& white font-family& "Raleway" font-size& 30px font-weight& 300
br@[2595;2599]
div@[2628;2830]
h5@[2656;2678] color& white font-family& "Raleway" font-weight& 700 text-align& left
p@[2687;2736] color& white line-height& 28px margin-bottom& 25px text-align& left
img@[2745;2816]
div@[2838;2956]
img@[2866;2929]
br@[2938;2942]
div@[2964;3179]
br@[2992;2996]
img@[3005;3076]
h5@[3085;3112] color& white font-family& "Raleway" font-weight& 700 text-align& left
p@[3121;3165] color& white line-height& 28px margin-bottom& 25px text-align& left
====================================== ## here have a div container with background-color div@[2432;3233] background-color& #34495e padding-top& 60px
[2432;3233]<div id="headerwrap"> [2453;2459]
## h3 pos 2556 color white h3@[2552;2589] color& white font-family& "Raleway" font-size& 30px font-weight& 300
[2552;2589]<h3> [2556;2584]BaCon - BASIC to C converter ## font = Raleway & text is white [2589;2595]
=======================================
|
|
|
Post by alexfish on Jan 24, 2019 21:23:08 GMT 1
Hi All some time in the making I came to one conclusion Re html parser with css : > by the way Chromium can't spell css. In short have written a home brew Node & css reader : I have bacon html index file striped of external css the parser reads the moded bacon main.css file and parses the bits then parse the html file and if a match is found the inject the code in the html Concept wise , and from what I see here now have a firm base for the nglweb-kit Br Alex a Picky of work in progress Attachments:
|
|
|
Post by alexfish on Feb 9, 2019 21:13:25 GMT 1
Hi All RE the Ngltk <toolkit> as yet not seen but closing in and a bit of the why not Ngltk has now gone further than original intended :: one of the bits is of :file browser and how could it actually work , much like the desktop default file browser : use web html techno in short I will side step to the CLI command tree and implement it using chromium-browser then possibly understand what is been done in the toolkit when the browser fires up click away at image file mp4 files and so the get a picture of what is now inside the toolkit and how some of it works:: fire up the terminal in my case need the home dir but you may get a different one depending on the user pi@raspberrypi:~ $ pwd /home/pi the the code to execute tree -F -L 2 -H /home/pi > tree.html now fire up chromium-browser chromium-browser tree.html Have fun + BR Alex and a picky of playing a video from the Dir Tree Attachments:
|
|
|
Post by alexfish on Feb 18, 2019 19:47:03 GMT 1
Hi all Now on last bits of the browser + the compositor for the VgImage and thus render to browser now have means of implementing CSS & extracting font info and colors for the browser hence rendering is done with cairo this compositor of the final bits in the chain of the toolkit an partly one of the reasons for the delay, tying up the two ends. opengl rendering direct with cairo is hard to do and more so with OpenVG Image rendering if get the bits wrong the buffer will bust; if that happens one of two things will happen with this toolkit = the desktop or gui freezes or segfaults , if freeze then switch off, had many of them at this stage; but now resolved; flip CAIRO in memory so posting a link of how it can be done ; HEREBR Alex
|
|
|
Post by alexfish on Feb 19, 2019 2:27:07 GMT 1
In all cases RPI got it Right and the rest The as in the 'Aged Society' as to the 'younger ' do not ever be deceived what a Pixel is and what it is 'a transistor 'is on or it is off' old day's black or white ,, now there is Color...' Three + alpha when rendering cairo image need to apply the matrix as above to enable correct alpha one needs to destroy the newly create surface when the matrix is transformed one has to start writing at the bottom of the page and decrements the move y EG this is in c++ here getting this text written in cairo testdata= Cairo_Get_Text("Welcome to BaCon\n Greatings from\n All At...\nBR Alex",5,20, "staypuft",30,&max);
at the sub routine have something like cairo_matrix_t font_reflection_matrix;
cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 1000, ty); cairo_t *cr = cairo_create(surface); cairo_surface_destroy(surface); // ty is the line count * font size + line gap of 3 the add extra line to get bottom of buffer using stringstream ty=ty-fontsi+3; stringstream ss(txt); while(getline(ss,to,'\n')) {
cairo_move_to (cr, 0, ty); cairo_show_text (cr, Cstring(to)); ty-=fontsi+3;
}
unsigned char * data= cairo_image_surface_get_data (surface); // added this line to write an png cairo_surface_write_to_png(cairo_get_target(cr), "test.png"); cairo_surface_destroy (surface); return data;
png below What say you yet in the VG image is reads OK BR Alex PS Finally VG Setpixels will not render ALPHA Use DRAW IMAGE EG:: vgDrawImage(testimg)
Attachments:
|
|
|
Post by alexfish on Feb 22, 2019 2:44:03 GMT 1
Hi all in a sort of final analogy:: The RPI and how the 'Linux kernel's sits', as of now and beyond possible 2 years plus Re: Proc device. ' "the possible if it happens" In first instance we still have in use SYSFS and in future IF the tree goes to 'Proc' device Tree, the same applies as regards the Device, that if you 'researched the bits' In short ' here is the statement DO NOT ABUSE SYSFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. PLEASE READ THE DOCUMENT AT Documentation/driver-api/gpio/drivers-on-gpio.rst TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. REALLY.
RPI has drivers that = 'Display & GPIO' + they are 'free' and 'Open Sourse' if in doubt read the bits in the '/opt/vc' and the actual bits as Regards Linux and the gpio HEREAny other definitions can be placed HEREor simply read www.raspberrypi.org/about/BR Alex
|
|
|
Post by alexfish on Feb 23, 2019 20:47:54 GMT 1
Hi all Re browser techno and the bits I looking at Re a Text Mode browser with techo to look like say gtk web kit; think most here hate what has been done or allowed in Re HTML , so what can go wrong Well as it happens I visited RPI site the blogs page is behaving Very Very Badly Try this , but do it while there is no connection else-where , so copy this , and get out of here , and come back later this is for RPI users , once you notice something is wrong close down the browser , else the desktop will freeze esp in chromium the site www.raspberrypi.org/blog/BR Alex
|
|
|
Post by alexfish on Feb 25, 2019 16:21:14 GMT 1
Hi all
Looks like there is a problem with the html as in Unspecifed length , not sure if this is in the headers as yet;
as a work around for now can use wget and then point the browser to the saved file
example
wget https://www.raspberrypi.org/blog/
--2019-02-25 14:58:39-- https://www.raspberrypi.org/blog/
Resolving www.raspberrypi.org (www.raspberrypi.org)... 104.28.10.23, 104.28.11.23, 2606:4700:30::681c:b17, ... Connecting to www.raspberrypi.org (www.raspberrypi.org)|104.28.10.23|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘index.html.1’
index.html.1 [ <=> ] 115.27K 743KB/s in 0.2s
2019-02-25 14:58:42 (743 KB/s) - ‘index.html.1’ saved [118033]
Looked at the file and at the footer and below it there ares these
</footer>
<script type="text/javascript"> // Constants, but we use `var` since `const` support is only in >=IE11 var RESELLER_API_URL = 'https://api.resellers.raspberrypi.org'; var SENTRY_PUBLIC_DSN = 'https://d228a2075e31456ba68cf45963ecfec6@sentry.io/160628'; </script>
<script type="text/javscript"> ga = __gaTracker; </script>
<script type="text/javascript" id="cookiebanner" src="https://cdnjs.cloudflare.com/ajax/libs/cookie-banner/1.2.2/cookiebanner.min.js" data-bg="#e6e2dd" data-fg="#404040" data-link="#404040" data-moreinfo="https://www.raspberrypi.org/cookies" data-accept-on-scroll="true" data-message="We use cookies to ensure that we give you the best experience on our website. By continuing to visit this site you agree to our use of cookies." data-moreinfo-decoration="underline" integrity="sha384-ZtuZyMr5oH1P/r7ZKXXHFBkIZoNaDZ+aHMHxGUZWP0Zfwk6TgyUlgcR5QIx1kj1U" crossorigin="anonymous"></script>
<script type='text/javascript' src='https://www.raspberrypi.org/app/plugins/wp-gallery-custom-links/wp-gallery-custom-links.js?ver=1.1'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/sentry/raven.min.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/sentry/sentry.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/cookies-resolver.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/modal/modaal.min.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/modal/display-modal.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/geo/geoip2.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/geo/location-resolver.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/modal/product-modal.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/product.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/helpers.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/tracking.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/app/themes/mind-control/js/vimeo.ga.min.js?ver=1549547963'></script> <script type='text/javascript' src='https://www.raspberrypi.org/wp/wp-includes/js/wp-embed.min.js?ver=4.9.9'></script> <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"58581d3af9","applicationID":"49756124","transactionName":"bwZRZ0cCX0FUVhVYWVZMZkFcTFhcUVAZH0ZQEw==","queueTime":0,"applicationTime":13,"atts":"Q0FSEQ8YTE8=","errorBeacon":"bam.nr-data.net","agent":""}</script></body> </html>
<!-- Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/
Page Caching using memcached Minified using memcached
Served from: www.raspberrypi.org @ 2019-02-25 14:50:09 by W3 Total Cache -->
BR Alex
ADDED
did an update of aria2c
this one did not blink on this site
|
|