Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Play button does not work anymore

crotalus
2007-10-14
2013-04-24
  • crotalus
    crotalus
    2007-10-14

    Hi,

    I am using xvidcap 1.1.6 and when I try to play the created video,
    by pressing the play button, which calls mplayer, I get:

    XVFFRAME=0: Command not found.

    XVFILE: Undefined variable.

    This works fine with xvidcap-1.1.4p1

    Any suggestion?

    Thanks.

     
    • Prolly smth. around the way your shell does variable expansion. Try this:

      1 open a terminal
      2 from there run: xvidcap --mf --auto --file test.avi --frames 10
      3 start capture and let it stop
      4 hit play
      5 exit xvidcap
      6 back on the terminal run: echo $0
      7 and: env | grep -i shell

      Please send the terminal output of step 4 onwards.
      If step 7 returns nothing, try running "export SHELL=/bin/bash" (or whereever bash is for you) and rerun xvidcap.

      Karl.

       
    • crotalus
      crotalus
      2007-10-18

      [cascavel:~] xvidcap --mf --auto --file test.avi --frames 10
      [msmpeg4v2 @ 0xa5f4f0]removing common factors from framerate
      XVFFRAME=0: Command not found.
      XVFILE: Undefined variable.
      [1] 1094
      [1]    Exit 1                        ( XVFFRAME="0" XVLFRAME="10" XVWIDTH="1426" XVHEIGHT="400" XVFPS="10.000000"  ...
      [cascavel:~] echo $0
      tcsh
      [cascavel:~] env | grep -i shell
      SHELL=/bin/tcsh

      If I use bash, I get:

      [cascavel:~] bash
      [roma@cascavel ~]$ xvidcap --mf --auto --file test.avi --frames 10
      [msmpeg4v2 @ 0xa5f4f0]removing common factors from framerate
      XVFFRAME=0: Command not found.
      [1] 1298
      XVFILE: Undefined variable.
      [roma@cascavel ~]$ echo $0
      bash
      [roma@cascavel ~]$ env | grep -i shell
      SHELL=/bin/tcsh

      This is Fedora Core 6.

      Thanks.

       
      • fascinating, I have tested with a few bourne based variants and certainly bash.
        Could you try recompiling with -DDEBUG=1 (e. g. by make clean, editing config.h, and making again) and running again?

        Karl.

         
    • crotalus
      crotalus
      2007-10-20

      Maybe

      #define DDEBUG 1

      That seems to be the sintax in config.h.

      What does this option do? More verbose output?

      The source has been compiled with -g, so I can try to debug the code,
      but I did not see anything very different from 1.1.4 in this part.

      Anything special to look for?

       
    • You can expect much more vervose output. Most importantly, you will get the exact string that it sent to exec and we can work from there.
      The syntax for config.h should be "#define DEBUG 1" (without quotes). And only make the change after configure. So make distclean, ./autogen.sh , change config.h, make ... And test.

       
    • crotalus
      crotalus
      2007-10-21

      I did exactly what you said:

      configure
      make distclean
      ./autogen.sh
      Added #define DEBUG 1 in config.h
      make

      After the compilation, the file config.h had not the option DEBUG anymore,
      and I did not see any new message during the execution.

       
    • crotalus
      crotalus
      2007-10-21

      Then I changed configure, after make clean,
      and added -DDEBUG to CFLAGS

      xtoxwd.c: In function ‘xvc_xwd_save_frame’:
      xtoxwd.c:155: error: ‘Job’ has no member named ‘win_attr’
      xtoxwd.c:199: error: ‘Job’ has no member named ‘win_attr’
      xtoxwd.c:199: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
      make[2]: *** [xtoxwd.o] Error 1

      and the code does not compile anymore.

       
    • crotalus
      crotalus
      2007-10-21

      Well, I commented those two lines and finally:

      gnome_ui.c xvc_change_filename_display(): Leaving! ...continuing? 0
      gnome_ui.c xvc_frame_monitor(): Entering with time = 4
      gnome_ui.c xvc_frame_monitor(): Leaving with percent = 0 ... continuing? 0
      app_data.c xvc_command_execute(): Entering with flag '2'
      app_data.c xvc_command_execute(): calling: '/bin/tcsh -c 'XVFFRAME="0" XVLFRAME="43" XVWIDTH="192" XVHEIGHT="144" XVFPS="10.000000" XVTIME="100.000000" XVFILE="/home/roma/temp/videos/test-0000.mpeg" ; mplayer "${XVFILE}" &''
      [1] 22022
      app_data.c xvc_command_execute(): Leaving
      XVFFRAME=0: Command not found.
      XVFILE: Undefined variable.
      gnome_ui.c stop_recording_gui_stuff(): Leaving

      I hope this helps ....

       
    • Oh ... thanks for finding the compile errors with debug on.

      Rereading the thread it occured to me that it might help you to unset the SHELL environment variable before starting xvidcap as that should give you the old behaviour.

      I haven't tested this at all with any csh based shell, and it appears tcsh doesn't like the way I'm passing environment variables here. However, the error messages you posted for bash earlier point the same way ... And my bash certainly accepts it.

      Could please: Do the same thing again, the exit xvidcap and in the same shell manually try the command line above. Copy paste what's between the enclosing single quotes. It should start with /bin and end with '

      Then try with what's after the -c and eliminate the single quotes at the start end end, XVFRAME ... &

       
    • Or more simple and perhaps just as effective:

      BLA="huh" ; echo ${BLA}

      and:

      /bin/tcsh -c 'BLA="huh" ; echo ${BLA}'

       
    • crotalus
      crotalus
      2007-10-22

      Hi,

      unsetenv SHELL fix the problem. The play button plays the avi.

      Now, regarding your test:

      [cascavel:~/bitdir] /bin/tcsh -c 'BLA="huh" ; echo ${BLA}'
      BLA=huh: Command not found.
      BLA: Undefined variable.

      However,

      [cascavel:~/bitdir] /bin/tcsh -c 'set BLA="huh" ; echo ${BLA}'
      huh

      works. So the trick is to use the "set" command:

      http://heather.cs.ucdavis.edu/~matloff/UnixAndC/Unix/CShellI.html

      The problem with bash for me is that the SHELL variable keeps the value tcsh:

      [cascavel:~] bash
      [roma@cascavel ~]$ set | grep SHELL
      SHELL=/bin/tcsh
      SHELLOPTS=braceexpand:emacs:hashall:histexpand:interactive-comments:monitor

      I can write a wrapper script for calling xvidcap that will work for me,

      but maybe we can get a better solution.

      Can we continue this conversation using emails?

      Thanks.

       
    • crotalus
      crotalus
      2007-10-22

      The following script works for me:

      [cascavel:~/bin] more ~/bin/xvidcap.sh
      #!/bin/sh

      export SHELL=/bin/bash
      aoss xvidcap

       
    • Ah, that explains it.
      I'll have to put up my thinking cap to find out how to test for nature of the shell to use (though I loathe that) or how to pass enviroment variables to exec in a shell agnostic way ... Maybe first create a shell, set the environment, the fork ... Or smth. the like.

      Of course we can continue this conversation by mail.
      Thanks for helping track this down.

       
    • Actually it's fairly easy and I just hadn't every investigated this.
      I just committed an alternative app_data.c and would appreciate you testing it. Looks good here.

       
    • crotalus
      crotalus
      2007-10-22

      Hi,

      perfect. Everything is working. No more problems. Audio and video just fine.

      I patched the app_data.c from the original tarball and created a .src.rpm for Fedora.

      Should appear in ATrpms soon, I hope.

      http://people.atrpms.net/~pcavalcanti/srpms/xvidcap-1.1.6-9.fc6.src.rpm

      This is the description I used:

      xvidcap is a screen capture tool for creating videos off
      an X-Window desktop for illustration or documentation purposes.
      It is intended to be a standard-based alternative for
      commercial tools, such as Lotus ScreenCam or Camtasia Studio.

      Thanks, Karl.

      /Paulo Roma.