Download Latest Version smthplayer_0.12_linux.tar.gz (27.1 kB)
Email in envelope

Get an email when there's a new version of SMTHPlayer

Home / 0.2
Name Modified Size InfoDownloads / Week
Parent folder
WINDOWS preconfigured (bins included) 2012-02-16
WINDOWS preconfigured 2012-02-16
LINUX preconfigured 2012-02-16
README 2012-02-16 5.8 kB
Totals: 4 Items   5.8 kB 0
-----------------------------------------
smthplayer 0.2 (rel: 16/02/2012)
Powered by Matteo Seclì <secli.matteo@gmail.com>
Released under GPLv2 licence or higher.

Using smth.php class and MkVid264.php (by mitm and k0wal5ky)

smthplayer is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

By using this program, you accept that I HAVE NO RESPONSIBILITY
for any use you make of it. Therefore, make sure you can play with a standalone player
the stream you'd like to watch.

Although this program is an evolution of old raibot.php 0.0.2a <http:acab.servebeer.com/php/src/>
by mitm, it has no more relationship with rai.tv. Its aim is to be a universal cross-platform smooth
streaming player, not a bot for rai.tv site. Here is what is changed:
    - New manifest parser for both ism/isml and csm manifests;
    - H.264 and AAC support, that is entirely by k0wal5ky. I have just "translated" his bash script to php;
    - WmaPro support (thanks again to k0wal5ky for his tip about WaveFormatEx);
    - Prompt for index bitrate if not given;
    - Prompt for clip index if not given;
    - Timestamp calculation from chunk "d" attributes;
    - No timestamps sync during buffer time, for faster buffering;
    - Initial delay option, for safe streaming beginning on some servers;
    - Automatic start of the player if set;
    - Playfile building (for manual start of the player).

I want also to say clearly that this program is a player, not a downloader! And it will NEVER be
a downloader. In fact, audio and video temporary files are always kept separated and never joined in a
audio/video cointainer. This is for legal reasons, so please DO NOT ask me to make a recording function.
-----------------------------------------


--------------------------
REQUIREMENTS
--------------------------
In order to launch smthplayer.php, you have to have installed on you computer PHP5.
	See: <http://php.net/downloads.php>

You need also FAAD2 for aac decoding.
	See: <http://www.audiocoding.com/>

The latest thing you need is mplayer.
	See: <http://www.mplayerhq.hu/>


---------------------------
CONFIGURATION
---------------------------
Configuration options depend on you operating sytem.
You have to configure some variables in smthplayer.php. The examples below are using default Linux configuration:

$mplayer = "mplayer";
	This parameter sets the mplayer path.
$vc1_codec = "ffvc1";
	This parameter sets the video codec for WMV/VC-1 elementary streams.
$h264_codec = "ffh264";
	This parameter sets the video codec for H.264 elementary streams.
$wmav2_codec = "ffwmav2";
	This parameter sets the audio codec for WMAv2 streams.
$wmapro_codec = "ffwmapro";
	This parameter sets the audio codec for WMAPRO streams. I suggest to try firstly ffwmapro codec, but you have
	to install a very recent mplayer version to get a working version of this codec. If you are an Ubuntu user,you could 
	try to install it from <https://launchpad.net/~motumedia/+archive/mplayer-daily>.
	If ffwmapro doesn't work properly, use "wma9dmo" codec. If you are on a 64-bit system, you need to follow this guide
	in order to use wma9dmo codec: <http://www.cyberbyte.ch/Linux/mplayer32biton64bit_win32codecs.htm>.
	Obviously, you need to set $mplayer to "mplayer32" after installing mplayer32 package.
$aac_codec = "faad";
	This parameter sets the audio codec for AAC streams.
$playfile = "PlayMe.sh";
	This parameter sets the file cointaining the command for playing your stream. I suggest to use a .sh file on Linux
	and a .bat file on Windows, as you can play your stream by simply double-clicking on the file.
	Note that when you use PlayMe.sh for the first time, you need to give it execution attributes. Then, you can
	simply not delete the file to avoid giving it permissions every time.

$automatic_play = "yes";
	If this parameter is set to "yes", you can avoid to use "playfile" to play your stream, because smthplayer will play it
	automatically. If you have troubles, simply delete "yes" and write anything else.
	If you are on Windows, you have to use bgrun.exe from <http://www.jukkis.net/bgrun/> to allow background start
	of mplayer.exe and prevent smthplayer.php waiting for mplayer.exe execution.
	For this reason, you have also to set $mplayer to "bgrun.exe mplayer.exe".

$buffer_time = "10";
	This parameter sets the buffer time after which playfile will be created. It depends on your system, but I don't recommend
	to use a value lower than "10".
$init_delay = "5";
	This parameter sets Nth timestamps to use as a starting timestamp. Because some servers don't make a "chunk cache",
	it could be possible that the time the program takes to start the chunk downloading makes the first parsed timestamp unaviable.
	To avoid that, the program also downloads again the manifest before starting download if you gave "ask" option.
$mplayer_options = "-slave -aspect 16:9 -mc 0 -autosync 30";
	This parameter sets mplayer extra options. I have noticed that sometimes "-slave" option makes mplayer looping first seconds
	of stream on Windows. If you have troubles, simply delete "-slave " option.

Now, you need also to configure another parameter in smth.php. Search for "$faad_bin":

$faad_bin = "faad";
	This parameter sets the faad encoder path.


------------------------
HOW TO USE IT
------------------------
In order to use the program, you have to launch it from the directory in which is stored.
Therefore, you have to open a terminal, navigate to the folder of the program, and launch it with:
	"php smthplayer.php" followed by program options.
For a options help, simply launch
	php smthplayer.php
Source: README, updated 2012-02-16