Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 39

Thread: NEW -- mythchanger firewire channel changer

  1. #21
    Join Date
    Jan 2007
    Beans
    10

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by majoridiot View Post
    it does not prime, sorry. i kept it a changer-only app so as not to unintentionally interfere... not knowing
    what each user's end-use might be.

    it would be easy enough to do what you want, however. wrap the changer command in a bash script and call that from
    mythv for channel changing. i am not sure what sort of issues you have with the stbs going off-line, so relying
    on the changer failing as indication that the stb is unstable is not a guarantee... you might be able to do the
    channel change but still have an un-primed box.

    my recommendation follows... assuming you are targeting the stb by GUID:

    command for mythtv-backend channel changer parameter would be something like:

    Code:
    primechange $channel GUID
    where GUID is the manually-entered GUID of the target stb. each tuner entry should correspond to the correct
    GUID for that stb.

    if myth is changing a channel, you know it will likely be recording and want to make sure it is primed...

    primechange script pseudo-code would be something like:

    Code:
    $CHANNEL=$1
    $GUID=$2
    
    if{
    mythchanger -c $CHANNEL -g $GUID  (and any other arguments you might run it with)
    }
    
    returns ok, exit
    
    else:
    
    mythprime -c <your safe priming channel> (and any other arguments you might run it with)
    
    mythchanger -c $CHANNEL -g $GUID
    that would be your best bet... but with a potential down-side: if it does encounter and unstable stb and primes,
    it would likely interrupt any recordings in-progress on the other stbs, as they are all primed blindly by mythprime.
    it was intended to be run when starting/restarting the backend only, so was written to prime everything, and not
    individually.

    if that is an issue for you, i can add the prime by GUID code to mythprime when i have the chance. feel free
    to email me if this is the case and i'll see what i can do.
    I was thinking something like this wrapper would be more reliable as far as knowing if the recording was actually occurring or not:

    Code:
    psuedo-code..
    
    
    mythchanger -g <GUID> -f 6 -v -c <channel>
    
    # Check if the firewire is primed
    
          test-mpeg2 -r 1 > /tmp/testcap.ts &
           sleep 1
           killall test-mpeg2
           if [ -s /tmp/testcap.ts ] ; then
                   echo "#################"
                   echo "# Firewire is primed!!!!!!!!!!!!"
                   echo "################"
                   rm -f /tmp/testcap.ts
           else
                   mythprime -v
           fi
    You could of course, set the entire test under a set of conditions so that it runs until the recording starts properly, or after 5 attempts it fails and leaves a message in a log of some sort.

    I may flesh all of that out in a few days and test it. If it works well I'll post the resulting wrapper.

  2. #22
    Join Date
    Oct 2006
    Location
    my apartment
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by Cyberai View Post
    I was thinking something like this wrapper would be more reliable as far as knowing if the recording was actually occurring or not:

    Code:
    psuedo-code..
    
    
    mythchanger -g <GUID> -f 6 -v -c <channel>
    
    # Check if the firewire is primed
    
          test-mpeg2 -r 1 > /tmp/testcap.ts &
           sleep 1
           killall test-mpeg2
           if [ -s /tmp/testcap.ts ] ; then
                   echo "#################"
                   echo "# Firewire is primed!!!!!!!!!!!!"
                   echo "################"
                   rm -f /tmp/testcap.ts
           else
                   mythprime -v
           fi
    You could of course, set the entire test under a set of conditions so that it runs until the recording starts properly, or after 5 attempts it fails and leaves a message in a log of some sort.
    'zactly...
    Quote Originally Posted by Cyberai View Post
    I may flesh all of that out in a few days and test it. If it works well I'll post the resulting wrapper.
    if you come up with something that works, posting it might benefit others somewhere down the line, so please do.

  3. #23
    Join Date
    Jan 2007
    Beans
    10

    Re: NEW -- mythchanger firewire channel changer

    Well, here is a super crude first swipe written while I was waiting for dinner..

    Code:
    #!/bin/bash
    
    rm -f /home/mythtv-user/testcap.ts
    
    CHAN=$1
    GUID=$2
    
    mythchanger -g $GUID -f 6 -v -c $CHAN
    
    # Check if the firewire is primed
    
          test-mpeg2 -r 1 > /home/mythtv-user/testcap.ts &
          sleep 1
          pkill -9  test-mpeg2
    
           if [ -s /tmp/testcap.ts ] ; 
    		then
                   	echo "#################"
                   	echo "# Firewire is primed"
                   	echo "################"
                   	rm -f /tmp/testcap.ts
           else
    		LIMIT=10
    		VAR=0
    		until [ ! -s /tmp/testcap.ts ] && (( VAR > LIMIT )) ;
    			do
    			echo "#################"
                   		echo "# Firewire is not primed"
    			echo "# Running mythprime"
                   		echo "################"		
                   		mythprime -v -f 6
    			test-mpeg2 -r 1 > /home/mythtv-user/testcap.ts &
          			sleep 1 
          			pkill -9  test-mpeg2
    			echo -n "$var "
    			(( var++ ))
    			done  # 0 1 2 3 4 5 6 7 8 9 10
           fi
    
    rm -f /home/mythtv-user/testcap.ts
    It doesn't work yet. I don't think test-mpeg2 can differentiate between fw inputs and record the input to disk if you are using more than one STB. Even though all three STB's are primed and respond correctly, test-mpeg2 is producing a zero size file every time.

    Anyone think they can clear this up?

  4. #24
    Join Date
    Oct 2006
    Location
    my apartment
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by Cyberai View Post
    Well, here is a super crude first swipe written while I was waiting for dinner..

    Code:
    #!/bin/bash
    
    rm -f /home/mythtv-user/testcap.ts
    
    CHAN=$1
    GUID=$2
    
    mythchanger -g $GUID -f 6 -v -c $CHAN
    
    # Check if the firewire is primed
    
          test-mpeg2 -r 1 > /home/mythtv-user/testcap.ts &
          sleep 1
          pkill -9  test-mpeg2
    
           if [ -s /tmp/testcap.ts ] ; 
    		then
                   	echo "#################"
                   	echo "# Firewire is primed"
                   	echo "################"
                   	rm -f /tmp/testcap.ts
           else
    		LIMIT=10
    		VAR=0
    		until [ ! -s /tmp/testcap.ts ] && (( VAR > LIMIT )) ;
    			do
    			echo "#################"
                   		echo "# Firewire is not primed"
    			echo "# Running mythprime"
                   		echo "################"		
                   		mythprime -v -f 6
    			test-mpeg2 -r 1 > /home/mythtv-user/testcap.ts &
          			sleep 1 
          			pkill -9  test-mpeg2
    			echo -n "$var "
    			(( var++ ))
    			done  # 0 1 2 3 4 5 6 7 8 9 10
           fi
    
    rm -f /home/mythtv-user/testcap.ts
    It doesn't work yet. I don't think test-mpeg2 can differentiate between fw inputs and record the input to disk if you are using more than one STB. Even though all three STB's are primed and respond correctly, test-mpeg2 is producing a zero size file every time.

    Anyone think they can clear this up?
    if it were me, i would try sleeping at least 5 seconds... it can take a second or more sometimes before the stb
    starts sending a stream.

    did you test to see if test-mpeg2 works from the command line?

  5. #25
    Join Date
    Jan 2007
    Beans
    10

    Re: NEW -- mythchanger firewire channel changer

    Nope. looks like it's a problem with test-mpeg2 on multi stb boxes:

    Code:
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 > /home/mythtv-user/test.ts
    Starting to receive
    ^Cdone.
    mythtv-user@mythtv:~/libiec61883-1.1.0$ ls -lh /home/mythtv-user/test.ts 
    -rw-r--r-- 1 mythtv-user mythtv-user 0 2009-02-15 10:30 /home/mythtv-user/test.ts
    mythtv-user@mythtv:~/libiec61883-1.1.0$
    Any ideas?

  6. #26
    Join Date
    Oct 2006
    Location
    my apartment
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by Cyberai View Post
    Nope. looks like it's a problem with test-mpeg2 on multi stb boxes:

    Code:
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 > /home/mythtv-user/test.ts
    Starting to receive
    ^Cdone.
    mythtv-user@mythtv:~/libiec61883-1.1.0$ ls -lh /home/mythtv-user/test.ts 
    -rw-r--r-- 1 mythtv-user mythtv-user 0 2009-02-15 10:30 /home/mythtv-user/test.ts
    mythtv-user@mythtv:~/libiec61883-1.1.0$
    Any ideas?
    not sure for a multi-stb setup... you may need to specify a specific node for it to work. e.g.:

    Code:
    $ test-mpeg2 -r n 1 test.ts
    to receive a stream from the stb on node 1. to target a specific stb, use plugreport to find out which stb is on which node.
    Last edited by majoridiot; February 15th, 2009 at 10:40 PM. Reason: typo

  7. #27
    Join Date
    Jan 2007
    Beans
    10

    Re: NEW -- mythchanger firewire channel changer

    Well, took a shot at that last night and here's the result..

    Code:
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 -r n 0 > /home/mythtv-user/test.ts
    libiec61883 warning: Established connection on channel 0.
    You may need to manually set the channel on the receiving node.
    Starting to receive
    ^Cdone.
    mythtv-user@mythtv:~/libiec61883-1.1.0$ ls -lh /home/mythtv-user/test.ts 
    -rw-r--r-- 1 mythtv-user mythtv-user 0 2009-02-15 18:04 /home/mythtv-user/test.ts
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 -r n 0 > /home/mythtv-user/test.ts
    As you can see, no dice. I let it run for about 5 minutes. I'd say something is wrong with my system in particular, but it's a mostly vanilla Intrepid Mythbuntu setup. I've added Boxee and Miro, but nothing else and the repos are standard and untouched since install.

    This is very frustreating, I had three out of four recordings fail last night because of firewire connections that weren't streaming properly.

  8. #28
    Join Date
    Oct 2006
    Location
    my apartment
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by Cyberai View Post
    Well, took a shot at that last night and here's the result..

    Code:
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 -r n 0 > /home/mythtv-user/test.ts
    libiec61883 warning: Established connection on channel 0.
    You may need to manually set the channel on the receiving node.
    Starting to receive
    ^Cdone.
    mythtv-user@mythtv:~/libiec61883-1.1.0$ ls -lh /home/mythtv-user/test.ts 
    -rw-r--r-- 1 mythtv-user mythtv-user 0 2009-02-15 18:04 /home/mythtv-user/test.ts
    mythtv-user@mythtv:~/libiec61883-1.1.0$ test-mpeg2 -r n 0 > /home/mythtv-user/test.ts
    As you can see, no dice. I let it run for about 5 minutes. I'd say something is wrong with my system in particular, but it's a mostly vanilla Intrepid Mythbuntu setup. I've added Boxee and Miro, but nothing else and the repos are standard and untouched since install.

    This is very frustreating, I had three out of four recordings fail last night because of firewire connections that weren't streaming properly.
    out of curiosity, are you running each stb on it's own firewire port- i.e. 3 firewire cables plugged into 3 diff. ports
    on the computer, or daisy-chained- with one firewire cable running from comp to stb #1 and then cable interconnecting
    stb #1-#2 and #2-#3?

  9. #29
    Join Date
    Feb 2007
    Location
    Ardsley, NY
    Beans
    104
    Distro
    Ubuntu 14.04 Trusty Tahr

    Question Re: NEW -- mythchanger firewire channel changer

    Hello;

    I have Verizon Fios with a QIP7100 STB. The changer works if I use the "-f 6" or "-f 7" option. But I can not get the "-P" option to work. As you can see below it reports that it powered the box on but it does not. Is there anything that I am missing? Thanks.

    Code:
    lank23@ubuntu-desktop:~$ mythchanger -c 504 -f 6 -P -v
    
    mythchanger .10f beta
    
    Acquiring firewire handle... OK.
    1 port(s) found
    
    Acquiring handle on port 0... 1 devices detected.
    Skipping empty node 0
    Powering device on port 0 node 1 succeeded... pausing 5 seconds.
    STB Vendor ID: 0x2180 Model ID: 0x8100, (Using user selected channel changer #6)
    
    1 STB(s) found:
    -------------
    STB 1: port=0, node=1, changer=6, GUID=0x002180fffe4bab21

  10. #30
    Join Date
    Jan 2008
    Beans
    205

    Re: NEW -- mythchanger firewire channel changer

    Quote Originally Posted by majoridiot View Post
    source code for mythchanger version .10f beta has been posted at: https://wiki.ubuntu.com/majoridiot
    Thank you, increasing in-aptly named MajorIdiot. Mythchanger is a treat! My HD-PVR and I are very happy now.

Page 3 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •