OpenBagTwo / FoxNap

A survival-, multiplayer- and copyright-friendly mod for adding custom music discs to your world
GNU General Public License v3.0
1 stars 1 forks source link

Resourcepack Generator errors out if FFmpeg can't extract album art #53

Closed MrGenie151 closed 2 months ago

MrGenie151 commented 3 months ago

Hello! I recently wanted to try Fox Nap for my Minecraft server, but I ran into a quick roadblock: The Pack Gen is not working. I've been looking for a good custom music disc mod, and Fox Nap seems to be the solution for my server. However, the Pack Gen is erroring out. I know Python, and maybe I should submit a PR myself, but I'll still inform you of the issue via a Github issue. The error it gives me reads:

Traceback (most recent call last):
  File "launcher.py", line 4, in <module>
  File "foxnap_rpg\cli.py", line 260, in main
  File "foxnap_rpg\pack_generator.py", line 244, in generate_resource_pack
  File "foxnap_rpg\pack_generator.py", line 448, in extract_album_art
  File "ffmpeg\_run.py", line 325, in run
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

Hope this helps and that the error can be fixed soon!

OpenBagTwo commented 3 months ago

Thanks for the report. How are you "installing" and running the pack generator?

If you're using your system's ffmpeg--as opposed to the one included in the binary distribution--it may not include the necessary codecs or the API might have changed.

MrGenie151 commented 3 months ago

I think I was using my system binaries. I didn't see anything else in the ZIP I downloaded from the releases.

On Tue, Apr 2, 2024, 9:00 AM Gili Barlev @.***> wrote:

Thanks for the report. How are you "installing" and running the pack generator?

If you're using your system's ffmpeg--as opposed to the one included in the binary distribution--it may not include the necessary codecs or the API might have changed.

— Reply to this email directly, view it on GitHub https://github.com/OpenBagTwo/FoxNap/issues/53#issuecomment-2031979407, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZZ64ZPJMNDSPSVQSMOJGLY3KTVZAVCNFSM6AAAAABFROEIW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZRHE3TSNBQG4 . You are receiving this because you authored the thread.Message ID: @.***>

OpenBagTwo commented 3 months ago

which zip did you download? And how are you running it?

MrGenie151 commented 2 months ago

I'm on Windows, and downloaded the Windows EXE file.

On Tue, Apr 2, 2024 at 2:50 PM Gili Barlev @.***> wrote:

which zip did you download? And how are you running it?

— Reply to this email directly, view it on GitHub https://github.com/OpenBagTwo/FoxNap/issues/53#issuecomment-2032812536, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZZ644GMO3X42S46AI5KALY3L4WDAVCNFSM6AAAAABFROEIW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSHAYTENJTGY . You are receiving this because you authored the thread.Message ID: @.***>

OpenBagTwo commented 2 months ago

Got it. And how are you running it? The expectation is that most users are just double-clicking the EXE, but if you're able to report a stack trace, then you must be running it in some sort of terminal.

Are you using the standard Windows command line or Powershell (and if the latter, which version?). Are you running it with any command-line arguments or flags?

MrGenie151 commented 2 months ago

I tried double-clicking first, but then to see what the problem was I ran it through standard Command Prompt with no command line arguments or flags. (I would still like to retain the album-to-disc image generation as my tracks have the metadata)

On Tue, Apr 2, 2024, 5:00 PM Gili Barlev @.***> wrote:

Got it. And how are you running it? The expectation is that most users are just double-clicking the EXE, but if you're able to report a stack trace, then you must be running it in some sort of terminal.

Are you using the standard Windows command line or Powershell (and if the latter, which version?). Are you running it with any command-line arguments or flags?

— Reply to this email directly, view it on GitHub https://github.com/OpenBagTwo/FoxNap/issues/53#issuecomment-2033090435, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZZ644B2P564LNVULQDK53Y3ML73AVCNFSM6AAAAABFROEIW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZTGA4TANBTGU . You are receiving this because you authored the thread.Message ID: @.***>

OpenBagTwo commented 2 months ago

Try running it again with the --verbose flag, and let's see if we can get the ffmpeg error out. At the very least, it should tell us which track it's fumbling on.

MrGenie151 commented 2 months ago

Alright, here's the ouput with the verbose flag:

2024-04-04 07:48:42,747 - foxnap_rpg.cli - DEBUG - Searching .
2024-04-04 07:48:43,819 - foxnap_rpg.cli - DEBUG - Found music file 01 - Luminescence.ogg
2024-04-04 07:48:43,939 - foxnap_rpg.cli - DEBUG - Found music file 02 - LOVESICK.ogg
2024-04-04 07:48:44,083 - foxnap_rpg.cli - DEBUG - Found music file 03 - ANTIHUMAN (feat. Stephanafro).ogg
2024-04-04 07:48:44,187 - foxnap_rpg.cli - DEBUG - Found music file 04 - NOTORIOUS.ogg
2024-04-04 07:48:44,288 - foxnap_rpg.cli - DEBUG - Found music file 05 - GIZABYTE.ogg
2024-04-04 07:48:44,394 - foxnap_rpg.cli - DEBUG - Found music file 06 - Sweet Little Lies (feat. Shwabadi & RET TRO).ogg
2024-04-04 07:48:44,496 - foxnap_rpg.cli - DEBUG - Found music file 07 - System Error.ogg
2024-04-04 07:48:44,712 - foxnap_rpg.cli - DEBUG - Found music file 08 - Forgotten.ogg
2024-04-04 07:48:44,815 - foxnap_rpg.cli - DEBUG - Found music file 09 - SAHARA.ogg
2024-04-04 07:48:45,055 - foxnap_rpg.cli - DEBUG - Found music file 10 - Blue Bird (feat. YonKaGor).ogg
2024-04-04 07:48:45,170 - foxnap_rpg.cli - DEBUG - Found music file 11 - Fratricide.ogg
2024-04-04 07:48:45,296 - foxnap_rpg.cli - DEBUG - Found music file 12 - TOKYO ANNIVERSARY (MRSHLMusic Remix).ogg
2024-04-04 07:48:45,390 - foxnap_rpg.cli - DEBUG - Found music file 13 - Soul Astray.ogg
2024-04-04 07:48:45,483 - foxnap_rpg.cli - DEBUG - Found music file 14 - Ninth Life.ogg
2024-04-04 07:48:45,634 - foxnap_rpg.pack_generator - INFO - Skipping license file--none specified.
2024-04-04 07:48:45,634 - foxnap_rpg.pack_generator - INFO - Setting license level to 4
2024-04-04 07:48:45,635 - foxnap_rpg.pack_generator - INFO - Writing pack.mcmeta
2024-04-04 07:48:45,636 - foxnap_rpg.pack_generator - INFO - Copying pack icon
2024-04-04 07:48:45,638 - foxnap_rpg.pack_generator - INFO - Beginning music track conversion
2024-04-04 07:48:45,638 - foxnap_rpg.pack_generator - INFO - Converting '01 - Luminescence.ogg'
2024-04-04 07:48:45,639 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 01 - Luminescence.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_1.ogg -y
2024-04-04 07:48:49,365 - foxnap_rpg.pack_generator - INFO - Converting '02 - LOVESICK.ogg'
2024-04-04 07:48:49,366 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 02 - LOVESICK.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_2.ogg -y
2024-04-04 07:48:52,573 - foxnap_rpg.pack_generator - INFO - Converting '03 - ANTIHUMAN (feat. Stephanafro).ogg'
2024-04-04 07:48:52,573 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 03 - ANTIHUMAN (feat. Stephanafro).ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_3.ogg -y
2024-04-04 07:48:55,540 - foxnap_rpg.pack_generator - INFO - Converting '04 - NOTORIOUS.ogg'
2024-04-04 07:48:55,540 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 04 - NOTORIOUS.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_4.ogg -y
2024-04-04 07:48:57,793 - foxnap_rpg.pack_generator - INFO - Converting '05 - GIZABYTE.ogg'
2024-04-04 07:48:57,794 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 05 - GIZABYTE.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_5.ogg -y
2024-04-04 07:49:00,623 - foxnap_rpg.pack_generator - INFO - Converting '06 - Sweet Little Lies (feat. Shwabadi & RET TRO).ogg'
2024-04-04 07:49:00,624 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 06 - Sweet Little Lies (feat. Shwabadi & RET TRO).ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_6.ogg -y
2024-04-04 07:49:02,839 - foxnap_rpg.pack_generator - INFO - Converting '07 - System Error.ogg'
2024-04-04 07:49:02,839 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 07 - System Error.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_7.ogg -y
2024-04-04 07:49:07,277 - foxnap_rpg.pack_generator - INFO - Converting '08 - Forgotten.ogg'
2024-04-04 07:49:07,277 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 08 - Forgotten.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_8.ogg -y
2024-04-04 07:49:09,437 - foxnap_rpg.pack_generator - INFO - Converting '09 - SAHARA.ogg'
2024-04-04 07:49:09,437 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 09 - SAHARA.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_9.ogg -y
2024-04-04 07:49:15,124 - foxnap_rpg.pack_generator - INFO - Converting '10 - Blue Bird (feat. YonKaGor).ogg'
2024-04-04 07:49:15,125 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 10 - Blue Bird (feat. YonKaGor).ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_10.ogg -y
2024-04-04 07:49:17,999 - foxnap_rpg.pack_generator - INFO - Converting '11 - Fratricide.ogg'
2024-04-04 07:49:18,000 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 11 - Fratricide.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_11.ogg -y
2024-04-04 07:49:20,841 - foxnap_rpg.pack_generator - INFO - Converting '12 - TOKYO ANNIVERSARY (MRSHLMusic Remix).ogg'
2024-04-04 07:49:20,841 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 12 - TOKYO ANNIVERSARY (MRSHLMusic Remix).ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_12.ogg -y
2024-04-04 07:49:23,891 - foxnap_rpg.pack_generator - INFO - Converting '13 - Soul Astray.ogg'
2024-04-04 07:49:23,891 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 13 - Soul Astray.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_13.ogg -y
2024-04-04 07:49:26,588 - foxnap_rpg.pack_generator - INFO - Converting '14 - Ninth Life.ogg'
2024-04-04 07:49:26,589 - foxnap_rpg.pack_generator - DEBUG - Converting using the following command: ffmpeg -i 14 - Ninth Life.ogg -map 0:a -ac 1 -acodec libvorbis C:\Users\bj\AppData\Local\Temp\tmpclck7fhw\assets\foxnap\sounds\track_14.ogg -y
2024-04-04 07:49:29,477 - foxnap_rpg.pack_generator - INFO - Music track conversion complete
2024-04-04 07:49:29,477 - foxnap_rpg.pack_generator - INFO - Writing sound registry
2024-04-04 07:49:29,480 - foxnap_rpg.pack_generator - INFO - Writing record item model jsons
2024-04-04 07:49:29,534 - foxnap_rpg.pack_generator - INFO - Beginning record item texture generation
2024-04-04 07:49:29,534 - foxnap_rpg.pack_generator - INFO - Creating texture for '01 - Luminescence.ogg'
2024-04-04 07:49:29,535 - foxnap_rpg.pack_generator - INFO - Attempting to extract inlay from album art for '01 - Luminescence.ogg'
Traceback (most recent call last):
  File "launcher.py", line 4, in <module>
  File "foxnap_rpg\cli.py", line 260, in main
  File "foxnap_rpg\pack_generator.py", line 244, in generate_resource_pack
  File "foxnap_rpg\pack_generator.py", line 448, in extract_album_art
  File "ffmpeg\_run.py", line 325, in run
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)
[38128] Failed to execute script 'launcher' due to unhandled exception!
OpenBagTwo commented 2 months ago

Thanks. So we have confirmation that FFmpeg is able to convert the audio and it's just tripping up on the album art extraction. That ultimately should throw a warning and shouldn't crash out the whole process.

Additionally, there needs to be some way to get at the reason why FFmpeg failed here, and the "stderr output" mentioned is being swallowed.

I'll work on getting a fix out ASAP. In the meantime, can you try generating the pack again without "Luminescence.ogg" and see if it works?

OpenBagTwo commented 2 months ago

@MrGenie151 I'd love it if you could test this again using the beta build of the resource pack generator, as I've been unable to reproduce this issue on my end.

OpenBagTwo commented 2 months ago

Closing for now. If the issue persists, feel free to re-open.