jellyfin-expo: Flac file won't play on Iphone - fails with ffmpeg error

Describe the bug Playing a flac file on iphone in either the app or in firefox shows the file playing but no sound. Playing the same file on the server via firefox works ok

To Reproduce Play a FLAC music file on iphone via testflight app or in browser

Expected behavior file plays ( with sound)

Logs

http://192.168.0.10:8096/Audio/10b66951da219c3a06ccf6a74a321089/hls1/main/20.aac?UserId=44f60de0f07d4206ba44db2e77fe47aa&DeviceId=TW96aWxsYS81LjAgKGlQaG9uZTsgQ1BVIGlQaG9uZSBPUyAxMl8zXzEgbGlrZSBNYWMgT1MgWCkgQXBwbGVXZWJLaXQvNjA1LjEuMTUgKEtIVE1MLCBsaWtlIEdlY2tvKSBNb2JpbGUvMTVFMTQ4fDE1NzUwMzczMzE0MDM1&MaxStreamingBitrate=800000&Container=mp3%7Cmp3%2Caac%2Cm4a%7Caac%2Cflac%2Cwav&TranscodingContainer=aac&TranscodingProtocol=hls&AudioCodec=aac&api_key=1bf0afbeb5d341418020119642f8c66c&PlaySessionId=1575051617482&StartTimeTicks=0&EnableRedirection=true&EnableRemoteMedia=false&SegmentContainer=aac

{"Protocol":"File","Id":"10b66951da219c3a06ccf6a74a321089","Path":"/data/muziek/Amon Amarth/2008 Twilight Of The Thunder God/01 Twilight Of The Thunder God.flac","Type":"Default","Container":"flac","Size":32282954,"Name":"01 Twilight Of The Thunder God","IsRemote":false,"ETag":"7231f653b9d99aeed300dc208954a357","RunTimeTicks":2487470080,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":true,"MediaStreams":[{"Codec":"flac","TimeBase":"1/44100","CodecTimeBase":"1/44100","DisplayTitle":"FLAC stereo","IsInterlaced":false,"ChannelLayout":"stereo","BitDepth":16,"Channels":2,"SampleRate":44100,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"Formats":[],"Bitrate":1038259,"RequiredHttpHeaders":{}}

/usr/lib/jellyfin-ffmpeg/ffmpeg -ss 00:01:00.000 -i file:"/data/muziek/Amon Amarth/2008 Twilight Of The Thunder God/01 Twilight Of The Thunder God.flac" -map_metadata -1 -map_chapters -1 -threads 0   -acodec aac -strict experimental -ac 2 -vn -f hls -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time 3 -individual_header_trailer 0 -hls_segment_type aac -start_number 0 -hls_segment_filename "/var/lib/jellyfin/transcoding-temp/transcodes/transcodes/transcodes/transcodes/7326e8e4af757c334d22674e53c1af1e%d.aac" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcoding-temp/transcodes/transcodes/transcodes/transcodes/7326e8e4af757c334d22674e53c1af1e.m3u8"


ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
  configuration: --toolchain=hardened --prefix=/usr --target-os=linux --enable-cross-compile --extra-cflags=--static --enable-gpl --enable-static --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-libfontconfig --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libwebp --enable-libx264 --enable-libx265 --enable-libzvbi --enable-omx --enable-omx-rpi --enable-version3 --enable-vaapi --enable-vdpau --arch=amd64 --enable-nvenc --enable-nvdec
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, flac, from 'file:/data/muziek/Amon Amarth/2008 Twilight Of The Thunder God/01 Twilight Of The Thunder God.flac':
  Metadata:
    ALBUM           : Twilight of the Thunder God
    album_artist    : Amon Amarth
    ARTIST          : Amon Amarth
    date            : 2008
    genre           : Metal
    TITLE           : Twilight of the Thunder God
    track           : 01
  Duration: 00:04:08.75, start: 0.000000, bitrate: 1038 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> aac (native))
Press [q] to stop, [?] for help
[hls muxer @ 0x56486bdd8f40] [Eval @ 0x7ffe8f62d890] Undefined constant or missing '(' in 'aac'
[hls muxer @ 0x56486bdd8f40] Unable to parse option value "aac"
[hls muxer @ 0x56486bdd8f40] Error setting option hls_segment_type to value aac.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
[aac @ 0x56486bddb140] Qavg: -nan
Conversion failed!

System :

  • OS: [Kubuntu 19.04 x86_64]
  • Browser: [e.g. Firefox, Chrome, Safari]
  • Jellyfin Version: [10.4.2-1]
  • Reverse proxy: [none, on LAN]

Additional context works fine on Jellyfin version: “10.3.7.0”

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

The PR jellyfin/jellyfin#2216 should also fix this problem. I tested the flac playback on iPhone and it works.