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 Mon 22 Dec 2014, 06:41
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Mplayer play video from the command prompt.
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Wed 31 Aug 2011, 09:46    Post_subject:  Mplayer play video from the command prompt.  

I was reading the other day that it is possible to play video with mplayer at the command prompt with out being in the graphical desktop (ctrl + alt + backspace) initial test proved this does indeed work on puppy however the video window was not full screen and the usual control + f full screen command doesn't seem to work - so here is a little script i made to play videos full screen, you may need to alter x and y for your own screen resolution.

Name the script clmplayer and put it in PATH /usr/bin /root/my-applications/bin etc.
Code:
#!/bin/bash
tput civis
mplayer -vo fbdev2 -fs -quiet -zoom -x 1280 -y 800 "$@"
tput cnorm && exit


to use type at the command: clmplayer /path/to/media/file.avi

i like to use fbclone for quick file navigation but you can use the Tab key for auto completion of your file name.
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Mon 05 Sep 2011, 13:50    Post_subject:  

I recently found if I use ffplay -fs (-fs is full screen) it will bring the screen to the front.

I also made a script for grabbing multimedia from cache and /tmp

Would you like me to post them here? If not I can do it somewhere else?

No offense either way.

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Mon 05 Sep 2011, 14:40    Post_subject:  

Hi Bruce. Sure no problems. Cool
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Mon 05 Sep 2011, 19:23    Post_subject:  

Can ffplay work when you're not in X?
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Tue 06 Sep 2011, 22:38    Post_subject:  

Swell Stu90, I don't want to interfere with another's howto, but this seems as if it might be a helpful addition. This script is for people of a modest or intermediate scripting ability. I won't explain what it does, but if anyone has specific questions, I'll answer them.

Please consider the script as a template for use in locating media files in the cache directory. A template because once understood there are many, many things the user can do to customize and improve it.

Code:
#!/bin/bash

cachedir="/initrd/pup_rw/root/spot/.mozilla/firefox/iof95jww.abuse/Cache"
savedir="/initrd/pup_rw/root/spot/.mozilla/firefox/media"


cd $cachedir
for i in * ; do

    filesize=`stat -c%s $i`
    [ $filesize -lt 300000 ] && continue

    type=`file ${cachedir}/$i`
    echo $type | grep QuickTime &>/dev/null
    if [ "$?" = "0" ] ; then
        ffplay -autoexit -fs ${cachedir}/$i
        mv ${cachedir}/$i ${savedir}/${i}.mov
        continue
    fi


    echo $type | grep Macromedia &>/dev/null
    if [ "$?" = "0" ] ; then
        ffplay -autoexit -fs ${cachedir}/$i
        mv ${cachedir}/$i ${savedir}/${i}.flv
        continue
    fi

    echo $type | grep Microsoft &>/dev/null
    if [ "$?" = "0" ] ; then
        ffplay -autoexit -fs ${cachedir}/$i
        mv ${cachedir}/$i ${savedir}/${i}.wmv
        continue
        fi
done


~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Wed 07 Sep 2011, 00:30    Post_subject:  

Hints and tips

1) Sometimes I don't know where the media files are. They may not be in Cache or /tmp.

We have some work to do.

2) Often media files have a header instruction to delete. Typically, they delete when you do something like change to view another media or page.

If you watch, you will notice most media players have a download bar. Ideally, it moves faster than the play bar. When the download bar is finished, the media is somewhere on your computer fully downloaded. If you stop the playback after the download is complete, the media is likely not deleted.

3) The script I posted above can also be expanded to search the /tmp directory because a lot of media is downloaded there.

4) I have found media plays better with our media players such as mplayer or ffplay than with the onsite players and the local flashplugins. Our local players use less resources and the aspect ratios will be true. Other benefits such as easy navigation and replay.

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Wed 07 Sep 2011, 00:37    Post_subject:  

Stu90's script used tput, but I don't think all Puppy's have tput. In the past I found it was a part of the dev kit.

I've attached tput and a text formatted tput man page for anyone who wants it.

Code:
Archive:  tputpkg.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    9752  Defl:N     4830  51% 2010-03-07 03:33 7fd562b6  tput
    9648  Defl:N     3655  62% 2008-06-26 17:30 1f1ee461  tput.txt
--------          -------  ---                            -------
   19400             8485  56%                            2 files
tputpkg.zip
Description 
zip

 Download 
Filename  tputpkg.zip 
Filesize  8.58 KB 
Downloaded  139 Time(s) 

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
Bruce B


Joined: 18 May 2005
Posts: 11131
Location: The Peoples Republic of California

PostPosted: Wed 07 Sep 2011, 01:45    Post_subject:  

Code:
#!/bin/bash

# This script will give meaningful extensions
# to your non flv, mov and wmv files in Cache.
# Run it after the script used to locate the media files
# or append it to that script.


CacheDir="user must fill in"
[ ! -d $CacheDir ] && echo "edit $0" && exit
cd $CacheDir


rm _CACHE_???_

for i in * ; do
   file $i | grep gzip >/dev/null
   if [ "$?" = "0" ] ; then
      mv $i $i.gz
      gzip -d $i.gz
   fi
done


for i in * ; do
   ext=`file $i | awk '{print tolower($2)}'`
   mv $i $i.$ext
done


Happy to answer questions

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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