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

[Bug Report] Panic when playing MP3 file as a scene #4109

Closed
yarsiemanym opened this issue Sep 11, 2023 · 1 comment
Closed

[Bug Report] Panic when playing MP3 file as a scene #4109

yarsiemanym opened this issue Sep 11, 2023 · 1 comment
Labels
bug report Bug reports that are not yet verified

Comments

@yarsiemanym
Copy link

yarsiemanym commented Sep 11, 2023

Describe the bug
Whenever I attempt to play an MP3 or an MP3 that has been converted to an MP4, the app panics and the container crashes.

To Reproduce

  1. Add MP3 to the list of known Video Extensions (Settings -> Library -> Media content extensions -> Video Extensions)
  2. Copy an MP3 file into the library directory.
  3. Scan to detect the new file.
  4. Select the new file in Scenes.
  5. Play the scene.
  6. The container crashes with the following error.
panic: runtime error: integer divide by zero

goroutine 73 [running]:
github.com/stashapp/stash/pkg/ffmpeg.VideoFilter.ScaleMaxLM({0x0?, 0x7f28912e08ef?}, 0x7?, 0xc0004ce380?, 0x6?, 0x30?, 0x7f28912e08ef?)
	github.com/stashapp/stash/pkg/ffmpeg/filter.go:65 +0xb9
github.com/stashapp/stash/pkg/ffmpeg.(*FFMpeg).hwMaxResFilter(0x7f2891c75400?, {0x7f28912e08ef, 0x7}, 0x0, 0x0, 0xc000204cf8?)
	github.com/stashapp/stash/pkg/ffmpeg/codec_hardware.go:167 +0xca
github.com/stashapp/stash/pkg/ffmpeg.(*runningStream).makeStreamArgs(0xc00021c780, 0xc0002e8700, 0x0)
	github.com/stashapp/stash/pkg/ffmpeg/stream_segmented.go:343 +0x994
github.com/stashapp/stash/pkg/ffmpeg.(*StreamManager).startTranscode(0xc0002e8700, 0xc00021c780, 0x0, 0xc000300de0)
	github.com/stashapp/stash/pkg/ffmpeg/stream_segmented.go:660 +0x269
github.com/stashapp/stash/pkg/ffmpeg.(*StreamManager).ensureTranscode(0xc000300e40?, 0xc0001dd794?, 0x2?)
	github.com/stashapp/stash/pkg/ffmpeg/stream_segmented.go:797 +0x76
github.com/stashapp/stash/pkg/ffmpeg.(*StreamManager).monitorStreams(0xc0002e8700)
	github.com/stashapp/stash/pkg/ffmpeg/stream_segmented.go:827 +0x2a9
github.com/stashapp/stash/pkg/ffmpeg.NewStreamManager.func1()
	github.com/stashapp/stash/pkg/ffmpeg/stream.go:67 +0x3f
created by github.com/stashapp/stash/pkg/ffmpeg.NewStreamManager
	github.com/stashapp/stash/pkg/ffmpeg/stream.go:63 +0x26d

Expected behavior
Play the audio from the MP3 file without any video.

Screenshots
N/A

Stash Version:

  • 0.22.1

Desktop:

  • OS: Ubuntu 22.04
  • Browser: Brave 1.57.62

Additional context
Why MP3s? Because /r/gonewildaudio is a thing. I'd like to be able to treat them as audio-only scenes.

I also tried converting the MP3 file to an MP4 and got the same error. I have a hunch the divide by 0 might be because the video has a resolution of 0. Are MP3s supported? If not, is there a workaround I can try?

@yarsiemanym yarsiemanym added the bug report Bug reports that are not yet verified label Sep 11, 2023
@WithoutPants
Copy link
Collaborator

Treating mp3 as video files is not a supported use case, and these sorts of errors would be expected.

There is no workaround that I'm aware of, short of re-encoding the mp3 files into mp4 files with a blank video using ffmpeg. See also existing feature request #1258.

@WithoutPants WithoutPants closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug reports that are not yet verified
Projects
None yet
Development

No branches or pull requests

2 participants