From e2696e47c57c5c71efaca7c8c422c0e4aed5c767 Mon Sep 17 00:00:00 2001 From: AlexPresso <15526962+AlexPresso@users.noreply.github.com> Date: Mon, 17 Apr 2023 18:20:18 +0200 Subject: [PATCH] Print stderr in ffmpeg.log (#67) --- .github/ISSUE_TEMPLATE/bug_report.md | 8 ++++---- ffmpeg-wrapper.sh | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 53ff018..caaaf01 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -35,11 +35,11 @@ A clear and concise description of what the bug is. - Copy paste those lines in a new [gist](https://gist.github.com/) - Add the gist link to the issue -## `ffmpeg-FFMxxxx.stderr` (containing chunks transcoding operations) -- When you ran `ls -al | grep ffmpeg` you should have seen another file that looks like `ffmpeg-FFMxxxx.stderr` -- Type `tail -100 ffmpeg-FFMxxxx.stderr` (replacing the filename by the correct one) +## `ffmpeg-xxxx.stderr` (containing chunks transcoding operations) +- When you ran `ls -al | grep ffmpeg` you should have seen another file that looks like `ffmpeg-xxxx.stderr` in case of error, the file may not be there, in that specific case, you can ignore these steps. +- Type `tail -100 ffmpeg-xxxx.stderr` (replacing the filename by the correct one) - Copy paste those lines in a new [gist](https://gist.github.com/) -- Type `head -300 ffmpeg-FFMxxxx.stderr` (replacing the filename by the correct one) +- Type `head -300 ffmpeg-xxxx.stderr` (replacing the filename by the correct one) - Copy paste those lines in another new [gist](https://gist.github.com/) - Copy paste all the gists links in the issue diff --git a/ffmpeg-wrapper.sh b/ffmpeg-wrapper.sh index 015cf1f..6c748d2 100644 --- a/ffmpeg-wrapper.sh +++ b/ffmpeg-wrapper.sh @@ -24,7 +24,10 @@ function info() { } function handle_error() { - log "ERROR" "Error on line $(caller)" + log "ERROR" "An error occurred, here is the $stderrfile content: " + newline + cat "$stderrfile" >> $logfile + newline errcode=1 endprocess }