[FFmpeg-devel] [RFC] Advanced Error Codes
Michael Niedermayer
michael at niedermayer.cc
Sat Aug 16 20:20:03 EEST 2025
Hi Nicolas
On Tue, Aug 12, 2025 at 04:43:29PM +0200, Nicolas George wrote:
> Michael Niedermayer (HE12025-08-03):
> > well, you may have deep call stacks
> >
> > user_app->libavfilter->libavformat->libavcodec->decoder->jpeg_decoder->...
> >
> > and the user of the user_app needs to know what file had what failure
> > so the error details must pass through all this.
> >
> > Some of the API calls failing here can be final calls that are
> > expected to leave nothing allocated on a failure return.
> >
> > also other subsequent and prior errors may have occured in some contexts
> > I thiink we want to be able to distingish what caused teh current error from
> > the previous or next
>
> Before we dig deeper into the technical details, we need to clarify what
> exactly you need to do.
yes, also to clarify this from my side.
This error code work originates from interrest of multiple companies
in wanting improvments in the error codes.
This interrest is far from clear, and there where intermediaries between
me and the companies who want this. So it involves some guesswork
but one thing that was mentioned was the error code return from
ffmpeg command line tool being not enough, and xerror also being
not enough as it always aborts.
>
> The subject of the thread evokes error messages. Error messages are
> meant for users, to give them the information they need to fix their
> issue: did they make a typo in the file name? did they forget to enable
> wifi? do they need to free some space on their hard drive? is there no
> solution because the file is too damaged?
This is about error codes, and i do not think anything that goes only to
the terminal will help.
It is not about a user or developer looking at the ffmpeg output. Because
there is no user, these are automated uses of ffmpeg.
Iam sure the number of FFmpeg instances they run is way too large for a
human to look through the output.
I believe they simple want richer error codes that provide more details
of why a instance failed
like not just "error" and maybe not just "OOM" but maybe
OOM in the mov demuxer reading file.mov at file position 5:12
id guess, they could then cluster these into similar issues, and pass
each cluster to a developer to investigate and fix
without that lets say you have a million failures, what do you do ?
you pick a random one and investgate and you cant do anything else
until you figured that one out because if you pick 5 you might pick
the same bug 5 times.
I think what they want is simply more details / vissibility into failures
[...]
>
> What I want to improve is error messages, to make it easier for
> applications to separate them from the noise of logs and display them in
> nice dialog boxes. We might get a few features helping debug at the same
> time, but it is not the main objective, and chasing two hares is a
> recipe for catching zero.
I think theres some similarity between what you are thinking of and what
the goals here are, but unless the companies themselfs speak up here in
public and clarify what exactly they want. Its guesswork for me
That said of course iam not just interrested in this because some company
wants it. But that was what brought the idea up of improved error codes
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"I am not trying to be anyone's saviour, I'm trying to think about the
future and not be sad" - Elon Musk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250816/bdab9e1f/attachment.sig>
More information about the ffmpeg-devel
mailing list