Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Dec 2014, 05:38
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO 2012
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 25 of 27 [398 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27 Next
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Sun 02 Jun 2013, 14:05    Post subject:  

starhawk wrote:
@goingnuts -- go for it! Anything that can substitute for Flash Player (more or less) and work on the CPi meets my needs Wink

VLC with no gui is only about 2.5mb, and can play youtube stuff, if it's compiled with lua support (lua doesnt need to be installed once its compiled as far as i can tell..) ... and old VLC, like 0.8.6, compiled with lua and without qt gui might be a solution too... (and there's vlc-gtk as a frontend for it too)...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
starhawk

Joined: 22 Nov 2010
Posts: 3208
Location: Everybody knows this is nowhere...

PostPosted: Sun 02 Jun 2013, 14:28    Post subject:  

Anyone know how that'll perform on a P2 300MHz with 128mb RAM and 384mb swap?
_________________

Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 784

PostPosted: Tue 04 Jun 2013, 12:05    Post subject:  

I could not get VLC running, nor gnash and although flasm decompress the swf ffplay/mplayer wont play...

Some scripts out there for mplayer but that seems to be based on youtube serving flv-format in the past.

I followed technosaurus idea here and got a working draft based on ffplay and a gtkdialog1 script. Video is working (some gives "Protocol not supported" though...) but I cant get sound out of the thing. Guess its a ffplay compile thing - maybe.
I do not use youtube enough to spend days fine tunning the thing so just drop the draft here for better minds or times...

Code:
#!/bin/ash
#pmtube-0.1.
#demo script for gtkdialog1 sort of poor mans youtube viewer.
#June2013 goingnuts
#draft!

[[ -x ../../src/gtkdialog1 ]] && PATH=../../src:$PATH

rm -f tablelist test.html test2.html

#ash function file
echo '

get_me () {
   rm -f test.html
   if [ ! "${ENTRY}" = "" ]; then
      #need formating the query
      query=$(echo "${ENTRY}" | sed "s/ /+/g")
      busybox wget -O test.html -U firefox "http://m.youtube.com/results?gl=US&client=mv-google&hl=en&q="${query}"&submit=Search"
   else
      return
   fi
   #construct list of findings
   grep "<a accesskey=" test.html | grep -v "#" | cut -d " " -f3- | tr -d ">" > tablelist
}

list_me () {
   if [ -f tablelist ]; then
      cat tablelist | cut -d " " -f3-
   fi   
}

play_me () {
   #check status - are we playing?
   if [ ! "$(pgrep ffplay)" = "" ]; then
      kill -CONT $(cat mypid)
      return   
   else
      rm -f mypid
      #do not play empty list...
      if [ ! "${LIST}" = "" ]; then   
         #first find link to the selection
         link=$(grep "${LIST}" tablelist | cut -d " " -f1 | cut -d ";" -f4 | tr -d "\"")

         #get the link
         busybox wget -O test2.html -U firefox "http://m.youtube.com/watch?gl=US&client=mv-google&hl=en&"${link}""
         wait

         play_url=$(grep -m1 "rtsp" test2.html | cut -d "\"" -f2)
      
         #now play it
         ./ffplay -x 200 -y 200 -autoexit -window_title "${LIST}" "${play_url}" &
         echo $! > mypid
      fi
   fi
}

pause_me () {
if [ -f mypid ]; then
      speakPID=$(cat mypid)
   kill -STOP $speakPID
fi
}   

stop_me () {
if [ -f mypid ]; then
    ffplayPID=$(cat mypid)
   kill -CONT $ffplayPID
   kill $ffplayPID
   killall ffplay
   rm -f mypid
fi
}   


' > /tmp/pmtube_ash


