H.264 Decoder in Pure JavaScript

November 9, 2011 | Video | 0 Comments

This is a true testament to how powerful javascript has become.

http://mbebenita.github.com/Broadway/broadway.html

 

Installing Flash Media Server 4.5 on Ubuntu 11.04

September 19, 2011 | Video | 5 Comments

A few weeks ago FMS 4.5 was released. While reading through the system requirements it stated once again that it only supported running on Windows, Redhat and CentOS. Unfortunately for me I only develop on a mac and a ubuntu machine. In the past I had to use a script from this blog post to get FMS 3.5 installed.

So I decided to give it a try. To see if I could in fact get the server up and running on my ubuntu machine. To my surprise, the standard install scripts worked flawlessly.

Here are the steps:

  1. Download the development server
  2. unzip FlashMediaDevServer_4_5_all.zip
  3. cd [path_to_unzipped_files]/linux
  4. tar -zxvf FlashMediaServer4.5_x64.tar.gz
  5. cd FMS_4_5_0_r297
  6. sudo ./installFMS
  7. follow the onscreen instructions
  8. point your browser to your machines IP address.

Flash Media Server 4

September 9, 2010 | Video | 1 comment

Today adobe has announced the latest Flash Media 4 Server. I always get excited when I get to hear about new streaming technology. Adobe has really done a great job this time by releasing some great new features all branded up into three different tiers of software. They are called Streaming Server, Interactive Server and Enterprise Server.

The new features include :

  • Full 64-bit support NEW
  • Enhanced playback experience NEW
  • Faster switching with RTMP Dynamic Streaming ENHANCED
  • Absolute timecode NEW
  • RTMP quality of service (QoS) improvements ENHANCED
  • Greater live streaming security NEW
  • Simplified player development ENHANCED
  • Multiuser experiences for your audience ENHANCED
  • AMF3 support
  • Rich server-side scripting support
  • Peer-assisted networking
  • Application-level multicast NEW
  • IP multicast broadcast NEW
  • Enhanced buffer NEW
  • Faster switching with RTMP Dynamic Streaming ENHANCED
  • Absolute timecode NEW
  • RTMP quality of service (QoS) improvements ENHANCED
  • Protected multiprotocol streaming ENHANCED
  • H.264 video and HE-AAC audio
  • Live HD video streaming
  • RTMP Dynamic Streaming ENHANCED
  • Protected content delivery ENHANCED
  • DVR functionality
  • MPEG-4 video recording
  • H.264 video and HE-AAC audio
  • Live HD/H.264 video streaming
  • Bandwidth detection
  • Protected streaming support ENHANCED
  • Full 64-bit support NEW
  • Simplified player development ENHANCED
  • Simple publishing workflows
  • Integrated HTTP server
  • Consistent delivery across all screens
  • Ultimate efficiency NEW
  • Plug-in architecture
  • Easier implementation ENHANCED
  • Stream splitting
  • Server redirection handling
  • Logging

< Flash Media 4 Server />
< Developer Download />

Akamai Adobe HTTP Dynamic Streaming

August 23, 2010 | Video | 4 Comments

Finally a good demo of Adobe’s new HTTP based Dynamic streaming. Can’t wait to dissect this one a bit more. Here is more information about the new feature included in Flash Player 10.1.

Can’t wait to come up with an open source solution to this type of streaming.

CrystalHD OSX

August 23, 2010 | Video | 0 Comments

The other day I finally broke down and ordered a CrystalHD decoder chip. The CrystalHD is a hardware decoder than can decode h.264/AVC, VC1 and Mpeg2 in hardware. It plugs into a PCI-Express 1x slot. You can install it on an older mac mini or an apple tv. I have to say the results were fantastic. With some higher bitrate shows my mini would skip. But no longer with this magnificent little chip. I would recommend it for anyone who is on older hardware and doesn’t want to pay to upgrade their cpu or system in general.

One thing to note is that in order to get it to work with the latest version of osx I had to compile it from source. You can download the source here. If you are installing in osx skip the “install instructions (kext driver)” section and just enter the following into the terminal. this will let the kext load after each reboot.

sudo cp -r BroadcomCrystalHD.kext /System/Library/Extensions/
sudo -S chmod -R 755 /System/Library/Extensions/BroadcomCrystalHD.kext
sudo -S chown -R root:wheel /System/Library/Extensions/BroadcomCrystalHD.kext

One thing I would like to see if it would ever be possible to use this with FFMPEG. Imagine having the CrystalHD decode the frames and have ffmpeg encode them in another format. This would increase transcoding times significantly since most of the computer resources would be freed. I wonder if any one has tried it out.

FFMPEG 0.6 + Erlyvideo

June 30, 2010 | Video | 3 Comments

Previously I posted about compiling FFMPEG with RTMP support. Now I’m going to describe what you have to do to view that content with Erlyvideo running on OSX of course.

Assuming you have MacPorts installed. Run the following command:
sudo port install erlang

Once that is done you are ready to install Erlyvideo. Go here for up to date install instructions (you will also need git installed).

Finally on to the fun stuff. go to http://localhost:8082/

Assuming everything worked alright you should see the flash content loaded. Go ahead open up terminal and run the following command replacing INPUT_FILE with the file of your choice.

ffmpeg -i INPUT_FILE -re -ac 2 -acodec libfaac -vcodec libx264 -vpre default -s 480x320 -f flv rtmp://localhost:1935/rtmp/test

Now switch back to your browser where you have the erlyvideo page loaded. replace the url at the top of the page with.
rtmp://localhost:1935/rtmp/test

Click on the Connect button.
Then towards the bottom of the page click the Play button.

Congratulations you are now streaming video to erlyvideo!!!

Compiling FFMPEG 0.6 with RTMP Support for OSX

June 30, 2010 | Video | 10 Comments

The other day FFMPEG released version 0.6 nick named “Works with HTML5″. Today I’m going to try to describe the steps on how to compile this new release in OSX with RTMP support. This wont be for the faint of heart.

First you will need to download and install Xcode and then MacPorts. Please go here for MacPort download and install instructions.

Once when MacPorts is done being installed you will need to install a few packages. They include yasm, pkgconfig and openssl. So lets begin getting those installed first. Type the following command into terminal and then press enter.
sudo port install yasm pkgconfig openssl

Once when this is complete you will need to download a few extra files. We are going to compile these manually so we make sure we have the latest and greatest.

FAAC v1.28
FAAD2 v2.7
Lame
LIBRTMP
x264 (download the latest build)
FFMPEG 0.6

First you will want to extract each archive. In OSX you can double-click on the archive to extract or else in terminal use the following command.

tar xzf FILE_NAME.tar.gz

Now it’s time to compile each library. Don’t worry its very easy. For the rest of the steps we will only be working in terminal. So open it up and navigate to where you downloaded your files. Mine are located in my Downloads folder.
cd ~/Downloads

Enter the following commands to navigate to your faac folder, configure, compile and install.

cd faac-1.28/
./configure
make
make install

Now to compile Faad

cd ../faad2-2.7/
./configure
make
make install

Lames turn

cd ../lame-3.98.4/
./configure
make
make install

RTMP is a little different.

cd ../rtmpdump-2.2e/
make SYS=MacOSX
make install

Your path to h264 will most likely be different from mine.

cd ../x264-snapshot-20100629-2245/
./configure
make
make install

Finally FFMPEG 0.6. This also requires a few more steps.
cd ../ffmpeg-0.6/
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264 --enable-libvpx --enable-librtmp
make
make install

Done! now you are ready to encode your file and send it to an RTMP server. I’ve been using the following command to test this.
ffmpeg -i INPUT_FILE -re -ac 2 -acodec libfaac -vcodec libx264 -vpre default -s 480x320 -f flv rtmp://localhost:1935/rtmp/test

Just replace INPUTE_FILE with the video you want to transcode and rtmp://localhost:1935/rtmp/test with the RTMP server you want to publish to. This could be a Flash Media Server, Wowza Server, Red5, Erlyvideo or any other server that supports this functionality.

MakeMKV Plugin – On Hold

May 12, 2010 | Video | 7 Comments

