Lessaj 467 Posted June 10, 2015 Posted June 10, 2015 Server Version 3.0.5607.2 Linux Mint 17.1 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ffmpeg version 2.6.1 Hi, I recently added some episodes of Modern Family to catch up on the series and the new episodes that I downloaded are failing with an ffmpeg transcode failure due to a syntax problem. I have figured out where the issue is but I don't know how I can fix it or really why it's doing it. I think this may have happened with some of my other media but I haven't really been using my server too much. For now I'm just watching them in VLC, no problem. Here is what the log says: 2015-06-09 20:47:28.9889 Info - App: /var/lib/mediabrowser/ffmpeg/20150331/ffmpeg -fflags +genpts -i file:"/raid/Storage/Shows/Modern Family/Season 3/Modern Family - S03E24 - Baby on Board.mkv" -sn -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=min(iw\,1920):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 29872000 -bufsize:v (29872000*2) -b:v 29872000 -vsync vfr -map_metadata -1 -threads 5 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/var/lib/mediabrowser/transcoding-temp/c9abfc2c9df9a2e8c1892fba3a2ebd1f.webm" 2015-06-09 20:47:29.1174 Info - App: FFMpeg exited with code 1 2015-06-09 20:47:30.1722 Error - App: Error streaming media. The client has most likely disconnected or transcoding has failed. If I run the ffmpeg command manually I get a syntax error. sudo /var/lib/mediabrowser/ffmpeg/20150331/ffmpeg -fflags +genpts -i file:"/raid/Storage/Shows/Modern Family/Season 3/Modern Family - S03E24 - Baby on Board.mkv" -sn -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=min(iw\,1920):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 29872000 -b:v 29872000 -vsync vfr -map_metadata -1 -threads 5 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/var/lib/mediabrowser/transcoding-temp/c9abfc2c9df9a2e8c1892fba3a2ebd1f.webm" bash: syntax error near unexpected token `(' Through trial and error I have determined that the syntax error is here: -force_key_frames expr:gte(t,n_forced*5) If I change this argument to have single quotes around the value, it works fine. What I find interesting is one of the older episodes that I have from a while ago has this exact same argument, as I imagine the ffmpeg command that is built always does but I only tried a couple files, and it works just fine without the quotes as you can see from the log below and I can see the episode playing of course. But when I run the command manually I STILL get a syntax error even if I add the quotes in the same place. I have to also add them around -bufsize:v to be '(987370*2)' (in the case of the episode that does play the ffmpeg command has this argument), then it works. Is this just something with my version of ffmpeg that I need to add quotes to these commands with brackets in them? It's not a very old version at all but it seems that any of the arguments with brackets without some kind of quote is causing issues. 2015-06-09 21:27:45.3422 Info - App: /var/lib/mediabrowser/ffmpeg/20150331/ffmpeg -fflags +genpts -i file:"/raid/Storage/Shows/Modern Family/Season 3/Modern Family - S03E01 - Dude Ranch.avi" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=min(iw\,1280):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 987370 -bufsize:v (987370*2) -b:v 987370 -vsync vfr -map_metadata -1 -threads 5 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/var/lib/mediabrowser/transcoding-temp/7919bfb1833a743eebf9250bf694c378.webm" 2015-06-09 21:27:47.8571 Info - App: HttpClientManager POST: http://www.mb3admin.com/admin/service/registration/validate 2015-06-09 21:27:48.3509 Info - App: HttpClientManager GET: http://www.mb3admin.com/admin/service/MB3ServerNotifications.json sudo /var/lib/mediabrowser/ffmpeg/20150331/ffmpeg -fflags +genpts -i file:"/raid/Storage/Shows/Modern Family/Season 3/Modern Family - S03E24 - Baby on Board.mkv" -sn -codec:v:0 libvpx -force_key_frames 'expr:gte(t,n_forced*5)' -vf "scale=min(iw\,1920):trunc(ow/dar/2)*2" -pix_fmt yuv420p -speed 16 -quality good -profile:v 0 -slices 8 -crf 10 -qmin 0 -qmax 50 -maxrate:v 29872000 -b:v 29872000 -vsync vfr -map_metadata -1 -threads 5 -codec:a:0 libvorbis -ab 128000 -af "aresample=async=1" -y "/var/lib/mediabrowser/transcoding-temp/c9abfc2c9df9a2e8c1892fba3a2ebd1f.webm" ffmpeg version 2.6.1- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-10) configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --cc=gcc-4.9 libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Input #0, matroska,webm, from 'file:/raid/Storage/Shows/Modern Family/Season 3/Modern Family - S03E24 - Baby on Board.mkv': Metadata: encoder : libebml v1.0.0 + libmatroska v1.0 Duration: 00:21:35.25, start: 0.000000, bitrate: 5774 kb/s Chapter #0:0: start 0.000000, end 121.830000 Metadata: title : 00:00:00.000 Chapter #0:1: start 121.830000, end 381.798000 Metadata: title : 00:02:01.830 Chapter #0:2: start 381.798000, end 739.614000 Metadata: title : 00:06:21.798 Chapter #0:3: start 739.614000, end 1100.558000 Metadata: title : 00:12:19.614 Chapter #0:4: start 1100.558000, end 1295.254000 Metadata: title : 00:18:20.558 Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default) [libvpx @ 0x3b047e0] v1.3.0-5725-gde3097a Output #0, webm, to '/var/lib/mediabrowser/transcoding-temp/c9abfc2c9df9a2e8c1892fba3a2ebd1f.webm': Metadata: encoder : Lavf56.25.101 Chapter #0:0: start 0.000000, end 121.830000 Chapter #0:1: start 121.830000, end 381.798000 Chapter #0:2: start 381.798000, end 739.614000 Chapter #0:3: start 739.614000, end 1100.558000 Chapter #0:4: start 1100.558000, end 1295.254000 Stream #0:0: Video: vp8 (libvpx), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=0-50, 29872 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default) Metadata: encoder : Lavc56.26.100 libvpx Stream #0:1: Audio: vorbis (libvorbis), 48000 Hz, 5.1(side), fltp, 128 kb/s (default) Metadata: encoder : Lavc56.26.100 libvorbis Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> vp8 (libvpx)) Stream #0:1 -> #0:1 (dts (dca) -> vorbis (libvorbis)) Press [q] to stop, [?] for help frame= 106 fps= 64 q=0.0 Lsize= 2051kB time=00:00:04.86 bitrate=3455.1kbits/s video:2003kB audio:39kB subtitle:0kB other streams:0kB global headers:6kB muxing overhead: 0.468025% /var/lib/mediabrowser/ffmpeg/20150331/ffmpeg -version ffmpeg version 2.6.1- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-10) configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --cc=gcc-4.9 libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100
Luke 42077 Posted June 10, 2015 Posted June 10, 2015 Interesting. I will have to do some testing. Thanks for the info!
Jackrats 4 Posted June 10, 2015 Posted June 10, 2015 I believe this is simply the issue where FIFOs are leaked when ffmpeg/ffprobe are run. The command that is displayed in the debug does actually get run without a syntax error -- you're simply looking at a difference in quoting between however it's being quoted to run within Emby and how it is displayed in the debug output. I'm willing to bet if you look in /proc/$PIDOFEMBY/fd you will see hundreds and hundreds of leaked FIFO FD's. Upgrading to 3.0.5607 will stop this.
Lessaj 467 Posted June 10, 2015 Author Posted June 10, 2015 I believe this is simply the issue where FIFOs are leaked when ffmpeg/ffprobe are run. The command that is displayed in the debug does actually get run without a syntax error -- you're simply looking at a difference in quoting between however it's being quoted to run within Emby and how it is displayed in the debug output. I'm willing to bet if you look in /proc/$PIDOFEMBY/fd you will see hundreds and hundreds of leaked FIFO FD's. Upgrading to 3.0.5607 will stop this. I will have to check that but I'm already running 3.0.5607.2. I know there is a server upgrade available so I will work on that tonight and see if that makes a difference.
Lessaj 467 Posted June 11, 2015 Author Posted June 11, 2015 Okay I just updated to 3.0.5621.4 and I'm able to play those episodes now. Not able to seek, but they are playing. Looking at the NFO it doesn't look like it's able to pick up the file info, I see that entry in other episodes where I can seek. Lots of video and audio info, but nothing in this one with that information.
lamero 1 Posted September 3, 2015 Posted September 3, 2015 (edited) I have the same problem with 3.0.5724.3 version on DEBIAN. Edited September 3, 2015 by lamero
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now