IT'S WORKING!!! excuse my excitement, but is freaking working, I can output
ffmpeg output into a text box in real time. Far out! It turned out to be a
pretty stupid thing, instead of listening for 'readyReadStandardOutput()' I
changed it to 'readyReadStandardError()', how couldn't I think of that before?
So, for everyone with the same problem, here's my code extract which runs
ffmpeg as a process and outputs its info into a text box:
...
Connect(btnStart, SIGNAL("clicked()"), this, SLOT("OnBtnStartClicked()"));
Connect(proc, SIGNAL("readyReadStandardError()"), this,
SLOT("OnProcessOutputReady()"));
...
[Q_SLOT]
private void OnBtnStartClicked() {
string source = txtSourceFile.Text;
string destination = txtDestinationFolder.Text + "/" +
txtDestinationFile.Text;
List<string> arguments = new List<string>();
arguments.Add("-i");
arguments.Add(source);
arguments.Add(destination);
if (CheckSourceInput() && CheckDestinationInput()) {
txtLog.Clear();
proc.Start(codec, arguments);
}
}
[Q_SLOT]
private void OnProcessOutputReady() {
proc.WaitForBytesWritten();
QByteArray output = proc.ReadAllStandardError();
String txtoutput = output.ConstData();
this.txtLog.Append(txtoutput);
}
------------------ Original Message ------------------
Subject: Re: [libav-user] How to read ffmpeg output?
Date: Tue, 23 Feb 2010
From: Alexander Bokovikov <[email protected]>
To: "Libav* user questions and discussions" <[email protected]>
>
> On 23.02.2010, at 9:50, Alex wrote:
>
> > What can I do with av_log_set_callback from C# and where do I get it
> > from? Is it
> > a .dll or an argument for ffmpeg executable? Thanks.
>
> Usually people use pipes for that purpose.
>
> HTA!
>
> -Alex
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user