export MAIN_DIALOG='
<wtitle>pmtube 0.1</wtitle>
<vbox>
   <hbox>
      <entry>
         <variable>ENTRY</variable>
      </entry>
      <button>
         <label>Search</label>
         <action>get_me</action>
         <action clear>LIST</action>
         <action refresh>LIST</action>
      </button>
      <button>
         <label>Play selected</label>
         <action>play_me</action>
      </button>
      <button>
         <label>Pause</label>
         <tooltip>Pause</tooltip>
         <action>pause_me</action>
      </button>
      <button>
         <label>Stop</label>   
         <action>stop_me</action>
      </button>
      <button>
         <label>Quit</label>
         <action>exit</action>
      </button>
   </hbox>
   <hbox>
      <list>
         <input>list_me</input>
         <variable>LIST</variable>
      </list>
   </hbox>
</vbox>
'

gtkdialog1 -d --center --wmclass pmtube --program=MAIN_DIALOG -i /tmp/pmtube_ash

rm -f /tmp/pmtube_ash  tablelist test.html test2.html mypid
killall ffplay

exit
snap0005.png
 Description   playing...
 Filesize   141.8 KB
 Viewed   938 Time(s)

snap0005.png

Back to top
View user's profile Send private message Visit poster's website 
Ibidem

Joined: 25 May 2010
Posts: 527
Location: State of Jefferson

PostPosted: Thu 06 Jun 2013, 17:42    Post subject:  

goingnuts wrote:
I could not get VLC running, nor gnash and although flasm decompress the swf ffplay/mplayer wont play...

Some scripts out there for mplayer but that seems to be based on youtube serving flv-format in the past.

I followed technosaurus idea here and got a working draft based on ffplay and a gtkdialog1 script. Video is working (some gives "Protocol not supported" though...) but I cant get sound out of the thing. Guess its a ffplay compile thing - maybe.

Re: "Protocol not supported": try youtube-dl, make sure you have librtmp/rtmpdump compiled with an SSL library...

Re: no sound:
strace ffplay <somefile.wav> 2>&1 >/dev/null |grep /dev
If it plays, try with an mp3/mp4 file you know has audio.

Note the order of redirection in the example above! Reverse it, and it's silent. But this way, stdout is silenced and stderr becomes stdout.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 784

PostPosted: Fri 07 Jun 2013, 10:22    Post subject:  

Ibidem: thx...
I did look at "youtube-dl" but seems to be python-based and I could not get it running in P412.
My ffplay plays wav & mp3 files ok from disk...
Output of the suggested command:
Code:
strace ./ffplay test.wav 2>&1 >/dev/null |grep /dev
stat("/dev/sound", 0xbfb1e4e0)          = -1 ENOENT (No such file or directory)
open("/dev/dsp", O_WRONLY|O_NONBLOCK)   = 7
Maybe another app could take care of the sound - although this adds to the complexity - any youtube audio-only players out there?
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Sat 22 Jun 2013, 20:27    Post subject:  

I did a new implementation of the startup commands using only jwm

Code:

<StartupCommand>
for x in /root/Startup/*;do $x & done
</StartupCommand>


Also a wait4x program that uses xcb vs x11

Code:

#include <stdlib.h>
#include <xcb/xcb.h>

int die(void){exit(1);}

int main(void){
int i=1000;
while((int)xcb_connect(NULL,NULL)<0 && i-- || die())
    usleep(10000);
return 0;
}

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Sun 23 Jun 2013, 03:49    Post subject:  

goingnuts wrote:
Ibidem: thx...
I did look at "youtube-dl" but seems to be python-based and I could not get it running in P412.
My ffplay plays wav & mp3 files ok from disk...
Output of the suggested command:
Code:
strace ./ffplay test.wav 2>&1 >/dev/null |grep /dev
stat("/dev/sound", 0xbfb1e4e0)          = -1 ENOENT (No such file or directory)
open("/dev/dsp", O_WRONLY|O_NONBLOCK)   = 7
Maybe another app could take care of the sound - although this adds to the complexity - any youtube audio-only players out there?

Older Puppy kernels have a static /dev/snd/ directory .
Just looked into it by loopmounting a pup-430.sfs but /dev/sound and /dev/dsp are not in /dev/snd/ .
/dev/dsp is in /dev/ .
Probably make a symlink /dev/sound/ -> /dev/snd/ .

Actual Puppy rc.sysinit deletes /dev/snd folder and uses the nodes dynamically created by the sound drivers (+udev) .
Back to top
View user's profile Send private message Visit poster's website 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Mon 24 Jun 2013, 11:27    Post subject:  

Karl Godt wrote:

Just looked into it by loopmounting a pup-430.sfs but /dev/sound and /dev/dsp are not in /dev/snd/ .
/dev/dsp is in /dev/ .
Probably make a symlink /dev/sound/ -> /dev/snd/ .

/dev/snd/* are ALSA standard devices whereas /dev/sound/[dsp|mixer|etc..] (or /dev/[dsp|mixer|etc..]) are emulated OSS devices.
We need to load additional modules for OSS emulation (snd-pcm-oss, snd-mixer-oss,snd-seq-oss).

_________________
SUUM CUIQUE.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2742
Location: New Zealand

PostPosted: Tue 25 Jun 2013, 15:22    Post subject:  

I have been wanting to try PeasyMP3 on pUPnGO2012 (just because I like tinkering and I like the "Carousel" drag n' drop randomiser...) and if I try to run it in a terminal I get an error message something like "-f" is an illegal operation.

If I remove the several instances of "-f" parameter from the programme (eg in the line: "export -f PAUSE") I do not get any further errors, but the programme obviously doesn't do anything productive either.

My uneducated guess is this is an issue with gtk version. Can anyone suggest a way around it? (or is this just a stupid thing to try...)

PeasyMP3 : http://murga-linux.com/puppy/viewtopic.php?t=86654
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9356
Location: Stratford, Ontario

PostPosted: Tue 25 Jun 2013, 17:10    Post subject:  

I believe that "export -f" requires the bash shell. Try changing the top line from "/bin/sh" to "/bin/bash".
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Wed 26 Jun 2013, 00:11    Post subject:  

Gtkdialog can source functions using the -i flag. Rather than using bash and exporting functions, I would recomend separating the functions to a file.

... I think it is -i anyways

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2742
Location: New Zealand

PostPosted: Wed 26 Jun 2013, 03:36    Post subject:  

rcrsn51 wrote:
Try changing the top line from "/bin/sh" to "/bin/bash".
When I do this I get a "peasymp3 not found" message.
(I tried using the "./peasymp3" syntax as well as just "peasymp3").

Maybe bash is an add-on for pupngo2012? - I thought I read that once but can't now find the comment.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 784

PostPosted: Wed 26 Jun 2013, 10:37    Post subject:  

greengeek: There is no bash in pupngo. I posted a static bash version in the old pupngo thread. But that wont get the PeasyMP3 running in pupngo alone. The gtkdialog version is GTK1.2 and over a year old so it wont accept much newer gtkdialog syntax. A rewrite is only way out...

technosaurus: The new implementation of the startup commands using only jwm if quite nice!
For GTK functions I fully agree on the sourcing of functions principle - and keep the gtk-GUI stuff as simple as possible using the sourced functions.

Karl Godt & PANZERKOPF: Thanks for input on the sound issue!
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Wed 26 Jun 2013, 13:31    Post subject:  

Code:
while ([ ! -S /tmp/.X11-unix/X0 ]) do sleep .1;done
jwm -display :0

A shell only version of wait4x that works for the common case to minimize the time waiting for the desktop.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Sat 27 Jul 2013, 15:25    Post subject:  

In case anyone is interested, I wrote my own compiler independent partial c library for compiling smaller/faster _static_ apps:
Technically its not a "library" as it is built as a single header file called libc.h and has very minimal overhead (~500b)

It is here:
http://www.murga-linux.com/puppy/viewtopic.php?p=715660#715660

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 25 of 27 [398 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1199s ][ Queries: 12 (0.0154s) ][ GZIP on ]