[ Español ]
Kaon S7 and KVR-1000: encoding videos for Kaon STB
This information has been tested on Kaon model KVR-1000TS+ but may apply to other models as well.
Kaon S7 and KVR-1000 is a terrestrial and satellite digital TV decoder that amongst other features has a hard disk for recording and an USB port to access its hard disk from a PC. Kaon offers a PC program to convert any DivX or MPEG video to a compatible format for playback on the set top box, however when this program is used video playback is far from optimal:
- It does not handle video aspect ratio properly and plays in 1:1 format with black side bars and a very stretched picture.
- High quality high bitrate videos stutter and audio mutes randomly.
- Ignores the 2 GB file size limit, if the resulting file is larger you cannot transfer it to your STB.
- Cuts the last 15 seconds of video.
- Does not process interlaced video properly so it does not play as good as it should.
To fix all these issues I digged into the format it records TV programs with, to find out better ways to encode videos for this decoder.
When it records a TV program it creates two files in AVDATA folder, one with extension '.trp' is a Transport Stream (ts) subset of the recorded channel containing only its related services and the other with extension '.pvr' contains information related to the recording and is necessary to play the video.
This tutorial explains how to encode any video to a compatible '.trp' file using free software and how to generate its corresponding '.pvr' file.
Video encoding ('.trp' file)
There are many tools to generate a compatible Transport Stream (ts) file, the following describes Avidemux:
- Run Avidemux and open your video file using the Open button.
- If you are asked Packed bitstream detected. Do you want me to unpack it? click No. If you are asked Index is not up to date. Rebuild frame now? or This looks like MPEG. Do you want to index it?
click Yes. If you are asked H.264 detected. Do you want to switch Avidemux to safe mode? click Yes.
- Click on the Information button. If it displays Codec 4CC: MPEG, Image size: less or equal than 720x576 (for decoders not high definition capable) and Audio codec: MP2 this video is eligible for direct copy.
- If it is eligible for direct copy leave options Video and Audio to Copy. Otherwise set Video: MPEG-2 (mpeg2video) and Audio: MP2 (lav).
- Set Format: MPEG-TS (A+V).
- If your STB is not high definition capable (like the S7 and KVR-1000) and Information shows Image size: greater than 720x576 you will have to add a resize filter:
- Click on Filters button in Video section.
- Double-click on MPlayer resize.
- Disable Lock aspect ratio option and type Width: 720 and Height: 576. Click OK.
- Click Close.
- Click Save Video button to start encoding and enter a file name ended in '.trp' (without quotes).
Example information and settings for video eligible for direct copy (an '.mpg' file):
Example information and settings for video not eligible for direct copy (a DivX video):
For videos not eligible for direct copy if you wish you can set video encoding quality by clicking Configure button in Video section. Increase Quantiser value to reduce video quality and size. Perform this adjustment before saving the video.
The Kaon STB file system does not support files larger than 1,82 GB, more precisely 1.963.622.400 bytes or 1.917.600 kB. If your '.trp' file does not exceed this size proceed to the next section, otherwise you must split it into multiple smaller parts with the following procedure. The device will handle these parts as a single video.
- Run TSSplitter
- Load your '.trp' file by clicking menu option File, Open for splitting. Select All files in the bottom drop down list so that '.trp' files are listed. Select your file and click Open.
- In Size (MB) type 1872,6562 and click the Go button located on the same row.
- Click Start Splitting. It can take a while and will create new '.trp' files, you have to use these from now on.
Example settings for TSSplitter:
Preparing the '.pvr' file
The '.pvr' file is a text file that contains data required to play a video file. You can download an example file here: video.pvr and edit with your favourite text editor. If you double-click this file in Windows select Notepad.
The example file looks like this:
Replace the following texts with information from your video:
Note: if you encoded your video with the indicated Avidemux version you can use the indicated PID values, otherwise if you used another version, program or in case of problems you should check the actual PID values in your '.trp' file with TSReader Lite:
- Run TSReader Lite
- The first time you run this program it will ask for an Input source, select File.dll, Transport Stream File.
- Then it will ask for a stream file, disable the checkbox Rate controlled and select your '.trp' file.
- Click on + on the left of PMT PID.
The four digits following PID 0x are the PID values you must type into the .pvr file, the value with a camera icon is VVVV, the value with a speaker icon is AAAA and the value with a clock icon is PPPP.
Transfering files to STB
To transfer the files you generated to your STB for playback you can follow these steps:
- Before you plug your PC press Menu in your STB remote control, choose option PVR, USB connection and press OK.
- Now connect the USB cable first into the decoder and then into the PC (if done the other way around sometimes results in strange errors).
- Windows will detect a removable drive. Open this drive and copy your '.pvr' and '.trp' files in folder AVDATA.
- Stop the removable drive so you can unplug the USB cable safely, under Windows this is done from an icon next to the clock in the task bar.
- Unplug USB cable and press Exit in STB remote control. The video is ready to play in the TV recordings folder (AVDATA).
Problems and solutions
- Avidemux throws an error message: Not activated, make sure the number of tracks and bitrate are compatible
- Avidemux throws an error message: Audio track not suitable
- Audio mutes after a while
- Upgrade Avidemux to the latest version, at the time of writing this is 2.6.8.
- Video does not play or has no sound
- Use TSReader Lite to check that the PIDs in your '.trp' file match the ones you entered in its corresponding '.pvr' file.
- Avidemux does not run and/or throws an illegal instruction error
- Looks like a problem with revisions 7604 and 7609, please use a previous revision or the latest version.
Completed on July 2011.
Copyright © 2011 Jeroni Paul.
Back to index