Jump to content

Emby requires ffmpeg but Ubuntu 14.04 only has libav


staticnoise

Recommended Posts

staticnoise

I'm not sure if this is a known issue.

 

I am running elementary OS, which is based on Ubuntu 14.04.

 

After installing, attempting to play transcoded streams gave me:

Video Error. There was an error playing the video.

 

The logs told me FFmpeg had exited with error code 1. When I attempted to run the ffmpeg command myself, it turned out to be a symlink to avconv, which gave me:

 

avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright © 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Unrecognized option 'avoid_negative_ts'.
Error splitting the argument list: Option not found

 

I found the solution on this forum. Apparently Ubuntu 14.04 includes libav instead of the original ffmpeg, and they are not 100% compatible. I had to install the original ffmpeg from a PPA to fix the issue.

 

I am posting it here because this likely affects all Ubuntu 14.04 installs.

 

For reference, this was the log output:

2016-07-03 16:26:58.1187 Info App: /usr/bin/ffmpeg -fflags +genpts -i file:"/media/data/somefile.mkv" -map 0:0 -map 0:1 -codec:v:0 libx264 -force_key_frames expr:gte(t,n_forced*5) -copyts -avoid_negative_ts disabled -start_at_zero -pix_fmt yuv420p -preset superfast -crf 23 -b:v 7026752 -maxrate 7026752 -bufsize 14053504 -vsync vfr -profile:v high -level 51 -filter_complex "[0:3]format=yuva444p,scale=1920:1080,lut=u=128:v=128:y=gammaval(.3)[sub] ; [0:0] [sub] overlay" -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 128000 -af "aresample=async=1" -y "/var/lib/emby-server/transcoding-temp/42e6e4097c3e1841e03b65e72f16bab9.mkv"
2016-07-03 16:26:58.1895 Info App: FFMpeg exited with code 1
2016-07-03 16:26:59.2427 Error App: Error streaming media. The client has most likely disconnected or transcoding has failed.
        *** Error Report ***
        Version: 3.0.5973.0
        Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -restartpath /usr/lib/emby-server/restart.sh
        Operating system: Unix 3.16.0.38
        Processor count: 4
        64-Bit OS: True
        64-Bit Process: True
        Program data path: /var/lib/emby-server
        Mono: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Dec  3 04:04:55 UTC 2015)
        Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
        One or more errors occurred.
        System.AggregateException
          at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) <0x7f7c4df83110 + 0x005a9> in <filename unknown>:0 
          at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout) <0x7f7c4df830b0 + 0x00028> in <filename unknown>:0 
          at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) <0x7f7c4df83020 + 0x00016> in <filename unknown>:0 
          at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal (System.IO.Stream responseStream) <0x4189b910 + 0x000e4> in <filename unknown>:0 
        InnerException: System.IO.FileNotFoundException
        Could not find file "/var/lib/emby-server/transcoding-temp/42e6e4097c3e1841e03b65e72f16bab9.mkv".
          at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x7f7c4e03f060 + 0x005cd> in <filename unknown>:0 
          at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) <0x7f7c4e03ed20 + 0x0004d> in <filename unknown>:0 
          at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
          at CommonIO.ManagedFileSystem.GetFileStream (System.String path, FileMode mode, FileAccess access, FileShare share, Boolean isAsync) <0x414a90c0 + 0x000bd> in <filename unknown>:0 
          at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier+<StreamFile>c__async0.MoveNext () <0x4189bfe0 + 0x000d6> in <filename unknown>:0 
Edited by staticnoise
Link to comment
Share on other sites

Thanks for the report. I think this only affects 14.04 if I'm not mistaken, right? In other words, i think newer versions have ffmpeg available, no?.

Link to comment
Share on other sites

anderbytes

@@staticnoise, for your situation, I suggest you to download a static version of FFMpeg and configure FFMpeg path in latest stable Emby, inside "Playback" > "Transcoding"

 

Some options of static:

- http://johnvansickle.com/ffmpeg/  (I use this one today)

- https://ffmpeg.zeranoe.com/builds/

- https://sourceforge.net/projects/ffmpeg-hi/  (Thinking about moving to this one, because of libfdk_aac , much better than regular aac)

 

@@Luke, two questions:

 

1. That FFMpeg path above is used for all purposed, or only transcoding?

2. Changing to a static FFMpeg build that supports libfdk_aac would improve something in Emby? Because AAC is a very common standard, with good quality and is well known that libdfk_aac is better than regular libaac in every aspect.

Link to comment
Share on other sites

anderbytes

I'm not sure. Try it and see if it sounds better.

 

I can try but I'm no sound expert... I probably won't notice the difference in quality.

 

One of the benefits of using AAC-HC (possible with libfdk_aac) is that HC with low bitrate maintains a good quality and requires less bandwidth to be used.

Also... libfdk_aac permits the use of AAC and VBR , which can't be done with libaac

Edited by anderbytes
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...