u2takey / ffmpeg-go

golang binding for ffmpeg
Apache License 2.0
1.76k stars 172 forks source link

Error handling #10

Closed JamesTiberiusKirk closed 3 years ago

JamesTiberiusKirk commented 3 years ago

Hi quick question. In a very specific env I keep getting exit status 1 and I have no idea how to go about troubleshooting this.

For context: docker image with alpine linux on my arch linux development machine works fine same docker image on a digital ocean vps returns exit status one from ffmpeg

u2takey commented 3 years ago

it's true problem that ffmpeg-go do not print enough error detail for troubleshooting. I will do some work to optimize that. For now, you can just use method GetArgs() which print all args generated for command ffmpeg, and run command ffmpeg manually with these args, do this will get you more information about the failure.

JamesTiberiusKirk commented 3 years ago

Right I see, thanks!

I'll let you close this issue if you wanna get rid of it.

u2takey commented 3 years ago

In this pr: https://github.com/u2takey/ffmpeg-go/pull/12, an option: ErrorToStdOut, WithErrorOutput and is imported, with which error output from FFmpeg will be ouputed to stdout or a writer