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

Jason Lewis jasonblewis at gmail.com
Thu Sep 29 22:29:02 UTC 2011


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


More information about the mythtv-users mailing list