Jump to content

Transcoding Fails "decoding with frame threading...."


Vicpa

Recommended Posts

Vicpa

Hi

 

A remote Fire Tv user attempted to play an MKV and it fails transcoding. I am not quite sure why the file needs to be transcoded in the first place.

 

"[h264 @ 00000000046bbe80] Hardware accelerated decoding with frame threading is known to be unstable and its use is discouraged."

 

Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native))

 

I would think the above might be able to play natively or at least copy., but I don't know...

 

Full ffmpeg log attached.

 

ffmpeg-transcode-ff588d7a-7d52-4d95-9525-c4ef64c3ad4b.txt

 

 

Thanks

-vicpa

 

 

Link to comment
Share on other sites

It's transcoding at least due to bitrate request by the remote app. I guess with hardware accelleration we need to disable frame threading and from what i gather the way to do that is to specify -threads 1.

Link to comment
Share on other sites

Vicpa

Thanks Luke!!

 

 

Will advise user, most things play ok, 

Link to comment
Share on other sites

Vicpa

Hi @@Luke

 

Sorry, deserve slap on side of head. :) ​ Could have at least run a test for you from the command line. 

Below is original...

 

C:\Users\XXXXXXXX\AppData\Roaming\Emby-Server\ffmpeg\20160410\ffmpeg.exe -hwaccel auto -i file:"\\XXXXX\Movies 2\La La Land\La La Land.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -force_key_frames "expr:gte(t,n_forced*5)" -vf "scale=trunc(min(max(iw\,ih*dar)\,3840)/2)*2:trunc(ow/dar/2)*2" -copyts -avoid_negative_ts disabled -start_at_zero -preset 7 -look_ahead 0 -b:v 7888952 -maxrate 7888952 -bufsize 15777904 -vsync -1 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 384000  -y "K:\embytemp\transcoding-temp\8177ccfbe2c69305008c4b3022bf91d9.ts"

 

I tried with -threads 1 and it failed with the same error.

 

I think it is related to -hwaccel auto, switch. I have such few things that don't direct play these days that I haven't really been paying attention. So I don't know exactly what -hwaccel auto is supposed to do...

 

If you take it out, runs fine from the command line. The -codec:v:0 h264_qsv will set quicksync acceleration on the encode regardless.

 

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native))
Press [q] to stop, [?] for help
frame=10132 fps=217 q=-0.0 Lsize=  464092kB time=00:07:02.71 bitrate=8993.9kbits/s speed=9.04x
video:408072kB audio:19814kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.461753%
 
I also gave it a go with 
 
ffmpeg.exe -c:v h264_qsv -i file:"\\XXXX\Movies 2\La​. This set the quicksync on the decode as well. Not sure if that is what -hwaccel auto is supposed to do or not.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native))
Press [q] to stop, [?] for help
frame=22236 fps=294 q=-0.0 Lsize= 1016147kB time=00:15:27.64 bitrate=8973.6kbits/s speed=12.3x
video:893381kB audio:43482kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.462715%
 
This give this best performance.
 
Like I said haven't been following the introduction of -hwaccel so this may just muddle the issue.
 
Full output from command line tests.
 
 
 
-vicpa
Edited by Vicpa
Link to comment
Share on other sites

Vicpa

Hi @@Luke

 

It looks like this "-hwaccel auto" thing isn't supported or doesn't work right with the version of ffmpeg that is distributed with emby.  :( ​ 

I have been sticking with the "approved" ffmpeg build to alleviate any anomalies that may occur. For giggles I tried the command line with the latest zenanoe windows build and the command line runs without erroring out.

 

It doesn't do anything for the decode

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native))
Press [q] to stop, [?] for help

 

So again I am not sure what it is supposed to be doing.

 

BTW the latest ffmpeg build doesn't like the parameters for mpeg2video qsv decoding as well.

 

-vicpa

Link to comment
Share on other sites

Try the zeranoe 0308 build, because that is what we're using now. you might be able to just delete yours and restart the server. let me know if a newer build resolves this. thanks.

Link to comment
Share on other sites

Waldonnis

@@Waldonnis, unfortunately we might have to move away from hwaccel auto

Tis fine. It's clear that it needs more investigation, and something strange is happening when its being run by the server vs manually in some cases as well. It was worth testing at the very least.
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...