Closed hobby-lc closed 9 months ago
And, it seems that Jellyfin called "ffprobe" instead of "ffmpeg" sometimes during play.
[2024-01-08 11:26:34.605 +08:00] [ERR] Error in "ffprobe"
System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/share/ffmpeg/ffprobe' with working directory '/opt/jellyfin'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StartProcess(ProcessWrapper process)
at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, Boolean forceEnableLogging, CancellationToken cancellationToken)
at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, Boolean forceEnableLogging, CancellationToken cancellationToken)
at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken)
https://forum.jellyfin.org/t-ffmpeg-path-jellyfin-10-8-13?pid=11058#pid11058 According to the above discussion, adding the following lines in encoding.xml should fix the ffprobe problem: (it seems that the cmdline option "--ffmpeg" will modfiy the "EncoderAppPathDisplay" only)
`
Unfortunately your solution would not work, for example this is my output on my system for that.
echo $(which jellyfin)
which: no jellyfin in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin)
However it would be better perhaps to use $(which ffmpeg)
. Maybe that's what you meant?
Unfortunately your solution would not work, for example this is my output on my system for that.
echo $(which jellyfin) which: no jellyfin in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin)
However it would be better perhaps to use
$(which ffmpeg)
. Maybe that's what you meant?
Sorry for the typo, and yes I mean '$(which ffmpeg)' for locating the ffmpeg binary path.
I still haven't tested this on my system, I would like to make sure this works in every situation on all the distros I mentioned I tested it on before continuing. As for specific Ubuntu support for jellyfin-ffmpeg, anyone with a reasonable understanding of linux would easily be able to install jellyfin-ffmpeg on their ubuntu machine with my script. I'm just not so sure that it's completely necessary to add code specifically for ubuntu and that specific use case of their version of ffmpeg. Feel free to write up some code to include the automatic installation for jellyfin-ffmpeg as a pull request, and I may merge it.
The ffmepg binary is not located in the folder "/usr/share/ffmpeg" for Ubuntu 22.04. Jellyfin service will start normally (with error message only) until the need of transcoding the video during play. FYI.
It would be better to use "$(which jellyfin)" to pass the ffmepg binary location in the jellyfin.sh.
https://github.com/Smiley-McSmiles/jellyman/blob/14711dbc07f0be3b867532ffc9e35d81dd50913b/scripts/jellyfin.sh#L10