So it’s with regret that I have to inform everyone that for the time being there will be no more updates to the MakeMKV / Plex plug-in. That is how it’ll be for at least now. There are just too many bugs trying to get Plex to even stream a MakeMKV stream and other possible bugs with MakeMKV since it is in beta still. I’ll keep investigating this in the future to see if I can get it working. But for now, This plug-in is now on hold.

MakeMKV 1.5.0

March 4, 2010 | Video | 0 Comments

The latest version of MakeMKV (1.5.0) has been released with a bunch of new updates that seem really cool my favorites are UPnP support, decrypting a backup and better messaging support. While rummaging around with the new release I found these new flags that I thought might help others.

makemkvcon [options] Command Parameters

General options:

–messages=file
Output all messages to file. Following special file names are recognized:
-stdout – stdout
-stderr – stderr
-null – disable output
Default is stdout

–progress=file
Output all progress messages to file. The same special file names as in –messages are recognized with additional value “-same” to output to the same file as messages. Naturally –progress should follow –messages in this case. Default is no output.

–debug[=file]
Enables debug messages and optionally changes the location of debug file. Default: program preferences.

–directio=true/false
Enables or disables direct disc access. Default: program preferences.

–noscan
Don’t access any media during disc scan and do not check for media insertion and removal. Helpful when other applications already accessing discs in other drives.

–cache=size
Specifies size of read cache in megabytes used by MakeMKV. By default program uses huge amount of memory. About 128 MB is recommended for streaming and backup, 512MB for DVD conversion and 1024MB for Blu-ray conversion.

Streaming options:

–upnp=true/false
Enable or disable UPNP streaming. Default: program preferences.

–bindip=address string
Specify IP address to bind. Default: None, UPNP server binds to the first available address and web server listens on all available addresses.

–bindport=port
Specify web server port to bind. Default: 51000.

Backup options:

–decrypt
Decrypt stream files during backup. Default: no decryption.

Conversion options:

–minlength=seconds
Specify minimum title length. Default: program preferences.

Automation options.

-r , –robot
Enables automation mode. Program will output more information in a format that is easier to parse. All output is line-based and output is flushed on line end. All strings are quoted, all control characters and quotes are backlash-escaped. If you automate this program it is highly recommended to use this option. Some options make reference to apdefs.h file that can be found in MakeMKV open-source package, included with version for Linux. These values will not change in future versions.

Message formats:

Message output
MSG:code,flags,count,message,format,param0,param1,…
code – unique message code, should be used to identify particular string in language-neutral way.
flags – message flags, see AP_UIMSG_xxx flags in apdefs.h
count – number of parameters
message – raw message string suitable for output
format – format string used for message. This string is localized and subject to change, unlike message code.
paramX – parameter for message

Current and total progress title
PRGC:code,id,name
PRGT:code,id,name
code – unique message code
id – operation sub-id
name – name string

Progress bar values for current and total progress
PRGV:current,total,max
current – current progress value
total – total progress value
max – maximum possible value for a progress bar, constant

Drive scan messages
DRV:index,visible,enabled,flags,drive name,disc name
index – drive index
visible – set to 1 if drive is present
enabled – set to 1 if drive is accessible
flags – media flags, see AP_DskFsFlagXXX in apdefs.h
drive name – drive name string
disc name – disc name string

Disc information output messages
TCOUT:count
count – titles count

Disc, title and stream information
CINFO:id,code,value
TINFO:id,code,value
SINFO:id,code,value

id – attribute id, see AP_ItemAttributeId in apdefs.h
code – message code if attribute value is a constant string
value – attribute value

Examples:

Copy all titles from first disc and save as MKV files:
makemkvcon mkv disc:0 all c:folder

List all available drives
makemkvcon -r –cache=1 info disc:9999

Backup first disc decrypting all video files in automation mode with progress output
makemkvcon backup –decrypt –cache=16 –noscan -r –progress=-same disc:0 c:folder

Start streaming server with all output suppressed on a specific address and port
makemvcon stream –upnp=1 –cache=128 –bindip=192.168.1.102 –bindport=51000 –messages=-none

Lego Stop Motion

March 3, 2010 | Video | 0 Comments

I’ve always been a fan of stop motion movies. When i saw this one all i could say is WoW. Great job!

Fork me on GitHub