LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-25-2012, 04:41 AM   #16
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322

Omxplayer does the business all right. I had a struggle for the audio. The winning line was
omxplayer -o hdmi <file>

It came up full size, full speed, and seemed to have capacity to spare. omxplayer isn't as talkative as mplayer, but p pauses and q quits. Omxplayer is actually installed in the Debian Wheezy install for the pi. So it can be done.

EDIT: the python script crashes on line 3 because it can't find the gtk module.

Last edited by business_kid; 12-25-2012 at 07:03 AM.
 
Old 12-25-2012, 09:20 AM   #17
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Ok, that's good info, thanks.
http://elinux.org/Omxplayer
http://www.raspberrypi.org/phpBB3/vi...p?f=22&t=21435

If Omxplayer won't stream
Then make a named pipe (mkfifo) and stream to it, out of it. Use omxplayer instead. Assuming that omxplayer will play from a pipe.
Code:
mkfifo abc.fifo
mplayer http://path/to/file -dumpstream -dumpfile abc.fifo
cat abc.fifo | omxplayer -
Or use the standard output/input like a pipe.
Code:
youtube-dl http://blah/blah - | omxplayer -
Or use youtube-dl to get it, then play it with omxplayer.

This thread shows
Just how many ways that you can skin a cat with a Linux box, or board even,

Just how versatile Linux and open source software is,

Just how learning some basic Linux shell, command line, and basic shell scripting can make you functional across different platforms and devices,

If no software exists that does exactly what you want, then easily make your own with what is extant.
 
Old 12-26-2012, 04:45 AM   #18
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Omxplayer refuses standard input, pipes, etc, and only wants to see files. But as you pointed out, there's more that 1 way to do things if you are a little familiar with the Unix command line. I first tried this:

Quote:
mkfifo nutty.fifo
youtube-dl URL > nutty.fifo & sleep 5 && omxplayer -o hdmi nutty.fifo
But that wasn't too good, because all the standard youtube-dl output went into the fifo as well. I don't really know what happened, but I saw nothing. So I opened a second terminal. In one I ran
Quote:
youtube-dl URL -o nutty.fifo
and in the other I put in
Quote:
omxplayer -o hdmi nutty.fifo
and simply waited for the youtube download to get under way, switched focus to the second terminal and hit return.

In it's right place, the fifo is such a powerful tool. The pipsqueak was fast enough to handle the download and the playback simultaneously, and for sites amenable to youtube-dl, that certainly seems to be the way to go.

A much higher hurdle is the nearby English channels. I'll look into that rtsp and rtmp stuff to see if I can make any progress there. How am I supposed to run the .php files?
 
Old 12-26-2012, 08:55 AM   #19
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Quote:
youtube-dl URL > nutty.fifo & sleep 5 && omxplayer -o hdmi nutty.fifo
That won't work, that puts the shell output into the pipe.
Code:
mkfifo nutty.fifo && \
omxplayer -o hdmi nutty.fifo && \
youtube-dl -f 17 http://www.youtube.com/watch?v=D1u3fjJBd0w -o nutty.fifo
Just like you did.

This script will probably work
Code:
#!/bin/sh

echo "Enter URL"
while read URL
do
omxplayer -o hdmi $(youtube-dl -g --cookies /tmp/cookie.txt "$URL")
done
Save it as video.sh, make it executable, launch it, paste in the URl when asked.
Quote:
How am I supposed to run the .php files?
I don't know what you mean by that. rtmpdump is a little command line app. (A binary) rtmp://host[ort]/playpath
Code:
Usage: omxplayer [OPTIONS] [FILE]
Options :
         -h / --help                    print this help
         -n / --aidx  index             audio stream index    : e.g. 1
         -o / --adev  device            audio out device      : e.g. hdmi/local
         -i / --info                    dump stream format and exit
         -s / --stats                   pts and buffer stats
         -p / --passthrough             audio passthrough
         -d / --deinterlace             deinterlacing
         -w / --hw                      hw audio decoding
         -3 / --3d                      switch tv into 3d mode
         -y / --hdmiclocksync           adjust display refresh rate to match video
         -t / --sid index               show subtitle with index
         -r / --refresh                 adjust framerate/resolution to video
              --boost-on-downmix        boost volume when downmixing
              --font path               subtitle font
                                        (default: /usr/share/fonts/truetype/freefont/FreeSans.ttf)
              --font-size size          font size as thousandths of screen height
                                        (default: 55)
              --align left/center       subtitle alignment (default: left)

Key Bindings
z           Show Info
1           Increase Speed
2           Decrease Speed
j           Previous Audio stream
k           Next Audio stream
i           Previous Chapter
o           Next Chapter
n           Previous Subtitle stream
m           Next Subtitle stream
s           Toggle subtitles
q           Exit OMXPlayer
Space or p  Pause/Resume
-           Decrease Volume
+           Increase Volume
Left Arrow  Seek -30
Right Arrow Seek +30
Down Arrow  Seek -600
Up Arrow    Seek +600
 
Old 12-26-2012, 01:30 PM   #20
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
That bash script works all right. It's a bit disconcerting because you see no output for 10 seconds, before the video starts. so youtube is sorted.

I actually had the binaries of rtmpdump,compiled burt they were hidden in a directory I use to make slackware packages for installation. The intention was to add rtsp stuff there as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Researcher creates proof-of-concept malware that infects BIOS, network cards LXer Syndicated Linux News 0 07-30-2012 10:13 PM
Md5 spoof - Proof of concept with sample files! peter1234 General 10 09-25-2010 07:39 AM
New Cross-Platform Virus Proof of Concept win32sux Linux - Security 19 04-18-2006 11:24 PM
LXer: Virus proof of concept can infect both Windows and Linux systems LXer Syndicated Linux News 0 04-08-2006 04:21 PM
LDAP + Proof Of Concept damicatz Linux - Networking 5 11-27-2004 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration