error control and error output of ffmpeg

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

error control and error output of ffmpeg

Pierpaolo Gullˆa
Hi guys ,

I'm creating a bash script that converts some videos in mpg.
I want to create a control system that if there is an error it sends to
me an email.

I'm following two street :

-take the standard error of ffmpeg

-take all the output message of ffmpeg and put into a pipe and analize it.


The problem with the second street is that in the pipe there are small
error like invalid backstep that for my sistem isn't error because these
files are good

My little question it's :
If ffmpeg crash or doesn't encode the video , it sends a simple error
signal that i can take ?


Thanks a lot

BR

Pierpaolo
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: error control and error output of ffmpeg

Benoit Fouet
Hi,

Pierpaolo Gullˆa wrote:

> Hi guys ,
>
> I'm creating a bash script that converts some videos in mpg.
> I want to create a control system that if there is an error it sends to
> me an email.
>
> I'm following two street :
>
> -take the standard error of ffmpeg
>
> -take all the output message of ffmpeg and put into a pipe and analize it.
>
>
> The problem with the second street is that in the pipe there are small
> error like invalid backstep that for my sistem isn't error because these
> files are good
>
> My little question it's :
> If ffmpeg crash or doesn't encode the video , it sends a simple error
> signal that i can take ?
>
>  

check the return value of the command
if it returns 0, it is ok, if it is one, it's ko

--
Ben
Purple Labs S.A.
www.purplelabs.com
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: error control and error output of ffmpeg

Michel Bardiaux-2
Benoit Fouet wrote:

> Hi,
>
> Pierpaolo Gullˆa wrote:
>> Hi guys ,
>>
>> I'm creating a bash script that converts some videos in mpg.
>> I want to create a control system that if there is an error it sends to
>> me an email.
>>
>> I'm following two street :
>>
>> -take the standard error of ffmpeg
>>
>> -take all the output message of ffmpeg and put into a pipe and analize it.
>>
>>
>> The problem with the second street is that in the pipe there are small
>> error like invalid backstep that for my sistem isn't error because these
>> files are good
>>
>> My little question it's :
>> If ffmpeg crash or doesn't encode the video , it sends a simple error
>> signal that i can take ?
>>
>>  
>
> check the return value of the command
> if it returns 0, it is ok, if it is one, it's ko
>
Mmm, I dont know, there are lots of in-between cases. Suppose you
transcode a very corrupt MPEG file. You will get messages from the codec
at many frames; still, ffmpeg goes on, because MPEG has been designed
especially with recovery in mind. You get KO only when the error is so
bad ffmpeg thinks recovery is impossible.

So, I think one has to parse stderr and decide for every kind of message.


--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:[hidden email]

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: error control and error output of ffmpeg

Pierpaolo Gullˆa
In reply to this post by Pierpaolo Gullˆa
Benoit Fouet wrote:

> > Hi,
> >
> > Pierpaolo Gull?a wrote:
>  
>> >> Hi guys ,
>> >>
>> >> I'm creating a bash script that converts some videos in mpg.
>> >> I want to create a control system that if there is an error it sends to
>> >> me an email.
>> >>
>> >> I'm following two street :
>> >>
>> >> -take the standard error of ffmpeg
>> >>
>> >> -take all the output message of ffmpeg and put into a pipe and analize it.
>> >>
>> >>
>> >> The problem with the second street is that in the pipe there are small
>> >> error like invalid backstep that for my sistem isn't error because these
>> >> files are good
>> >>
>> >> My little question it's :
>> >> If ffmpeg crash or doesn't encode the video , it sends a simple error
>> >> signal that i can take ?
>> >>
>> >>  
>>    
> >
> > check the return value of the command
> > if it returns 0, it is ok, if it is one, it's ko
>  

Mmm, I dont know, there are lots of in-between cases. Suppose you
transcode a very corrupt MPEG file. You will get messages from the codec
at many frames; still, ffmpeg goes on, because MPEG has been designed
especially with recovery in mind. You get KO only when the error is so
bad ffmpeg thinks recovery is impossible.

So, I think one has to parse stderr and decide for every kind of message.

> >
>  

Yes this is the problem , we have a lot of possibility to check and the only possibility it's to parse the standard error.

Do you know other ways to do this?


Thansk a lot


BR

Pierpaolo


p.s. there is a web reading interface for the mailing list like Lurker?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user