Jump to content

Transcoding errors since 3.2.15.0 selected ratecontrol mode is not supported...


Recommended Posts

Posted

HI all

 

I'm running emby server on a Windows 10 Pro (1703) machine, with an i7-770k and a GTX 950 graphic card.

Since upgrading to 3.2.15.0 I've been having problems with QSV accelerated transcoding.

For the client, the program seems to hang.

Looking at the logs show ffmpeg returning code 1.

 

I copied the transcoding command from the log and got the following:

C:\Users\afzal\AppData\Roaming\ffmpeg-20170516-3fefaea-win64-static\bin\ffmpeg.exe -i file:"G:\25 TV Series\Red Dwarf (1988)\Season 1\Red Dwarf - S01E04 - Waiting for God [1988-03-07].mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 1847240 -maxrate 1847240 -bufsize 3694480 -profile:v high -level 4.1 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 2 -ab 192000  -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "C:\Temp\transcoding-temp\transcoding-temp\fb4db92bdd848efc8ea7dbfb140ec865.m3u8" -y "C:\Temp\transcoding-temp\transcoding-temp\fb4db92bdd848efc8ea7dbfb140ec865%d.ts"
ffmpeg version N-86098-g3fefaea Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 63.100 / 55. 63.100
  libavcodec     57. 96.101 / 57. 96.101
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 89.101 /  6. 89.101
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, matroska,webm, from 'file:G:\25 TV Series\Red Dwarf (1988)\Season 1\Red Dwarf - S01E04 - Waiting for God [1988-03-07].mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-04-03T20:00:05.000000Z
  Duration: 00:28:32.52, start: 0.000000, bitrate: 923 kb/s
    Chapter #0:0: start 0.000000, end 87.920000
    Metadata:
      title           : (01)00:00:00:000
    Chapter #0:1: start 87.920000, end 459.560000
    Metadata:
      title           : (02)00:01:27:920
    Chapter #0:2: start 459.560000, end 746.880000
    Metadata:
      title           : (03)00:07:39:560
    Chapter #0:3: start 746.880000, end 1067.600000
    Metadata:
      title           : (04)00:12:26:880
    Chapter #0:4: start 1067.600000, end 1378.720000
    Metadata:
      title           : (05)00:17:47:600
    Chapter #0:5: start 1378.720000, end 1654.040000
    Metadata:
      title           : (06)00:22:58:720
    Chapter #0:6: start 1654.040000, end 1712.521000
    Metadata:
      title           : (07)00:27:34:040
    Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 696x568, SAR 211:194 DAR 18357:13774, 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
    Metadata:
      BPS             : 822268
      BPS-eng         : 822268
      DURATION        : 00:28:32.480000000
      DURATION-eng    : 00:28:32.480000000
      NUMBER_OF_FRAMES: 42812
      NUMBER_OF_FRAMES-eng: 42812
      NUMBER_OF_BYTES : 176014902
      NUMBER_OF_BYTES-eng: 176014902
      _STATISTICS_WRITING_APP: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2016-04-03 20:00:05
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-04-03 20:00:05
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      BPS             : 96000
      BPS-eng         : 96000
      DURATION        : 00:28:32.512000000
      DURATION-eng    : 00:28:32.512000000
      NUMBER_OF_FRAMES: 80274
      NUMBER_OF_FRAMES-eng: 80274
      NUMBER_OF_BYTES : 20550183
      NUMBER_OF_BYTES-eng: 20550183
      _STATISTICS_WRITING_APP: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2016-04-03 20:00:05
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-04-03 20:00:05
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: dvd_subtitle, 720x576 (default)
    Metadata:
      BPS             : 3085
      BPS-eng         : 3085
      DURATION        : 00:28:16.598000000
      DURATION-eng    : 00:28:16.598000000
      NUMBER_OF_FRAMES: 451
      NUMBER_OF_FRAMES-eng: 451
      NUMBER_OF_BYTES : 654279
      NUMBER_OF_BYTES-eng: 654279
      _STATISTICS_WRITING_APP: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.2 ('Crosses') 32bit
      _STATISTICS_WRITING_DATE_UTC: 2016-04-03 20:00:05
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-04-03 20:00:05
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_qsv @ 00000000026a7040] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 000000000260fa00] Qavg: 7321.205
[aac @ 000000000260fa00] 2 frames left in the queue on closing
Conversion failed!

I've tried using different versions of ffmpeg but get the same error. I've also upgraded to 3.2.17.0 and the problem persists.

Can anyone help?

Posted

Hi @@aballim, welcome. As this feature is still only expiremental, I'd like to ask for your help on this. Can you try copying the command and running it on a command prompt? Try removing different parameters until the issue goes away. Then let us know which one resolved it. Thanks !

Posted

Hi

The included code is actually the result of running in a normal (non-admin) command prompt.

 

I'll try as you said, removing parameters. As I don't know much about ffmpeg, I'd appreciate any hints you could give on which parameters to remove first.

Posted

Try b:v, then maxrate. Then profile, then level. Thanks.

Posted

Unfortunately no amount of removing parameters has worked.

 

As far as I can see it should work. My IGP is enabled (as is the GTX 950), I'm using the IGP as the main video card with it connected to my monitor. I know this was an issue in the past, according to various posts I've read.

 

The problem is also reported in various places, but I've not seen a solution anywhere. It's possible that it's too early for Kaby Lake cpus, although that seems a bit strange.

 

By the way, in my reading I found that "-strict experimental" is no longer needed since December 2015. 

Also they recommend using -b:a instead of -ab.

Posted

Thanks for the info.

Posted

So we should look to ffmpeg as the source of the problem :-(

  • 4 weeks later...
Posted

New version 3.2.20.2 beta has checkboxes for EnableHardwareDecoding/Encoding. Disabling Encoding makes it run, but the CPU still loves me for doing so by bein used up to 90% with one transcoding process... I tried build 20170605 and v3.3.1. All the same. Last one working is v3.2.4

Posted

Thanks for the feedback. Yes you can now enable or disable both decoding and encoding separately.

Posted

Yeah, and encoding does not work with new FFMPEG.

Posted

Hi, I  believe it works just fine. Can you please discuss an example and attach the information requested in how to report a problem? thanks !

Posted

Hi all.

 

First trial with zeranoe's 3.3.1 ffmpeg-20170605-4705edb-win64-static failed.

 

When I selected system installed version it couldn't find it, so I pointed it explicitly at \Emby-Server\ffmpeg\20170308. The file (at the start of this thread) transcoded correctly.

Note, I'm on emby server 3.2.20.0.

Posted

The 20170308 version is our default version so what problem do we have exactly?

Happy2Play
Posted

The 20170308 version is our default version so what problem do we have exactly?

 

Interesting, I see a empty folder.

 

%appdata%\Emby-Server\ffmpeg\20170308

 

And FFmpeg path:C:\Users\username\AppData\Roaming\Emby-Server\ffmpeg\20160410\ffmpeg.exe

nagetech
Posted

Just throwing it out there, %appdata%\Emby-Server\ffmpeg\20170308 is also empty for me.

 

Did @@Luke roll out a new default version of FFMPEG for Emby server and i missed it? I still only have the 20160410\ffmpeg.exe

 

I've often wondered about upgrading FFMPEG to a newer version....but didn't get many answers when I posed the question in another thread.

 

Any insight?

Happy2Play
Posted

Just throwing it out there, %appdata%\Emby-Server\ffmpeg\20170308 is also empty for me.

 

Did @@Luke roll out a new default version of FFMPEG for Emby server and i missed it? I still only have the 20160410\ffmpeg.exe

 

I've often wondered about upgrading FFMPEG to a newer version....but didn't get many answers when I posed the question in another thread.

 

Any insight?

 

Looks like there was a try since my beta machine show the (20170308) folder was created on 20170309 but folder is empty.

 

But you can update and try any version you like, overall functionality is another story.

nagetech
Posted

Thanks for the answer....

 

I've never run any betas, just the latest stables. Guessing something went wrong with the install routine?

 

Do you know of any benefits in using the 20170308 version? and where would I get it anyway?

Happy2Play
Posted

I encode all my media to mp4 to avoid transcoding.  But I just google ffmpeg and download and installed from https://ffmpeg.zeranoe.com/builds/. I just moved the two files to a folder in the servers default location and changed the ffmpeg path to that new folder.

 

But it really comes down to what your are doing as the previous 20160410 version did everything I needed it to do, which wasn't much.

2017-06-13 10:44:04.3857 Info MediaEncoder: Validating media encoder at C:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20170605\ffmpeg.exe
2017-06-13 10:44:04.3857 Info MediaEncoder: Running C:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20170605\ffmpeg.exe -decoders
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: mpeg2video
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: h264_qsv
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: hevc_qsv
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: mpeg2_qsv
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: vc1_qsv
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: h264_cuvid
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: hevc_cuvid
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: ac3
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: aac
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: mp3
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: h264
2017-06-13 10:44:04.4169 Info MediaEncoder: Decoder available: hevc
2017-06-13 10:44:04.4169 Info MediaEncoder: Running C:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20170605\ffmpeg.exe -encoders
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libx264
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libx265
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: mpeg4
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: msmpeg4
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libvpx
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libvpx-vp9
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: aac
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libmp3lame
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libopus
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: libvorbis
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: srt
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: h264_nvenc
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: hevc_nvenc
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: h264_qsv
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder available: hevc_qsv
2017-06-13 10:44:04.4481 Info MediaEncoder: Encoder validation complete
nagetech
Posted

The version I Have now does seem to do everything, I'm curious to know if the newer versions provide anything in the performance/speed department.

Happy2Play
Posted (edited)

The version I Have now does seem to do everything, I'm curious to know if the newer versions provide anything in the performance/speed department.

 

All you can do is try and then let everyone know it there is.  Everyone's needs are different so what works for you may not work for others.

Edited by Happy2Play
Posted

As the OP let me summarize the situation as I see it.

 

Newer versions of ffmpeg seem to have issues with Kaby Lake and QSV.

 

The version 20170308 of ffmpeg, however, works. As stated, it is the default version. I am on server 3.2.20.0. I needed to explicitly put in the path, however, as when I select system default, for some reason it couldn't find it.

 

The problem, then, is a problem of ffmpeg, and mot emby. Until the problem is fixed in ffmpeg, if you want kaby lake transcoding use the default 20170308 ffmpeg. If your installation doesn't have it, then you may need to re-download.

 

All the best$

Posted

All of the installations have it, the only reason it wouldn't is if we were unable to download it on first startup for whatever reason, like running the startup wizard without an internet connection.

Posted

Confirmed. Now I have a NUC7 and all is fine. So... FFMPEG as you all say ^^

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...