[mythtv] Re: Changing channels via myth protocol from a python
script not working
Mudit Wahal
mwahal at gmail.com
Thu May 26 16:43:15 UTC 2005
Here is a logfile.
In this I'm query recorder all along after each step, such as changing
channel down, setting a channel, setting to record etc. As you can see
the program info never changed from KNTV-HD. Also, my last command for
channel is set_channel to 36_1. After I'm done recording a 4mb segment
and I play the file, I still have only recorded channel 11_1.
My question is that is this protocol still valid ? Also is there any
documentation of this simple handshake (such as changing channel,
watching live TV) .
Otherwise I may have to rebuild the mythfrontend from scratch and
enable the verbose printfs somewhere to show me the request/reply
sequences.
Thanks
Mudit
==========================
REQUEST: '21 MYTH_PROTO_VERSION 15'
REPLY LEN: 13
REPLY: 'ACCEPT[]:[]15'
REPLY: 'ACCEPT[]:[]15'
REQUEST: '23 ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
REPLY: 'OK'
REQUEST: '36 QUERY_IS_ACTIVE_BACKEND[]:[]mythtvbe'
REPLY LEN: 4
REPLY: 'TRUE'
REPLY: 'TRUE'
REQUEST: '17 GET_FREE_RECORDER'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST: '44 QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REQUEST: '37 QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 288
REPLY: 'Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0'
REPLY: Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0
REQUEST: '35 QUERY_RECORDER 1[]:[]GET_INPUT_NAME'
REPLY LEN: 8
REPLY: 'DVBInput'
REPLY: DVBInput
REQUEST: '17 GET_FREE_RECORDER'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST: '44 QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REQUEST: '41 QUERY_RECORDER 1[]:[]CHANGE_CHANNEL[]:[]0'
REPLY LEN: 2
REPLY: 'ok'
REPLY: ok
REQUEST: '37 QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 288
REPLY: 'Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0'
REPLY: Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0
REQUEST: '17 GET_FREE_RECORDER'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST: '44 QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REQUEST: '41 QUERY_RECORDER 1[]:[]SET_CHANNEL[]:[]36_1'
REPLY LEN: 2
REPLY: 'ok'
REPLY: ok
REQUEST: '37 QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 288
REPLY: 'Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0'
REPLY: Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0
REQUEST: '17 GET_FREE_RECORDER'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST: '44 QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REQUEST: '37 QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 288
REPLY: 'Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0'
REPLY: Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0
REQUEST: '17 GET_FREE_RECORDER'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST: '44 QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
REQUEST: '25 ANN RingBuffer mythtvbe 1'
REPLY LEN: 2
REPLY: 'OK'
REPLY: 'OK'
REQUEST: '33 QUERY_RECORDER 1[]:[]SPAWN_LIVETV'
REPLY LEN: 2
REPLY: 'ok'
REPLY: 'ok'
REQUEST: '33 QUERY_RECORDER 1[]:[]IS_RECORDING'
REPLY LEN: 1
REPLY: '1'
REPLY: 1
REQUEST: '34 QUERY_RECORDER 1[]:[]GET_FRAMERATE'
REPLY LEN: 2
REPLY: '25'
REPLY: 25
REQUEST: '37 QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 288
REPLY: 'Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0'
REPLY: Today[]:[] []:[]Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My
Girl").[]:[]Talk[]:[]2005-05-26T07:00:00[]:[]2005-05-26T10:00:00[]:[]KNTV-HD[]:[]none[]:[]11_1[]:[]1037[]:[]SH019150[]:[]EP0191504855[]:[]
[]:[]0[]:[]2005-05-26[]:[]0
Channel 11_1: Today -- Today's Big Burger Cook-off; author Jacquelyn
Mitchard ("The Breakdown Lane"); author Karen Stabiner ("My Girl").
REQUEST: '63 QUERY_RECORDER
1[]:[]SEEK_RINGBUF[]:[]0[]:[]0[]:[]0[]:[]0[]:[]0'
REPLY LEN: 7
REPLY: '0[]:[]0'
REPLY: 0[]:[]0
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '53 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]256000'
REPLY LEN: 6
REPLY: '256000'
REPLY: '256000' size = 256000
MESSAGE: '52 QUERY_RECORDER 1[]:[]REQUEST_BLOCK_RINGBUF[]:[]98304'
REPLY LEN: 5
REPLY: '98304'
REPLY: '98304' size = 98304
REQUEST: '32 QUERY_RECORDER 1[]:[]STOP_LIVETV'
REPLY LEN: 2
REPLY: 'ok'
REPLY: 'ok'
REQUEST: '33 QUERY_RECORDER 1[]:[]DONE_RINGBUF'
REPLY LEN: 2
REPLY: 'OK'
REPLY: 'OK'
REQUEST: '36 QUERY_IS_ACTIVE_BACKEND[]:[]mythtvbe'
REPLY LEN: 4
REPLY: 'TRUE'
REPLY: 'TRUE'
================
On 5/25/05, Mudit Wahal <mwahal at gmail.com> wrote:
> Hi All,
>
> I found a python script to connect to backend and record/change
> channels etc. The script is at http://www.visi.com/~erl/myth.py . I
> had to change the protocol version number and QUERY_IS_ACTIVE_BACKEND
> request. Parsing programming is still broken. Now I can connect to the
> backend and query the recorder. I can see the logs in the backend and
> they are all OK. I was able to catch 2 MB of live TV and transfer into
> a file using the transfer_live() function.
>
> My problem is that neither QUERY_RECORDER:CHANGE_CHANNEL nor
> QUERY_RECORDER:SET_CHANNEL are working. I see ok response at the
> backend. But when I try to record the live TV, it still only records
> from the channel to which backend was tuned before the script ran.
> Querying of current program info only returns the original channel.
>
> I'm trying to write scripts to change channel/volume via web
> interface. This is useful for clients which cant run myth frontend but
> have a web browser builtin. The web browser will connect to a
> webserver running at the backend machine. There will be links to
> change channel up/down, volume up/down. The client will have ability
> to play a nfs/samba mounted filesystem. So I can share the liveTV
> cache ring buffer and let the client play that file. I can change
> channels via the web browser. Sort of a crude way but if its works,
> it'll be great !
>
> If anyone is interested, I'll post the script and detailed log from
> the script and the backend.
>
> Thanks in advance !
>
> Mudit
>
More information about the mythtv-dev
mailing list