[swfmill] stdin & stdout
Dan Shryock
dan.shryock at gmail.com
Thu May 10 12:58:01 EDT 2007
Steve,
I've recently been trying to use stdin and stdout from c# for piping
through ffmpeg, and I've had some luck as long as I use one thread for
feeding the stdin, and another thread for reading from stdout. It
works sometimes, but it doesn't seem reliable. When I don't use two
threads, I can't get it to work because it doesn't like when I push
too much or read more than is ready (I usually end up getting
deadlocks on the read from stdout at that point). I don't know if
this will help you, or if you have any ideas on why my situation isn't
working but I thought we might be able to help each other.
Dan Shryock
On 5/10/07, Killingbeck, Steve <killins at jostens.com> wrote:
> Hi Ralf,
>
> I am trying to use swfmill with a c# .net 2.0 batch engine I wrote...
>
> And run it inside of a thread... I think I figured it now... the idea is
> I just pass a new dynamic xml string to the stdin and it kicks out files
> from one process till I am done looping thousands of times...
>
> Here is what I have so far, I got it to work (this is inside of a
> thread)
> I am still having trouble with stdout though... I think it's a c# / .net
> issue now... I just have to figure the right way to work with stdout...
> It would be nice if there were some stdin/stdout examples with various
> languages, I have searched the web... not much out there :(
>
>
> <code>
> Process swfmill = new Process();
>
>
> swfmill.StartInfo.FileName = "C:\\Documents and
> Settings\\killins\\Desktop\\downloads\\swfmill\\swfmill-0.2.12-win32\\sw
> fmill.exe";
>
>
> swfmill.StartInfo.Arguments = "-v simple stdin "+
> DateTime.Now.TimeOfDay.Ticks + ".swf";
> swfmill.StartInfo.UseShellExecute = false;
> swfmill.StartInfo.CreateNoWindow = true;
> swfmill.StartInfo.WindowStyle =
> ProcessWindowStyle.Hidden;
> swfmill.StartInfo.RedirectStandardInput = true;
>
>
> swfmill.Start();
>
> string xmlString = "<?xml version=\"1.0\"
> encoding=\"iso-8859-1\" ?><movie width=\"320\" height=\"240\"
> framerate=\"12\"><background color=\"#ff0000\"/><frame/></movie> ";
> swfmill.StandardInput.WriteLine(xmlString);
> swfmill.StandardInput.Flush();
> swfmill.StandardInput.Close();
>
> </code>
>
>
>
> -----Original Message-----
> From: swfmill-bounces at osflash.org [mailto:swfmill-bounces at osflash.org]
> On Behalf Of Ralf Fuest
> Sent: Wednesday, May 09, 2007 4:10 PM
> To: swfmill at osflash.org
> Subject: Re: [swfmill] stdin & stdout
>
> Hello Steve,
> i just tried using stdin and stdout mode and it works.
>
> Whats your problem with it? Does it show any errors?
>
> Ralf
>
> > Has anyone used the stdin and stdout mode successfully?
> >
> >
> >
> > Such as:
> >
> >
> >
> > Swfmill simple stdin stdout
> >
> >
> >
> > Thanks!!!
>
>
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
More information about the swfmill
mailing list