[mythtv-users] Playback problem -- random short pauses

Mark Boyum mark at boyum.us
Sat Oct 1 21:56:56 UTC 2011


On Sat, Oct 1, 2011 at 1:51 PM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
> On Thu, Sep 29, 2011 at 6:29 PM, Jason Lewis <jasonblewis at gmail.com> wrote:
>> On 30/09/11 7:02 AM, Steven Adeff wrote:
>>> On Thu, Sep 29, 2011 at 3:59 PM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
>>>> On Thu, Sep 29, 2011 at 1:09 PM, Dan Wilga
>>>> <mythtv-users2 at dwilga-linux1.amherst.edu> wrote:
>>>>> On 9/29/11 12:18 PM, Mark Boyum wrote:
>>>>>> nice -n 19 mythpreviewgen.real $1 $2 $3 $4 $5 $6 $7 $8
>>>>>>
>>>>> Assuming the shell that runs this script is bash, you can change that
>>>>> last line to:
>>>>>
>>>>>   nice -n 19 mythpreviewgen.real $*
>>>>>
>>>>> That way, any number of parameters will always be passed along.
>>>>>
>>>>> --
>>>>> Dan Wilga                                                        "Ook."
>>>> so,
>>>>
>>>> #!/bin/bash
>>>>
>>>> # Script to reduce CPU impact of preview generation at the end of a recording.
>>>> # mv /usr/bin/mythpreviewgen to /usr/bin/mythpreviewgen.real
>>>> # copy this script to /usr/bin/mythpreviewgen and make it executable,
>>>> # chmod 755 /usr/bin/mythpreviewgen
>>>>
>>>> nice -n 19 mythpreviewgen.real $*
>>>>
>>> doesn't work for me,
>>> Preview Error: Encountered problems running '/usr/bin/mythpreviewgen
>>> --size 0x0 --chanid 8901 --starttime 20110928205900 --outfile
>>> "/media/myth/2/tv/8901_20110928205900.mpg.png"  > /dev/null'
>>>
>>>
>>>
>> Actually, I  believe the best practice way to achieve this is to use "$@"
>>
>> "The difference between $@ and $*: Unquoted (don't do this!), none at
>> all: both equal $1 $2, with double quotes, "$@"
>>                expands each element as an argument: "$1" "$2" ...,
>> while "$*" expands to all elements merged into one argument:
>> "$1c$2c..."  (where c is the first character of IFS). You almost always
>> want "$@". The same goes for arrays: "${myarray[@]}"
>>
>> That may solve the issue.
>>
>> Further info here: http://stefaanlippens.net/node/85
>>
>> Jason
>
> I tried with just the $1 $2...
> and all that happens is mythpreviewgen.real doesn't run correctly and
> never creates a preview image. could perhaps be because it's running
> bash and not dash?
>
> going to try it with /bin/sh and see what happens...
>
>
>
> --
> Steve

I'm running it with the suggested $* and it is working fine.  Not sure
if it has improved the pauses as we haven't watched while recording
yet.  But time will tell.


More information about the mythtv-users mailing list