Mediaclient

From Sundtek Wiki
Jump to: navigation, search

Contents

mediaclient

"mediaclient" is the commandline tool which can be used to administrate the sundtek driver. it's a powerful tool which allows you to tune to various channels, set single parameters, enable the network support and many other options.

please note that all tuning options are also available via our C API library.

Enumerating devices

Enumerating devices can be used to show up which devices are available to the system.

$ /opt/bin/mediaclient -e
**** List of Media Hardware Devices ****
device 0: [Sundtek SkyTV Ultimate]  DVB-S/S2, REMOTE-CONTROL, SWENCODER
  [SERIAL]:
     ID: U110822152826
  [DVB-S/S2]:
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [ANALOG-TV]:
     VIDEO0: 
  [REMOTECONTROL]:
     INPUT0: /dev/mediainput0

It's also possible to automatically run a script once a device has been initialized, this can be configured in /etc/sundtek.conf.

The C-API has an advanced notification mechanism which allows to poll a descriptor for newly attached devices.

Tuning on the commandline

Tuning AnalogTV

/opt/bin/mediaclient -m ATV -f 126250000 -d /dev/video0 -v PAL-BG;

-m ATV .. mode
-f .. frequency in Hz
-d .. devicenode
-v .. videostandard

List supported analogTV video-standards

/opt/bin/mediaclient -L -d /dev/video0

-L .. List AnalogTV Standard
-d .. devicenode

Tuning FM-Radio

/opt/bin/mediaclient -m RADIO -f 90100000 -d /dev/radio0

-m RADIO .. mode
-f .. frequency
-d .. devicenode

Unmute FM Radio:

/opt/bin/mediaclient -m RADIO -g off

Tuning DVB-T

/opt/bin/mediaclient -m DVBT -f 450000000 -b 6

-m DVBT (mode)
-f Frequency in Hz
-b bandwidth (6, 7 or 8)


Tuning ATSC

/opt/bin/mediaclient -m ATSC -f 450000000

-m ATSC (mode)
-f Frequency in Hz


Tuning ClearQAM

/opt/bin/mediaclient -m ATSC -M Q256 -f 450000000

-m ATSC (mode)
-f Frequency in Hz
-M Modulation (eg. Q256 for QAM256)

Tuning DVB-C

/opt/bin/mediaclient -m DVBC -f 113000000 -M Q64 -S 6900000

-m DVBC (mode)
-f Frequency
-M modulation (Q64, Q128 or Q256)
-S Symbolrate (sym)

Tuning DVB-S

/opt/bin/mediaclient -m DVBS -f 1234000 -M QPSK -S 22000000 -V H -E 3/4

-m DVBS (mode)
-f Frequency in Khz
-M modulation (QPSK, 8PSK)
-S Symbolrate
-V polarization (H .. horizontal, V .. vertical, OFF .. off)
-E FEC

Tuning DVB-S2

/opt/bin/mediaclient -m DVBS2 -f 1234000 -M QPSK -S 22000000 -V H -E 3/4

-m DVBS (mode)
-f Frequency in Khz
-M modulation (QPSK, 8PSK)
-S Symbolrate
-V polarization (H .. horizontal, V .. vertical, OFF .. off)
-E FEC

Tuning DVB-T2

/opt/bin/mediaclient -m DVBT2 -f 123000000 --plpid 0 -b 1.7

-m DVBT2 (mode)
-f Frequency in Hz
--plpid PLP ID (optional)
-b 1.7 (DVB-T2 Bandwidth, 1.7, 5, 6, 7, 8, 10 Mhz)

Receiving Full Transponder

/opt/bin/mediaclient --cat /dev/dvb/adapter0/dvr0 | /opt/bin/mediaclient --pipecount=1000

to save the TS stream to harddisk

/opt/bin/mediaclient --cat /dev/dvb/adapter0/dvr0 > /tmp/test.ts

-cat .. built in file reader of mediaclient
--pipecount=milliseconds .. measuring interval, print how many bytes are received within the given interval

Reading Signalstatistics

This will automatically detect the current devicemode, and print the current transponder information.

/opt/bin/mediaclient --readsignal=0 -d /dev/dvb/adapterN/frontend0

--readsignal=0 .. how many times 0 -> infinite
-d .. frontend devicenode
--band .. UNIVERSAL or C-BAND (optional)

$ /opt/bin/mediaclient -m DVBS -f 1234000 -M QPSK -S 22000000 -V H -E 3/4
Using device: /dev/dvb/adapter0/frontend0
Setting DVB-S/S2 tune Parameters
using real frequency: 1234000
Modulation: QPSK (DVB-S)
Symbolrate: 22000000
Voltage: 18 Volt (Horizontal)
FEC: 3/4
Tone OFF
Frequency: 1234000
Syntax OK
Checking for lock:
..........

Default ZF (Zwischenfrequenz)
$ /opt/bin/mediaclient --readsignal=2 -d /dev/dvb/adapter0/frontend0 
== reading digital TV signal ==
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 1234000    Hz LOCKED:  NO SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 1234000    Hz LOCKED:  NO SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF

