Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Extract Cover Error" for files with multiple embedded covers #3529

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

asoluter
Copy link
Contributor

@asoluter asoluter commented Oct 17, 2024

I've encountered the same issue as in #2316 for files with multiple embedded covers (ex. Front and Back covers for disks)

2024-10-17 00:02:33.221455-07:00[2024-10-17 00:02:33.221] ERROR: [FfmpegHelpers] Extract Cover Error Error: ffmpeg exited with code 234: frame=    1 fps=0.0 q=11.2 Lq=6.8 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
2024-10-17 00:02:33.221494-07:00Conversion failed!

The issue comes from the input video stream selection which is not limited to a single video stream for ffmpeg, leading to the following error:

[image2 @ 000001c697da0440] The specified filename 'out.jpg' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 000001c697da0440] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[image2 @ 000001c697da0440] Cannot write more than one file with the same name. Are you missing the -update option or a sequence pattern?

The proposed change limits the input selection to a single video stream, fixing the error. (Good explanation here https://stackoverflow.com/a/63928441)

@asoluter
Copy link
Contributor Author

asoluter commented Oct 17, 2024

There's an alternative option to fix this using %03d as part of the output file path, which will copy all the embedded images in an enumerated format, but I didn't dig deep enough into the following processing, as it'll need to support multiple outputs from the cover extraction.

@advplyr
Copy link
Owner

advplyr commented Oct 17, 2024

In testing this I found out that this is not an issue with ffmpeg v5.1 which is what Abs is currently using. That's why there aren't more reports of this error and why I couldn't reproduce this error before.
I tested with ffmpeg v7 and was able to reproduce it.
This solution works for both versions.

Are you running an old version of Abs or using another install method with SkipBinaries env flag passed in?

@advplyr
Copy link
Owner

advplyr commented Oct 17, 2024

Thanks!

@advplyr advplyr merged commit 1c15007 into advplyr:master Oct 17, 2024
5 checks passed
@asoluter
Copy link
Contributor Author

I've got this using the latest version of TrueNAS 24.04 App, which just uses v2.15.0 Docker image from what I could gather.

@asoluter asoluter deleted the patch-1 branch October 18, 2024 02:48
@asoluter
Copy link
Contributor Author

@advplyr Just checked the image contents and it looks like it uses alpine/ffmpeg 6.1.1-r8 and not v5.1

@advplyr
Copy link
Owner

advplyr commented Oct 18, 2024

Ah yes, thanks. I forgot we switched back to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants