Jump to content

Transcode fails, Web Only


Recommended Posts

MSattler
Posted (edited)

So am trying to play back a movie and here are the results:

 

Android Client - Works

IOS Client - Works

Emby Theatre Web Version - Works

 

Standard Emby Server Web Interface - Transcode fails, Tried Chrome, and Firefox

 

Server Log:

 

2016-04-28 14:41:42.8687 Info App: FFMpeg exited with code -1073741819
2016-04-28 14:41:43.4715 Info HttpServer: HTTP POST http://192.168.1.125:8096/emby/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
2016-04-28 14:41:43.4715 Info HttpServer: HTTP Response 204 to 192.168.1.239. Time: 0ms. http://192.168.1.125:8096/emby/Sessions/Playing/Progress
2016-04-28 14:41:43.9565 Error App: Error streaming media. The client has most likely disconnected or transcoding has failed.
*** Error Report ***
Version: 3.0.5945.0
Command line: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe -service
Operating system: Microsoft Windows NT 6.2.9200.0
Processor count: 8
64-Bit OS: True
64-Bit Process: True
Program data path: B:\Users\Administrator\AppData\Roaming\Emby-Server
Application Path: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe
One or more errors occurred.
System.AggregateException
  at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
  at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal(Stream responseStream)
InnerException: System.IO.FileNotFoundException
Could not find file 'B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\8426a3f55a88f4e6bd9775298f2a0acb.mkv'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
  at CommonIO.ManagedFileSystem.GetFileStream(String path, FileMode mode, FileAccess access, FileShare share, Boolean isAsync)
  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.<StreamFile>d__0.MoveNext()
 
 
Transcode Log:
 
 
{"Protocol":"File","Id":"fe6bc74213963cf23a530cb7b00e3141","Path":"\\\\tower2\\bluray\\Deadpool\\Deadpool.mkv","Type":"Default","Container":"mkv","Name":"1080P/H264/DTS-HD MA","RunTimeTicks":64862290000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","Language":"eng","NalLengthSize":"4","IsInterlaced":false,"BitRate":30722675,"BitDepth":8,"RefFrames":4,"IsDefault":false,"IsForced":false,"Height":1080,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":false},{"Codec":"dca","Language":"eng","IsInterlaced":false,"ChannelLayout":"7.1","BitDepth":24,"Channels":8,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"DTS-HD MA","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"dca","Language":"eng","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":1536000,"BitDepth":24,"Channels":6,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Profile":"DTS","Type":"Audio","Index":2,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"ac3","Language":"eng","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":448000,"Channels":6,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":3,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"pgssub","Language":"eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":4,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"pgssub","Language":"eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":5,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"pgssub","Language":"eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":6,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"pgssub","Language":"eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":7,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"pgssub","Language":"eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":8,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":30722675,"RequiredHttpHeaders":{}}
 
B:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160401\ffmpeg.exe -fflags +genpts -c:v h264_qsv  -i file:"\\tower2\bluray\Movie\Movie.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,720)/2)*2: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 872000 -bufsize:v (872000*2) -b:v 872000 -vsync vfr -map_metadata -1 -threads 7 -codec:a:0 libvorbis -ac 6 -ab 128000 -af "aresample=async=1" -y "B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\c3d19c04e9b14ca6773efd798de96bb0.webm"
 
 
ffmpeg version N-79173-gbe746ae Copyright © 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --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-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 32.100 / 57. 32.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100

 

 

Thanks!

Edited by MSattler
Posted

and the chrome transcoding log?

Posted

And try disabling quick sync.

MSattler
Posted

and the chrome transcoding log?

 

Let me find it, Edge does work.  

 

So disabling quicksync works.  So it has to do something with that.

Posted

Yea i mean, we provide the option to use the quicksync decoder and encoder because that's what the community wanted. Unfortunately we can't really control the fact that they might not be mature enough to handle all of your files at this point. That's why whenever you click save on the page to activate quicksync, you get a nice warning about it.

MSattler
Posted

Yea i mean, we provide the option to use the quicksync decoder and encoder because that's what the community wanted. Unfortunately we can't really control the fact that they might not be mature enough to handle all of your files at this point. That's why whenever you click save on the page to activate quicksync, you get a nice warning about it.

 

Guess that mean's for my users Chrome and Firefox were just lost as compatible devices.  Just not going to disable QuickSync, the positives outweigh the negatives.

 

Perhaps if there were additional developers issues like this could be worked on at some point...   Oh well.

 

Thanks!

Posted

Well that's what I'm trying to say. I don't think there's anything here for us to work on because this issue appears to be out of our control. The only thing we could probably do is catch the failure and restart without quicksync.

MSattler
Posted

Yea i mean, we provide the option to use the quicksync decoder and encoder because that's what the community wanted. Unfortunately we can't really control the fact that they might not be mature enough to handle all of your files at this point. That's why whenever you click save on the page to activate quicksync, you get a nice warning about it.

 

What's interesting is if I run the command from a command prompt it completes.... which tells me it's not a QuickSync ffmpeg issue.

 

B:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160401\ffmpeg.exe -fflags +genpts -c:v h264_qsv  -i file:"\\tower2\bluray\Movie\Movie.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,720)/2)*2: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 872000 -bufsize:v (872000*2) -b:v 872000 -vsync vfr -map_metadata -1 -threads 7 -codec:a:0 libvorbis -ac 6 -ab 128000 -af "aresample=async=1" -y "B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\c3d19c04e9b14ca6773efd798de96bb0.webm"

Posted

and it produces this output file?

B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\c3d19c04e9b14ca6773efd798de96bb0.webm

Unless that file is just a couple minutes long, there's no way you could have transcoded a 2 hour movie in no time like that, so I think something isn't right.

MSattler
Posted (edited)

and it produces this output file?

B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\c3d19c04e9b14ca6773efd798de96bb0.webm

Unless that file is just a couple minutes long, there's no way you could have transcoded a 2 hour movie in no time like that, so I think something isn't right.

 

It's still running right now, but it did not fail like it did in the log.  I took the command line from the log where the transcode failed, and I ran it from a command prompt.  Right now it's 30 minutes into the movie, running at 80fps.

 

Point being it's actually running, it will take probably another 20 minutes to complete.

Edited by MSattler
Posted

Ok, interesting, thanks. Maybe we will just use quicksync for encoding and not decoding. The decoding benefit doesn't really seem anywhere near as worth it.

MSattler
Posted

Ok, interesting, thanks. Maybe we will just use quicksync for encoding and not decoding. The decoding benefit doesn't really seem anywhere near as worth it.

 

Well, I'm not sure that we should not use it for decoding just because one movie won't decode in 2 of 3 browsers.  The apps have no issue with it, so it has to be something particular to those instances.

MSattler
Posted

So here are the two command lines which fail, both are transcoding without issue from the command line.  

 

What user is is the ffmpeg request running under?

 

B:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160401\ffmpeg.exe -fflags +genpts -c:v h264_qsv  -i file:"\\tower2\bluray\Deadpool\Deadpool.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -force_key_frames expr:gte(t,n_forced*5) -copyts -avoid_negative_ts disabled -start_at_zero -preset 7 -look_ahead 0 -b:v 24680000 -maxrate 24680000 -bufsize 49360000 -vsync vfr -profile:v high -level 4.1 -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 320000 -af "aresample=async=1,volume=2" -y "B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\95ab23017692a685e274505cfa2ebdaf.mkv"
 
B:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160401\ffmpeg.exe -fflags +genpts -c:v h264_qsv  -i file:"\\tower2\bluray\Deadpool\Deadpool.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,720)/2)*2: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 872000 -bufsize:v (872000*2) -b:v 872000 -vsync vfr -map_metadata -1 -threads 7 -codec:a:0 libvorbis -ac 6 -ab 128000 -af "aresample=async=1" -y "B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\c3d19c04e9b14ca6773efd798de96bb0.webm"
Posted

whatever user you're logged in as, unless it's the windows service.

 

is it a fail or just some kind of stall? for example, is ffmpeg running and the output file continuing to grow?

MSattler
Posted

whatever user you're logged in as, unless it's the windows service.

 

is it a fail or just some kind of stall? for example, is ffmpeg running and the output file continuing to grow?

 

When it fails, the transcoding log file shows only what is below.  It looks like a stall to me.

 

ffmpeg version N-79173-gbe746ae Copyright © 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --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-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 32.100 / 57. 32.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
MSattler
Posted
I see this:

 

Could not find file 'B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\7404ce002d2f9156d39a40cec627077f.webm'.

 

Is that being thrown because the file was not created yet?  It would be good to know if there was something wrong with ffmpeg being called, or if ffmpeg was stalled, and then it could not find the file.

 

 

 

2016-04-28 16:15:28.6199 Info App: FFMpeg exited with code -1073741819

2016-04-28 16:15:29.6984 Error App: Error streaming media. The client has most likely disconnected or transcoding has failed.

*** Error Report ***

Version: 3.0.5945.0

Command line: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe -service

Operating system: Microsoft Windows NT 6.2.9200.0

Processor count: 8

64-Bit OS: True

64-Bit Process: True

Program data path: B:\Users\Administrator\AppData\Roaming\Emby-Server

Application Path: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe

One or more errors occurred.

System.AggregateException

  at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)

  at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal(Stream responseStream)

InnerException: System.IO.FileNotFoundException

Could not find file 'B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\7404ce002d2f9156d39a40cec627077f.webm'.

  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

  at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)

  at CommonIO.ManagedFileSystem.GetFileStream(String path, FileMode mode, FileAccess access, FileShare share, Boolean isAsync)

  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.<StreamFile>d__0.MoveNext()
Posted

but was the file created at all?

MSattler
Posted

but was the file created at all?

 

No, the file never get's created.

 

So, I checked that link and played around with the # of core settings for transcoding.

 

Max, 7, 8 (I have 8 cores) cause a failure.

 

Running 6 cores allows it to play.

 

Again this is only in Chrome and Firefox.

 

Edge and other apps are all fine.

Posted

The only difference between running it through the command line and emby server is that we're redirecting standard input and output, which are things we can't live without. anyway, please try the latest dev build as i'm making one small adjustment to that to see if it helps. thanks.

MSattler
Posted

The only difference between running it through the command line and emby server is that we're redirecting standard input and output, which are things we can't live without. anyway, please try the latest dev build as i'm making one small adjustment to that to see if it helps. thanks.

 

 

Would that be 3.0.5962.25571?

MSattler
Posted

Same thing still:

 

2016-04-29 13:01:22.4511 Info App: B:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160401\ffmpeg.exe -fflags +genpts -c:v h264_qsv  -i file:"\\tower2\bluray\Deadpool\Deadpool.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -force_key_frames expr:gte(t,n_forced*5) -copyts -avoid_negative_ts disabled -start_at_zero -preset 7 -look_ahead 0 -b:v 24680000 -maxrate 24680000 -bufsize 49360000 -vsync vfr -profile:v high -level 4.1 -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 320000 -af "aresample=async=1,volume=2" -y "B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\a48aec23a182d5172972716b21e84b91.mkv"
2016-04-29 13:01:22.6073 Info App: FFMpeg exited with code -1073741819
2016-04-29 13:01:23.6929 Error App: Error streaming media. The client has most likely disconnected or transcoding has failed.
*** Error Report ***
Version: 3.0.5962.25571
Command line: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe -service
Operating system: Microsoft Windows NT 6.2.9200.0
Processor count: 8
64-Bit OS: True
64-Bit Process: True
Program data path: B:\Users\Administrator\AppData\Roaming\Emby-Server
Application Path: B:\Users\Administrator\AppData\Roaming\Emby-Server\system\MediaBrowser.ServerApplication.exe
One or more errors occurred.
System.AggregateException
  at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
  at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal(Stream responseStream)
InnerException: System.IO.FileNotFoundException
Could not find file 'B:\Users\Administrator\AppData\Roaming\Emby-Server\transcoding-temp\transcoding-temp\a48aec23a182d5172972716b21e84b91.mkv'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
  at CommonIO.ManagedFileSystem.GetFileStream(String path, FileMode mode, FileAccess access, FileShare share, Boolean isAsync)
  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.<StreamFile>d__0.MoveNext()
Posted

No, the new one that just went up, 5963

MSattler
Posted

No, the new one that just went up, 5963

 

Same thing.

 

Anyway we can get a temp build without redirecting standard input, just to see if we can get better logging?

 

I think really we need to know what that error is/means.

  • 2 weeks later...
MSattler
Posted

@@Luke,

 

Did you end up changing it so it uses CPU for decoding, and QS for encoding?  I checked the release notes for the builds and do not see it mentioned.

 

I'm seeing a lot more CPU utilization in the latest beta builds.  I would hate to think that because one movie was causing that issue that we have disabled decoding now via hardware.

 

I'd rather get that back and figure out a way to make the one movie work.

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