2024-09-27, 01:02 PM
I recently moved my Jellyfin setup from one VM to another. I'm running Jellyfin using Docker, whatever the latest version is at the time of posting this. I'm unable to transcode because I keep getting an ffmpeg error. See the following ffmpeg log entry:
When I access the Docker container's shell, I'm able to run the exact same /usr/lib/jellyfin-ffmpeg/ffmpeg command as above and the process completes with no problem. I imagine I have some kind of file permission issue, but I don't understand why I'm able to manually run the command, while it fails when Jellyfin runs it.
Any help is greatly appreciated!
Code:
{"Protocol":0,"Id":"640eb9fd78a4666d2e4d6358ed769cb4","Path":"/general-media/music/The Charlie Daniels Band/Me and the Boys/10 - Drinkin\u0027 My Baby Goodbye.flac","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"flac","Size":28157412,"Name":"10 - Drinkin\u0027 My Baby Goodbye","IsRemote":false,"ETag":"8435ff89064aabd6c7072c377e2014d7","RunTimeTicks":2209333330,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":null,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"flac","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/44100","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"FLAC - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"stereo","BitRate":1019580,"BitDepth":16,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":44100,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"mjpeg","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"bt470bg","ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":"Cover (front)","TimeBase":"1/90000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":null,"NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":null,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":449,"Width":449,"AverageFrameRate":null,"RealFrameRate":90000,"Profile":"Baseline","Type":3,"AspectRatio":"1:1","Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuvj420p","Level":-99,"IsAnamorphic":false}],"MediaAttachments":[],"Formats":[],"Bitrate":1019580,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -i file:"/general-media/music/The Charlie Daniels Band/Me and the Boys/10 - Drinkin' My Baby Goodbye.flac" -threads 0 -vn -ab 128000 -ac 2 -acodec libopus -id3v2_version 3 -write_id3v1 1 -y "/config/transcodes/68493a3c7718b93fd4be2c6f0cc02a02.ogg"
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Input #0, flac, from 'file:/general-media/music/The Charlie Daniels Band/Me and the Boys/10 - Drinkin' My Baby Goodbye.flac':
Metadata:
track : 10
GENRE : Country
ALBUM : Me and the Boys
TOTALTRACKS : 10
DATE : 1985
disc : 1
REPLAYGAIN_TRACK_PEAK: 1.000000000
REPLAYGAIN_TRACK_GAIN: -5.41 dB
ARTIST : The Charlie Daniels Band
ENCODED-BY : Deputy Dawg and a Nation of Thieves®©
ENCODER : reference libFLAC 1.2.1 20070917
REPLAYGAIN_ALBUM_PEAK: 1.000000000
REPLAYGAIN_ALBUM_GAIN: -4.52 dB
COMPOSER : Charlie Daniels
TOTALDISCS : 1
LENGTH : 220933
URL : http://www.charliedaniels.com
album_artist : The Charlie Daniels Band
TITLE : Drinkin' My Baby Goodbye
ACOUSTID_ID : 437a0575-6d85-4597-9f41-872a9abd8eb2
MUSICBRAINZ_RELEASEGROUPID: 61c9e12b-4f2f-362d-a1a4-3d3def23762e
ORIGINALDATE : 1985
ORIGINALYEAR : 1985
RELEASETYPE : album
MUSICBRAINZ_ALBUMID: 2a485fa0-b0fe-4912-bf41-2bf1a19981e8
SCRIPT : Latn
RELEASESTATUS : official
LABEL : Epic
CATALOGNUMBER : FE 39878
RELEASECOUNTRY : US
MUSICBRAINZ_ALBUMARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ALBUMARTISTSORT : Daniels, Charlie, Band, The
MEDIA : 12" Vinyl
MUSICBRAINZ_TRACKID: 12d58b04-853a-4855-8314-1e7310c6a765
MUSICBRAINZ_ARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ARTISTSORT : Daniels, Charlie, Band, The
ARTISTS : The Charlie Daniels Band
MUSICBRAINZ_RELEASETRACKID: 26789c36-5d85-3133-94a8-9837c7050428
TRACKTOTAL : 10
DISCTOTAL : 1
Duration: 00:03:40.93, start: 0.000000, bitrate: 1019 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Side data:
replaygain: track gain - -5.410000, track peak - 0.000023, album gain - -4.520000, album peak - 0.000023,
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 449x449 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)
Metadata:
comment : Cover (front)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> opus (libopus))
Press [q] to stop, [?] for help
Output #0, ogg, to '/config/transcodes/68493a3c7718b93fd4be2c6f0cc02a02.ogg':
Metadata:
track : 10
GENRE : Country
ALBUM : Me and the Boys
TOTALTRACKS : 10
DATE : 1985
disc : 1
REPLAYGAIN_TRACK_PEAK: 1.000000000
REPLAYGAIN_TRACK_GAIN: -5.41 dB
ARTIST : The Charlie Daniels Band
ENCODED-BY : Deputy Dawg and a Nation of Thieves®©
DISCTOTAL : 1
REPLAYGAIN_ALBUM_PEAK: 1.000000000
REPLAYGAIN_ALBUM_GAIN: -4.52 dB
COMPOSER : Charlie Daniels
TOTALDISCS : 1
LENGTH : 220933
URL : http://www.charliedaniels.com
album_artist : The Charlie Daniels Band
TITLE : Drinkin' My Baby Goodbye
ACOUSTID_ID : 437a0575-6d85-4597-9f41-872a9abd8eb2
MUSICBRAINZ_RELEASEGROUPID: 61c9e12b-4f2f-362d-a1a4-3d3def23762e
ORIGINALDATE : 1985
ORIGINALYEAR : 1985
RELEASETYPE : album
MUSICBRAINZ_ALBUMID: 2a485fa0-b0fe-4912-bf41-2bf1a19981e8
SCRIPT : Latn
RELEASESTATUS : official
LABEL : Epic
CATALOGNUMBER : FE 39878
RELEASECOUNTRY : US
MUSICBRAINZ_ALBUMARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ALBUMARTISTSORT : Daniels, Charlie, Band, The
MEDIA : 12" Vinyl
MUSICBRAINZ_TRACKID: 12d58b04-853a-4855-8314-1e7310c6a765
MUSICBRAINZ_ARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ARTISTSORT : Daniels, Charlie, Band, The
ARTISTS : The Charlie Daniels Band
MUSICBRAINZ_RELEASETRACKID: 26789c36-5d85-3133-94a8-9837c7050428
TRACKTOTAL : 10
encoder : Lavf60.3.100
Stream #0:0: Audio: opus, 48000 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc60.3.100 libopus
TRACKNUMBER : 10
GENRE : Country
ALBUM : Me and the Boys
TOTALTRACKS : 10
DATE : 1985
DISCNUMBER : 1
REPLAYGAIN_TRACK_PEAK: 1.000000000
REPLAYGAIN_TRACK_GAIN: -5.41 dB
ARTIST : The Charlie Daniels Band
ENCODED-BY : Deputy Dawg and a Nation of Thieves®©
DISCTOTAL : 1
REPLAYGAIN_ALBUM_PEAK: 1.000000000
REPLAYGAIN_ALBUM_GAIN: -4.52 dB
COMPOSER : Charlie Daniels
TOTALDISCS : 1
LENGTH : 220933
URL : http://www.charliedaniels.com
ALBUMARTIST : The Charlie Daniels Band
TITLE : Drinkin' My Baby Goodbye
ACOUSTID_ID : 437a0575-6d85-4597-9f41-872a9abd8eb2
MUSICBRAINZ_RELEASEGROUPID: 61c9e12b-4f2f-362d-a1a4-3d3def23762e
ORIGINALDATE : 1985
ORIGINALYEAR : 1985
RELEASETYPE : album
MUSICBRAINZ_ALBUMID: 2a485fa0-b0fe-4912-bf41-2bf1a19981e8
SCRIPT : Latn
RELEASESTATUS : official
LABEL : Epic
CATALOGNUMBER : FE 39878
RELEASECOUNTRY : US
MUSICBRAINZ_ALBUMARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ALBUMARTISTSORT : Daniels, Charlie, Band, The
MEDIA : 12" Vinyl
MUSICBRAINZ_TRACKID: 12d58b04-853a-4855-8314-1e7310c6a765
MUSICBRAINZ_ARTISTID: 35885131-9d16-40cb-9289-e18997a8b77c
ARTISTSORT : Daniels, Charlie, Band, The
ARTISTS : The Charlie Daniels Band
MUSICBRAINZ_RELEASETRACKID: 26789c36-5d85-3133-94a8-9837c7050428
TRACKTOTAL : 10
Side data:
replaygain: track gain - -5.410000, track peak - 0.000023, album gain - -4.520000, album peak - 0.000023,
size= 0kB time=-00:00:00.00 bitrate= -0.0kbits/s speed=N/A
av_interleaved_write_frame(): Permission denied
[out#0/ogg @ 0x63ea9d8dee80] Error muxing a packet
[out#0/ogg @ 0x63ea9d8dee80] Error writing trailer: Permission denied
size= 253kB time=00:00:17.07 bitrate= 121.6kbits/s speed=86.6x
video:0kB audio:283kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
When I access the Docker container's shell, I'm able to run the exact same /usr/lib/jellyfin-ffmpeg/ffmpeg command as above and the process completes with no problem. I imagine I have some kind of file permission issue, but I don't understand why I'm able to manually run the command, while it fails when Jellyfin runs it.
Any help is greatly appreciated!