• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: ffmpeg Permission denied

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    SOLVED: ffmpeg Permission denied

    ffmpeg Permission denied
    divinecomedian
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #1
    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:

    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!
    Go to solution
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-09-27, 01:36 PM
    Can you fully describe your setup? Including the storage configuration?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    divinecomedian
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #3
    2024-09-28, 05:16 PM
    Sure. Here's the Docker compose file I'm using:

    Code:
    services:
      jellyfin:
        environment:
          - "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0"
        image: "docker.io/jellyfin/jellyfin:10"
        network_mode: "bridge"
        ports:
          - "34343:8096/tcp"
        restart: "unless-stopped"
        volumes:
          - "/mounts/docker/jellyfin/cache:/cache"
          - "/mounts/docker/jellyfin/config:/config"
          - "/mounts/media/media:/general-media"

    This is running on a Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-45-generic x86_64) VM. I mounted /mounts/docker and /mounts/media using these /etc/fstab entries:

    Code:
    //nas.home/docker /mounts/docker cifs rw,credentials=/home/jacob/.smb,iocharset=utf8,vers=3.0,noperm,file_mode=0777,dir_mode=0777 0 0
    //nas.home/media /mounts/media cifs rw,credentials=/home/jacob/.smb,iocharset=utf8,vers=3.0,noperm,file_mode=0777,dir_mode=0777 0 0

    Jellyfin appears to have no other problems, just this transcoding issue. Also, not sure if it's relevant, but the transcodes are kicked off by Finamp downloading songs to my phone, which I have set to reduce the file sizes.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-09-28, 05:49 PM
    A) You should never have Jellyfin's database located on a SMB/CIFS share.  Fix immediately.  /config needs to be on a local drive, preferably a SSD.

    B) Also, is the image name a typo?  What is with the "10" tag?  Is that supposed to be 10.9.11?

    C) Can you share the full jellyfin log via pastebin?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    divinecomedian
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #5
    2024-09-28, 08:30 PM
    A) Oh I didn't realize that. What's the reason not to have it on a share? I had it on there before I moved the docker instance to another VM and it had been working fine.

    B) It's a valid image tag. My JF server version is 10.9.11. See https://hub.docker.com/layers/jellyfin/j...xt=explore

    C) I'll get you the log when I get back to my PC.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-09-28, 11:38 PM
    Databases make a lot of small transactions that SMB isn't designed to handle, plus even on a LAN the latency is a lot higher than if it were on a local disk.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    divinecomedian
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #7
    2024-09-29, 12:48 PM
    I haven't noticed any latency issues, and like I said previously, everything else has been working just fine. Even transcoding movies works. Here's an ffmpeg log of a successful video transcode using the same directories: https://pastebin.com/raw/dy2KWzzY
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-09-29, 04:08 PM
    Latency, not in Jellyfin serving you a webpage, but latency is transactions with the database. Thousands a second during high load periods. SMB just isn't made for lots of small transactions.

    Having your database on a SMB share won't prevent it from working. But eventually, as your library grows, it will get bogged down by this setup.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    divinecomedian
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #9
    2024-09-29, 08:55 PM
    I see, well latency doesn't seem to be the problem here, and I can deal with that down the road. Why does transcoding of video files work but not audio files? It seems as if they'd both get the "Permission denied" error.
    gnattu
    Offline

    Team Member

    Posts: 342
    Threads: 0
    Joined: 2024 Feb
    Reputation: 17
    #10
    2024-09-29, 09:10 PM
    SMB filesystem mounts may not provide all file manipulation permission/methods depending on both your client and the server settings which is much harder to fix than just install locally because smb ACL is not something you want to spend time to learn for such simple use case.
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode