Login · Register
September 05 2010 10:13:48

Interesting Websites

Compiling flvstreamer for use on Unslung Linux


Testing flvstreamer

Now that you have compiled flvstreamer, you will want to test it. To test it using get_iplayer you will need to download and configure it.

First, go to the directory where you wish to download get_iplayer to. In my case, this will be /root/get_iplayer. As the get_iplayer directory does not exist, I shall create it.

Code
cd /root

mkdir get_iplayer

cd get_iplayer




Now we need to download get_iplayer and make it executable. We will also run it once to allow it to create the directories & files it needs to operate.

Code
wget http://linuxcentre.net/get_iplayer/get_iplayer

chmod 755 get_iplayer

./get_iplayer




Next, we need to tell get_iplayer where it can find the flvstreamer binary we just compiled. In my case, this was /root/flvstreamer/flvstreamer_arm.

Code
./get_iplayer --prefs-add --flvstreamer=/root/flvstreamer/flvstreamer_arm




Provided you entered the command correctly, you should get an output similar to:

INFO: Options file /root/.get_iplayer/options updated


At this stage, it is also useful to set the default output directory. If you want the videos you download to be accessible from the Samba share, you need to create an output folder in your /public directory. I shall call this folder "iPlayerDownloads".

Code
cd /public

mkdir iPlayerDownloads

chmod 0777 iPlayerDownloads




Once you have created your output folder, you want to return to where get_iplayer is located and set your output folder.

Code
cd /root/get_iplayer

./get_iplayer --prefs-add --output='/public/iPlayerDownloads'




Now, there is one more thing left to do before we attempt and download a programme. We want to make sure that users are able to access the downloaded files. If you do not do this you will have to change the permissions of each file as you download it.

Code
./get_iplayer --prefs-add --command='chmod 0777 '




Now we are ready to try and download a programme. Say you wanted to download a programme called "Click" (yes, this does exist - it is a programme about the latest technology) and you wanted to download it in FLV format. The best way to start is to search for all programmes which contain the word "Click" in their titles.

Code
./get_iplayer \"click\"




This will return something similar to the following:

# ./get_iplayer "click"

get_iplayer v2.34, Copyright (C) 2009 Phil Lewis

This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.

This is free software, and you are welcome to redistribute it under certain

conditions; use --conditions for details.



Matches:

146: Click - 12/09/2009, BBC News 24, Factual,News,Science & Nature,TV, default,



INFO: 1 Matching Programmes



You can now download the programme using the index value shown before the title above. I know that this programme is available in flashvhigh format (this can be seen using the --info parameter), I can force the download to be in that format. Entering the following it will download the programme.

Code
./get_iplayer --get 146 --vmode=flashvhigh




The result of this should be:

get_iplayer v2.34, Copyright (C) 2009 Phil Lewis

This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.

This is free software, and you are welcome to redistribute it under certain

conditions; use --conditions for details.



Matches:

146: Click - 12/09/2009, BBC News 24, Factual,News,Science & Nature,TV, default,



INFO: 1 Matching Programmes

INFO: Checking existence of default version

INFO: flashvhigh1,flashvhigh2 modes will be tried for version default

INFO: Trying flashvhigh1 mode to record tv: Click - 12/09/2009



WARNING: ffmpeg does not exist - not converting flv file

INFO: File name prefix = Click_-_12_09_2009_b00mvl50_default

FLVStreamer v1.8k

(c) 2009 Andrej Stepanchuk, The Flvstreamer Team, license: GPL

Connecting ...

Starting download at: 0.000 kB

Metadata:

duration 1426.43

moovposition 32

width 832

height 468

videocodecid avc1

audiocodecid mp4a

avcprofile 77

avclevel 30

aacaot 2

videoframerate 0

audiosamplerate 48000

audiochannels 2

trackinfo:

length 35660000

timescale 25000

language eng

sampledescription:

sampletype avc1

length 68468736

timescale 48000

language eng

sampledescription:

sampletype mp4a

5527.372 kB / 52.60 sec (2.9%)


If you leave this to complete, the file should appear in your selected download directory. For full documentation for get_iplayer, please visit the get_iplayer website.



Thank you for using my tutorial. Feel free to leave any comments.
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.