rosenbjerg / FFMpegCore

A .NET FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your C# applications
MIT License
1.51k stars 276 forks source link

No error output message from failed execution of ffprobe. #520

Open ryno1234 opened 2 weeks ago

ryno1234 commented 2 weeks ago

I'm having an issue with my own rolled execution of ffprobe via the Process class where ffprobe would fail (because of a legitimate reason), but I couldn't capture the error through redirected StandardError. I was wondering if I was doing something wrong, so I decided to use FFMpegCore to do this tasks (which ultimately I probably will do anyway instead of utilize the Process class directly).

Same result - with FFMpegCore the error message isn't returned either.

If I execute ffprobe from the command prompt, I can see the error message so I know an error is occurring. I can also redirect that execution via ffprobe https://www.domain.com/my_bad_file.mp4 2> error.txt and the file contains the error message.

So, all this to say, 1) there is an error occurring, 2) I can prove that I can redirect the output when at a command prompt and see the error in a file, but 3) from .Net, (with my own Process implementation or from FFMpegCore can not get to the error message.

Is this a known bug with FFMpegCore, or with .Net in general?

(To be specific, the error that is occurring with my video file is an HTTP 403 - Forbidden)

tiesont commented 2 weeks ago

I'm having trouble tracking down where it was discussed, but I think (if memory serves) that the error is not logged into StandardError. I swear it's actually the root ffmpeg executable that does this, not this library. That is mostly hearsay, though, since (like I mentioned) I don't have a reference to back that up.

tiesont commented 2 weeks ago

Hmm... I might be conflating this with a different issue. Logging is all pushed through StandardError, which I think has confused people in the past.

ryno1234 commented 1 week ago

Thanks @tiesont.