-
Notifications
You must be signed in to change notification settings - Fork 14
Transcoder fails and panics #18
Copy link
Copy link
Open
Description
I have an AutoDJ stream mounted in /stream running with opus @ 192kbps, and I set up a transcoder in /fallback running mp3@256kbps, and the tinyice server crashed with these logs:
2026-03-25T20:14:58.629+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xfffc084d at position 839"}
2026-03-25T20:15:03.630+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:03.631+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xffe20024 at position 2680"}
2026-03-25T20:15:08.631+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:08.632+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xfffc00ad at position 6530"}
2026-03-25T20:15:13.633+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:13.633+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xfff40961 at position 8262"}
2026-03-25T20:15:18.633+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:18.634+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: is_pos was too big: 576"}
2026-03-25T20:15:23.635+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:23.635+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: only layer3 (want 1; got 3) is supported"}
2026-03-25T20:15:28.636+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:33.638+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:33.638+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: only layer3 (want 1; got 3) is supported"}
2026-03-25T20:15:38.639+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:38.639+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: only layer3 (want 1; got 3) is supported"}
2026-03-25T20:15:43.640+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:43.640+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xffff07fc at position 199"}
2026-03-25T20:15:48.641+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
2026-03-25T20:15:48.642+0100 ERROR relay/transcode.go:148 Transcoder: Failed to initialize decoder {"name": "KPOP Fallback", "input": "/kpop/stream", "error": "mp3: free bitrate format is not supported. Header word is 0xffe500f4 at position 6540"}
2026-03-25T20:15:53.642+0100 INFO relay/transcode.go:135 Transcoder: Input stream found, initializing... {"name": "KPOP Fallback", "input": "/kpop/stream"}
panic: runtime error: index out of range [38] with length 38
goroutine 1188 [running]:
github.com/hajimehoshi/go-mp3/internal/maindata.getScaleFactorsMpeg2(0xc0004aa8a0, 0xfff3bb01, 0xc000ac3080)
/home/runner/go/pkg/mod/github.com/hajimehoshi/go-mp3@v0.3.4/internal/maindata/maindata.go:166 +0x3d0
github.com/hajimehoshi/go-mp3/internal/maindata.Read({0x7f026d1dce20, 0xc0004aa870}, 0x0, 0xfff3bb01, 0xc000ac3080)
/home/runner/go/pkg/mod/github.com/hajimehoshi/go-mp3@v0.3.4/internal/maindata/maindata.go:111 +0x12a
github.com/hajimehoshi/go-mp3/internal/frame.Read({0x1371f20, 0xc0004aa870}, 0x0?, 0x0)
/home/runner/go/pkg/mod/github.com/hajimehoshi/go-mp3@v0.3.4/internal/frame/frame.go:97 +0x21c
github.com/hajimehoshi/go-mp3.(*Decoder).readFrame(0xc000113860)
/home/runner/go/pkg/mod/github.com/hajimehoshi/go-mp3@v0.3.4/decode.go:42 +0x2e
github.com/hajimehoshi/go-mp3.NewDecoder({0x13705a0, 0xc0003c7090})
/home/runner/go/pkg/mod/github.com/hajimehoshi/go-mp3@v0.3.4/decode.go:217 +0xa9
github.com/DatanoiseTV/tinyice/relay.(*TranscoderManager).performTranscode(0xc000403ad0, {0x13785c0, 0xc0000f8550}, 0xc0000f85a0)
/home/runner/work/tinyice/tinyice/relay/transcode.go:146 +0x3a5
github.com/DatanoiseTV/tinyice/relay.(*TranscoderManager).runTranscoder(0xc000403ad0, {0x13785c0, 0xc0000f8550}, 0xc0000f85a0)
/home/runner/work/tinyice/tinyice/relay/transcode.go:106 +0x212
created by github.com/DatanoiseTV/tinyice/relay.(*TranscoderManager).StartTranscoder in goroutine 1144
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels