#70 Playback command is wrong

SVN
closed-fixed
Gtk2 GUI (20)
5
2007-03-30
2007-03-15
No

r1.1.5rc1 (BTW there is no Group entry for this version in bug tool)

The default playback command I have is:

animate "${XVFILE}" -delay $((XVTIME/10)) &

With default settings this issues the shell command:

/bin/bash -c 'XVFFRAME="0" XVLFRAME="1" XVWIDTH="192" XVHEIGHT="144" XVFPS="10.000000" XVTIME="100.000000" XVFILE="test-????.xwd" ; animate "${XVFILE}" -delay $((XVTIME/10)) &'

Which gives the error:
/bin/bash: 100.000000: syntax error in expression (error token is ".000000")

If I change $((XVTIME/10)) to ${XVTIME}/10 and run the same command in a shell then it works but the delay has no effect. This is because the -delay command is _after_ the filename. If I move it before the filename then the delay has an effect. The fixed line is:

/bin/bash -c 'XVFFRAME="0" XVLFRAME="1" XVWIDTH="192" XVHEIGHT="144" XVFPS="10.000000" XVTIME="100.000000" XVFILE="test-????.xwd" ; animate -delay ${XVTIME}/10 "${XVFILE}" &'

Discussion

  • Karl H. Beckers

    Karl H. Beckers - 2007-03-16

    Logged In: YES
    user_id=782084
    Originator: NO

    hmm, cannot reproduce quite the same effect.
    I can confirm that the position of the -delay parameter plays a role (moving that).
    I can also confirm that $((XVTIME/10)) does not work satisfactorily (after XVTIME has changed to a float)
    However, neither does bash complain for me, nor does ${XVTIME}/10 improve the situation.
    $(()) is for arithmetic expressions, try: echo $((30/5))
    However, with XVTIME containing a float, this all no longer works. Also, there is an easier way to get rid of the stupid 100 ticks per second default for animate, i. e. -delay "${XVTIME}x1000" with 1000 being 1000 ticks/s. This makes the ticks ms. which is what we have in XVTIME.

    am changing the command to the following in SVN:
    /bin/bash -c 'XVFFRAME="0" XVLFRAME="12" XVWIDTH="192" XVHEIGHT="144" XVFPS="10,000000" XVTIME="100,000000" XVFILE="test-????.xwd" ; animate -delay "${XVTIME%,*}x1000" "${XVFILE}" &'

     
  • Karl H. Beckers

    Karl H. Beckers - 2007-03-16
    • milestone: --> SVN
    • assigned_to: nobody --> charly4711
    • status: open --> pending-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.