Frequenz an einem Universal LNB:
$ /opt/bin/mediaclient --readsignal=2 -d /dev/dvb/adapter0/frontend0  --band UNIVERSAL
== reading digital TV signal ==
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 10984000   Hz LOCKED:  NO SYS: DVB-S SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 10984000   Hz LOCKED:  NO SYS: DVB-S SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF

Frequenz an einem C-BAND LNB:
$ /opt/bin/mediaclient --readsignal=2 -d /dev/dvb/adapter0/frontend0  --band C-BAND
== reading digital TV signal ==
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 3916000    Hz LOCKED:  NO SYS: DVB-S SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF
SIGNAL: [                                 ] (  0%)  BER:      0 FREQ: 3916000    Hz LOCKED:  NO SYS: DVB-S SYM: 22000000 FEC: FEC_3_4 VOLTAGE: H(18V) TONE: OFF

Scanning current transponder information

Scanning the current transponder will try to retrieve the stream ids for each TV channel, it can be used for DVB-C, DVB-T, DVB-S/S2 or regular MPEG-TS files

$ /opt/bin/mediaclient -e

**** List of Media Hardware Devices ****
device 0: [ Sundtek MediaTV Pro]  DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS
  [SERIAL]:
     ID: U110714110127
  [DVB-C]:
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [DVB-T]:
     FRONTEND: /dev/dvb/adapter0/frontend0
     DVR: /dev/dvb/adapter0/dvr0
     DMX: /dev/dvb/adapter0/demux0
  [ANALOG-TV]:
     VIDEO0: /dev/video1
     VBI0: /dev/vbi0
  [FM-RADIO]:
     RADIO0: /dev/radio0
     RDS: /dev/rds0
  [REMOTECONTROL]:
     INPUT0: /dev/mediainput0
  [OSS]:
     OSS0: /dev/dsp0

$ /opt/bin/mediaclient -m DVBC -f 113000000 -S 6900000 -M Q64

Using device: /dev/dvb/adapter0/frontend0
Checking for lock:
. [LOCKED]

$ /opt/bin/mediaclient --tsscan /dev/dvb/adapter0/dvr0

/dev/dvb/adapter0/dvr0 
PMT PID: 0x0064
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: Das Erste
    --> 0x0065 (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x0066 (ISO/IEC 11172 Audio)
    --> 0x0067 (ISO/IEC 11172 Audio)
    --> 0x0816 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x0054 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x0068 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x0069 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x006a (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
PMT PID: 0x00c8
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: Bayerisches FS Sd
    --> 0x00c9 (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x00ca (ISO/IEC 11172 Audio)
    --> 0x00cb (ISO/IEC 11172 Audio)
    --> 0x0882 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x00cc (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x00ce (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
PMT PID: 0x012c
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: hr-fernsehen
    --> 0x012d (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x012e (ISO/IEC 11172 Audio)
    --> 0x012f (ISO/IEC 11172 Audio)
    --> 0x08de (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x0130 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
PMT PID: 0x01f4
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: Bayerisches FS Nord
    --> 0x00c9 (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x00ca (ISO/IEC 11172 Audio)
    --> 0x00cb (ISO/IEC 11172 Audio)
    --> 0x0882 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x00cc (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x00ce (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
PMT PID: 0x0258
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: WDR Kln
    --> 0x0259 (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x025a (ISO/IEC 11172 Audio)
    --> 0x025b (ISO/IEC 11172 Audio)
    --> 0x0942 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x025c (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
PMT PID: 0x0320
  Encrypted: No
  Service running: Yes
  Provider Name: ARD
  Service Name: SWR Fernsehen BW
    --> 0x0321 (ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream)
    --> 0x0322 (ISO/IEC 11172 Audio)
    --> 0x0323 (ISO/IEC 11172 Audio)
    --> 0x09a6 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections)
    --> 0x0324 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x0326 (ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data)
    --> 0x087b (ISO/IEC 13818-6 type B)
Total found: 6 PMTs (incl. unknown 0x0000)
Scan finished after 58 packets (10904 bytes)

Check bandwidth of entire transponder

/opt/bin/mediaclient --cat /dev/dvb/adapter0/dvr0 | /opt/bin/mediaclient --pipecount=1000

[2011-10-02 11:18:30]    4341760 bytes |    4240.00 kb |       4.14 mb transferred
[2011-10-02 11:18:31]    4474880 bytes |    4370.00 kb |       4.27 mb transferred
[2011-10-02 11:18:32]    4464640 bytes |    4360.00 kb |       4.26 mb transferred
[2011-10-02 11:18:33]    4444160 bytes |    4340.00 kb |       4.24 mb transferred

list connected clients

/opt/bin/mediaclient --lc

**** List of Media Clients ****
/dev/dvb/adapter0/frontend0:
  2528 ... vdr
/dev/dvb/adapter0/dvr0:
  No client connected
/dev/dvb/adapter0/demux0:
  No client connected
/dev/mediainput0:
  No client connected
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox