[ 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.

Purpose

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:

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.

Software used

Video encoding ('.trp' file)

There are many tools to generate a compatible Transport Stream (ts) file, the following describes Avidemux:

  1. Run Avidemux and open your video file using the Open button.
  2. 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.
  3. 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.
  4. If it is eligible for direct copy leave options Video and Audio to Copy. Otherwise set Video: MPEG-2 (mpeg2video) and Audio: MP2 (lav).
  5. Set Format: MPEG-TS (A+V).
  6. 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:
    1. Click on Filters button in Video section.
    2. Double-click on MPlayer resize.
    3. Disable Lock aspect ratio option and type Width: 720 and Height: 576. Click OK.
    4. Click Close.
  7. 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):
Information and settings for video eligible for direct copy

Example information and settings for video not eligible for direct copy (a DivX video):
Information and settings for video not eligible for direct copy

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.

Video splitting

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.

  1. Run TSSplitter
  2. 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.
  3. In Size (MB) type 1872,6562 and click the Go button located on the same row.
  4. 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:
TSSPlitter settings

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:

[STREAM]
create=01,01,2007,00,00,00
type=TV
scramble=0
tp1=0
tp2=0
tp3=H
svcinfo=00000000000000000000000000000000VVVVAAAAPPPP05000100000000000000000000000000000000050000
file=1
file1=C:\AVDATA\video.trp
TotalBytes=BBBBBB
finish=01,01,2007,12,00,00
duration=DDDD
STATUS=RECORD_FINISH

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:

  1. Run TSReader Lite
  2. The first time you run this program it will ask for an Input source, select File.dll, Transport Stream File.
  3. Then it will ask for a stream file, disable the checkbox Rate controlled and select your '.trp' file.
  4. 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.

Audio, video and PCR PIDs in TSReader Lite

Transfering files to STB

To transfer the files you generated to your STB for playback you can follow these steps:

  1. Before you plug your PC press Menu in your STB remote control, choose option PVR, USB connection and press OK.
  2. 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).
  3. Windows will detect a removable drive. Open this drive and copy your '.pvr' and '.trp' files in folder AVDATA.
  4. 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.
  5. 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