[Gambas-user] Application goes wierd when running large EXEC command (with pic)

Fabien Bodard gambas.fr at ...626...
Tue Jan 1 21:26:40 CET 2008


Le Tuesday 01 January 2008 20:41:27 lozza1978, vous avez écrit :
> Hi All,
>
> in my application i have to run a large Exec command
> The command is
> EXEC  ["mencoder", "-oac", "lavc", "-ovc", "lavc", "-of", "mpeg",
> "-mpegopts", "format=dvd", "-vf", "scale=720:576,harddup",
> "-srate", "48000", "-af", "lavcresample=48000", "-lavcopts",
> "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=
>15:aspect=16/9:acodec=ac3:abitrate=192", "-ofps", "25", "-o", dvdmovie,
> Textbox1.Text] WAIT
>
> the command above converts sound &  movie to DVD format
> When running the command, my application seems to lockup, picture below
> http://www.nabble.com/file/p14569382/snapshot9.png
>
> I have found during debug that the application is still processing the EXEC
> command, but is there a way to stop the application to look as though it
> has locked up?
>

yes remove the WAIT command... it block the program since the exec process is 
not ended

then use process stream management to watch and drive the process
Like this :

EXEC  ["mencoder", "-oac", "lavc", "-ovc", "lavc", "-of", "mpeg",
 "-mpegopts", "format=dvd", "-vf", "scale=720:576,harddup",
 "-srate", "48000", "-af", "lavcresample=48000", "-lavcopts",
 "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=
15:aspect=16/9:acodec=ac3:abitrate=192", "-ofps", "25", "-o", dvdmovie,
 Textbox1.Text] AS "Mencoder"

PUBLIC SUB MenCoder_Error()
	Dim sLine as String
	Print "there is an error on processing"
	READ #LAST, sLine, -256
	Print sLine
END


PUBLIC SUB MemCoder_Read()

  DIM sLine AS String

  READ #LAST, sLine, -256

  Print sLine

END

PUBLIC SUB Contents_Kill()

  PRINT "Fin du processus"

END

 http://gambasdoc.org/help/comp/gb/process
> It could have something to do with me using the WAIT on the EXEC line, but
> if I do not use the wait the there is no way for the end user to know when
> the process has finished.
>
> Can anyone help shed some light on this for a newbie?
> thanks for reading.






More information about the User mailing list