advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
6.69k stars 473 forks source link

[Bug]: Podcasts/Audiobooks do NOT play in browser #3413

Closed sharinganthief closed 1 month ago

sharinganthief commented 1 month ago

What happened?

Click play on a recent audiobook - which plays fine in the app - and the spinner spins forever, never beginning playback

What did you expect to happen?

The audiobook to play as in the app

Steps to reproduce the issue

  1. Go to any book
  2. Hit play
  3. Cry

Audiobookshelf version

2.13.4

How are you running audiobookshelf?

Windows Tray App

What OS is your Audiobookshelf server hosted from?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Edge

Logs

2024-09-13 12:22:03.741

INFO

[SocketAuthority] Socket Connected rGB-hWGx8ZUqcw88AAAD

2024-09-13 12:22:12.338

INFO

[STREAM] START STREAM - Num Segments: 5764

2024-09-13 12:22:12.340

INFO

[STREAM] Starting Stream at startTime 1:08.0 (User startTime 1:38.0) and Segment #11

2024-09-13 12:22:12.604

INFO

[INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -ss 68.2s -noaccurate_seek -i C:\Users\Phi\AppData\Local\Audiobookshelf\metadata\streams\cc1042c6-4d9f-41e7-98a2-f6f44d4869b1\files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 11 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename C:\Users\Phi\AppData\Local\Audiobookshelf\metadata\streams\cc1042c6-4d9f-41e7-98a2-f6f44d4869b1\output-%d.ts C:\Users\Phi\AppData\Local\Audiobookshelf\metadata\streams\cc1042c6-4d9f-41e7-98a2-f6f44d4869b1\final-output.m3u8

2024-09-13 12:22:12.604

INFO

2024-09-13 12:22:14.620

INFO

[STREAM] cc1042c6-4d9f-41e7-98a2-f6f44d4869b1 notifying client that stream is ready

2024-09-13 12:22:14.622

INFO

[STREAM-CHECK] Check Files 1396 of 5764 24.22% Furthest Segment: 1406

2024-09-13 12:22:16.622

INFO

[STREAM-CHECK] Check Files 3006 of 5764 52.15% Furthest Segment: 3016

2024-09-13 12:22:18.620

INFO

[STREAM-CHECK] Check Files 4507 of 5764 78.19% Furthest Segment: 4517

2024-09-13 12:22:20.315

INFO

[FFMPEG] Transcoding ended

Additional Notes

Chrome, Edge, Firefox, Opera GX tried Digging into the logs and the produced .ts files, there does not appear to be any audio stream, ffprobe output below:


  Duration: 00:00:05.67, start: 6050.846000, bitrate: 46 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 98314 for input stream 0```
files.txt looks good and i have no clue about the playlist files but they look "right" at first glance
sharinganthief commented 1 month ago

ok, tried a on off that happened to work, investigating the files - working are AAC and broken are Vorbis audio

sharinganthief commented 1 month ago

ok, fixed for my local primary docker instance - Stream.js

get codecsToForceAAC() { return [ 'alac','vorbis' ] } get isAACEncodable() { return ['mp4', 'm4a', 'm4b', 'mka'].includes(this.tracksAudioFileType) }

i could pr but i have some other changes i dont want to get in and im probably in the minority of mka with vorbis users