Howto prepare VoD's for the SnapTV VoD server
As of SnapTV Server Software version 2.16 and earlier, the VoD and the Media Catalog modules requires VoD's to be in the MPEG transport stream format.
MPEG transport stream (MPEG-TS, MTS or TS) is a standard container format for transmission and storage of audio, video and subtitles. The MPEG-TS container supports various video and audio codecs like H.264, MPEG-2 Video, AAC, AC3, mp3 and more.
We reccomended using H264 (high-profile) afor video and AAC for audio.
Method 1: Using Handbrake and VLC
HandBrake is a free and open source tool for converting video from nearly any format. Handbrake is also capable of ripping DVD and Blue-ray discs. The application is available for Windows, Mac and Linux. Get Handbrake
Unfortunately, Handbrake does not support MPEG-TS as an output format so we will use a two step process where we transcode the the video files using Handbrake and then converts it to MPEG-TS using VLC.
Transcode Video Using Handbrake
For your convencience we have created a Handbrake preset suitable for the SnapTV system. Download this preset file and import it to Handbrake using the Preset menu. Open the Preset drawer in handbrake and select the SnapTV preset.
Press the Source button in Handbrake and select a video source. Wait for Handbrake to scan the source.
The preset uses these settings for video
- Format: MKV file
- Video Codec: h264
- Framerate: Same as source
- Variable framerate
- Video quality : Constant quality with RF = 20
- Fast Decode
- x264 Tune: zerolatency
- H264 Profile: High
- H264 Level: Auto
- Additional options: keyint=25
Now, lets review the settings for Audio and Subtitles.
The Set top box supports several audio formats including AAC, AC3 and MP3. If your source already has AAC or AC3 sound you can select a Passthru codec in which case the audio stream wont be changed. Otherwise select AAC (CoreAudio). If there are several audio tracks you can repeat this step for all tracks you want to keep.
You can add subtitle tracks if they are available in the source file
Review your settings and press the "Start" button. Note that container for the output file is mkv or mp4 and not MPEG-TS at this point.
Wait for the video conversion to finish. This may take some time.
Convert File to MPEG-TS using VLC
Now we will convert the video file from mkv (or mp4) to MPEG-TS using VLC.
If you dont have VLC installed, get it here
Open the export wizard in VLC using the file menu
Select Transcode/Save to file
Choose the video file produced with Handbrake
No need to transcode since this was done with Handbrake
Select MPEG TS as Encapsulation format (container)
Select where to save the ts file.
Review and click finish. Wait for VLC to finish.
TIP: Use the queue in Handbrake and then the playlist in VLC to prepare many files in one operation
Method 2: FFmpeg
If you are more comfortabe using command line tools we reccomend using ffmpeg. This free cross platform tool is your swiss army knife for media conversion. Download FFmpeg and read more here
ffmpeg have a gazillion parameters you can tune. Here is an example that works quite well with the SnapTV system:
ffmpeg -i [input file] -g 25 -c:a aac -c:v libx264 -c:s copy -crf 20 -f mpegts -strict -2 -y [output file]
Upload Movie to VoD server
Upload the MPEG-TS file to the SnapTV VoD server. After upload is completed the server will use a minute or so indexing the file to allow for trick play.
Enjoy the Movie on your Set top box