Jump to content

Roku image extraction not working for some items


snake98
Go to solution Solved by softworkz,

Recommended Posts

snake98

I notice roku thumbnail keeps crashing on certain movies, an example is attached, is there anything I can do, or any other logs you need.

2019-01-08 10:47:45.019 Info App: Creating roku thumbnails at 320 width, for \\emby\movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv
2019-01-08 10:47:45.031 Info MediaEncoder: ProcessRun 'ffmpgeg extract-imageseries' Execute: C:\Emby\system\ffmpeg.exe -f matroska  -i file:"\\emby\movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv" -threads 0 -v quiet -vf "fps=fps=1/10,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "C:\Emby\programdata\cache\temp\cec5693763284f7fbe56489f7a334bcd\img_%05d.jpg"
2019-01-08 10:47:45.032 Info MediaEncoder: ProcessRun 'ffmpgeg extract-imageseries' Started.

2019-01-08 11:30:36.952 Error MediaEncoder: Error running ffmpgeg extract-imageseries -f matroska  -i file:"\\emby\movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv" -threads 0 -v quiet -vf "fps=fps=1/10,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "C:\Emby\programdata\cache\temp\1cb405fc6a3b43878cb9fe82676b1e24\img_%05d.jpg"
	*** Error Report ***
	Version: 3.6.0.84
	Command line: C:\Emby\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 6
	Program data path: C:\Emby\programdata
	Application directory: C:\Emby\system
	System.Exception: System.Exception: Error running ffmpgeg extract-imageseries for \\emby\movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv - 
	   at Emby.Server.MediaEncoding.Encoder.MediaEncoder.ExtractVideoImagesOnInterval(String inputPath, String container, MediaStream videoStream, MediaProtocol protocol, Nullable`1 threedFormat, TimeSpan interval, String targetDirectory, String filenamePrefix, Nullable`1 maxWidth, CancellationToken cancellationToken)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()
	   at Emby.Server.MediaEncoding.Encoder.MediaEncoder.ExtractVideoImagesOnInterval(String inputPath, String container, MediaStream videoStream, MediaProtocol protocol, Nullable`1 threedFormat, TimeSpan interval, String targetDirectory, String filenamePrefix, Nullable`1 maxWidth, CancellationToken cancellationToken)
	
2019-01-08 11:30:37.010 Error App: Error creating roku thumbnails for The Matrix
	*** Error Report ***
	Version: 3.6.0.84
	Command line: C:\Emby\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 6
	Program data path: C:\Emby\programdata
	Application directory: C:\Emby\system
	System.Exception: System.Exception: Error running ffmpgeg extract-imageseries for \\emby\movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv - 
	   at Emby.Server.MediaEncoding.Encoder.MediaEncoder.ExtractVideoImagesOnInterval(String inputPath, String container, MediaStream videoStream, MediaProtocol protocol, Nullable`1 threedFormat, TimeSpan interval, String targetDirectory, String filenamePrefix, Nullable`1 maxWidth, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.CreateBif(String path, Int32 width, BaseItem item, MediaSourceInfo mediaSource, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.Run(BaseItem item, String itemModifier, MediaSourceInfo mediaSource, Int32 width, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.Run(BaseItem item, CancellationToken cancellationToken)
	   at RokuMetadata.ScheduledTasks.RokuScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()
	   at Emby.Server.MediaEncoding.Encoder.MediaEncoder.ExtractVideoImagesOnInterval(String inputPath, String container, MediaStream videoStream, MediaProtocol protocol, Nullable`1 threedFormat, TimeSpan interval, String targetDirectory, String filenamePrefix, Nullable`1 maxWidth, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.CreateBif(String path, Int32 width, BaseItem item, MediaSourceInfo mediaSource, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.Run(BaseItem item, String itemModifier, MediaSourceInfo mediaSource, Int32 width, CancellationToken cancellationToken)
	   at RokuMetadata.Drawing.VideoProcessor.Run(BaseItem item, CancellationToken cancellationToken)
	   at RokuMetadata.ScheduledTasks.RokuScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	

info on the file

===================== General =====================
Unique ID                   : 286627551693735511974392329575917185002 (0xD7A2755E3F16BEEE9BDE16D8F64467EA)
Complete name               : E:\Movies\The Matrix (1999)\The Matrix (1999) - 2160p.mkv
Format                      : Matroska
Formatversion               : Version 4 / Version 2
File size                   : 34.9 GB
Duration (ms)               : 2h 16mn
Overall bit rate mode       : Variable
Overall bit rate            : 36.6 Mbps
Encoded date                : UTC 2018-12-24 19:32:54
Writing application         : mkvmerge v29.0.0 ('Like It Or Not') 64-bit
Writing library             : libebml v1.3.6 + libmatroska v1.4.9

===================== Video =====================
Id                          : 1
Format                      : HEVC
Format info                 : High Efficiency Video Coding
Formatprofile               : Main 10@L5.1@High
Codec Id                    : V_MPEGH/ISO/HEVC
Duration (ms)               : 2h 16mn
Bit rate                    : 30.7 Mbps
Width                       : 3 840 pixels
Height                      : 1 600 pixels
Display aspect ratio        : 2.40:1
Frame rate mode             : Constant
Frame rate                  : 23.976 (24000/1001) fps
Color space                 : YUV
Chroma subsampling          : 4:2:0 (Type 2)
Bit depth                   : 10 bits
Bits/(Pixel*Frame)          : 0.208
Stream size                 : 29.2 GB (84%)
Writing library             : x265 2.7+348-0968a46d6ba4:[Windows][GCC 7.3.0][64 bit] 10bit
Encoding settings           : cpuid=1176575 / frame-threads=5 / numa-pools=32 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1600 / interlace=0 / total-frames=196092 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,20) / max-cll=992,518 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei
Default                     : Yes
Forced                      : No
Color range                 : Limited
Color primaries             : BT.2020
Transfer characteristics    : SMPTE ST 2084
Matrix coefficients         : BT.2020 non-constant
Mastering display color pri : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance : min: 0.0020 cd/m2, max: 1000.0000 cd/m2
Maximum Content Light Level : 992 cd/m2
Maximum Frame-Average Light : 518 cd/m2

===================== Audio #1 =====================
Id                          : 2
Format                      : Atmos / TrueHD
Codec Id                    : A_TRUEHD
Duration (ms)               : 2h 16mn
Bit rate mode               : Variable
Bit rate                    : 4 420 Kbps
Maximum bit rate            : 7 794 Kbps
Channel(s)                  : Object Based / 8 channels
Channel positions           : Object Based / Front: L C R, Side: L R, Back: L R, LFE
Sampling rate               :  / 48.0 KHz
Frame rate                  : 1 200.000 fps (40 spf)
Compression mode            : Lossless
Stream size                 : 4.21 GB (12%)
Title                       : Atmos 7.1
Language                    : English
Default                     : Yes
Forced                      : No

===================== Audio #2 =====================
Id                          : 3
Format                      : AC-3
Format info                 : Audio Coding 3
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : A_AC3
Duration (ms)               : 2h 16mn
Bit rate mode               : Constant
Bit rate                    : 640 Kbps
Channel(s)                  : 6 channels
Channel positions           : Front: L C R, Side: L R, LFE
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 624 MB (2%)
Title                       : AC-3 5.1
Language                    : English
Default                     : No
Forced                      : No

===================== Audio #3 =====================
Id                          : 4
Format                      : AC-3
Format info                 : Audio Coding 3
Formatprofile               : Dolby Digital
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : A_AC3
Duration (ms)               : 2h 16mn
Bit rate mode               : Constant
Bit rate                    : 192 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 187 MB (1%)
Title                       : Philosopher Commentary by Dr. Cornel West and Ken Wilber
Language                    : English
Default                     : No
Forced                      : No

===================== Audio #4 =====================
Id                          : 5
Format                      : AC-3
Format info                 : Audio Coding 3
Formatprofile               : Dolby Digital
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : A_AC3
Duration (ms)               : 2h 16mn
Bit rate mode               : Constant
Bit rate                    : 192 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 187 MB (1%)
Title                       : Critics Commentary by Todd McCarthy John Powers and David Thomson
Language                    : English
Default                     : No
Forced                      : No

===================== Audio #5 =====================
Id                          : 6
Format                      : AC-3
Format info                 : Audio Coding 3
Formatprofile               : Dolby Digital
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : A_AC3
Duration (ms)               : 2h 16mn
Bit rate mode               : Constant
Bit rate                    : 192 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 187 MB (1%)
Title                       : Cast and Crew Commentary by Carrie-Anne Moss, Zach Staenberg and John Gaeta
Language                    : English
Default                     : No
Forced                      : No

===================== Audio #6 =====================
Id                          : 7
Format                      : AC-3
Format info                 : Audio Coding 3
Formatprofile               : Dolby Digital
Mode extension              : CM (complete main)
Formatsettings, Endianness  : Big
Codec Id                    : A_AC3
Duration (ms)               : 2h 16mn
Bit rate mode               : Constant
Bit rate                    : 192 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 48.0 KHz
Frame rate                  : 31.250 fps (1536 spf)
Compression mode            : Lossy
Stream size                 : 187 MB (1%)
Title                       : Composer Commentary by Don Davis
Language                    : English
Default                     : No
Forced                      : No

===================== Text #1 =====================
Id                          : 8
Format                      : UTF-8
Codec Id                    : S_TEXT/UTF8
Codec info                  : UTF-8 Plain Text
Duration (ms)               : 2h 7mn
Bit rate                    : 41 bps
Countof elements            : 1344
Stream size                 : 38.6 KB (0%)
Title                       : Stripped SRT
Language                    : English
Default                     : No
Forced                      : No

===================== Text #2 =====================
Id                          : 9
Format                      : UTF-8
Codec Id                    : S_TEXT/UTF8
Codec info                  : UTF-8 Plain Text
Duration (ms)               : 2h 15mn
Bit rate                    : 40 bps
Countof elements            : 1373
Stream size                 : 39.9 KB (0%)
Title                       : SDH SRT
Language                    : English
Default                     : No
Forced                      : No

===================== Text #3 =====================
Id                          : 10
Format                      : PGS
Muxing mode                 : zlib
Codec Id                    : S_HDMV/PGS
Codec info                  : Picture based subtitle format used on BDs/HD-DVDs
Duration (ms)               : 2h 15mn
Bit rate                    : 21.3 Kbps
Countof elements            : 2746
Stream size                 : 20.6 MB (0%)
Title                       : SDH
Language                    : English
Default                     : No
Forced                      : No

===================== Menu =====================
00                          :00:00.000                             : en:00:00:00.000
00                          :03:25.789                             : en:00:03:25.789
00                          :06:35.645                             : en:00:06:35.645
00                          :09:42.665                             : en:00:09:42.665
00                          :11:58.301                             : en:00:11:58.301
00                          :16:47.423                             : en:00:16:47.423
00                          :21:33.542                             : en:00:21:33.542
00                          :25:08.590                             : en:00:25:08.590
00                          :28:51.146                             : en:00:28:51.146
00                          :32:25.193                             : en:00:32:25.193
00                          :35:21.870                             : en:00:35:21.870
00                          :38:40.902                             : en:00:38:40.902
00                          :44:22.577                             : en:00:44:22.577
00                          :46:33.541                             : en:00:46:33.541
00                          :48:57.852                             : en:00:48:57.852
00                          :53:31.291                             : en:00:53:31.291
00                          :56:32.139                             : en:00:56:32.139
00                          :59:01.288                             : en:00:59:01.288
01                          :01:08.582                             : en:01:01:08.582
01                          :05:16.496                             : en:01:05:16.496
01                          :07:46.813                             : en:01:07:46.813
01                          :12:33.432                             : en:01:12:33.432
01                          :17:49.582                             : en:01:17:49.582
01                          :21:03.108                             : en:01:21:03.108
01                          :25:05.350                             : en:01:25:05.350
01                          :29:45.130                             : en:01:29:45.130
01                          :31:27.565                             : en:01:31:27.565
01                          :37:25.256                             : en:01:37:25.256
01                          :41:04.976                             : en:01:41:04.976
01                          :44:20.337                             : en:01:44:20.337
01                          :47:00.497                             : en:01:47:00.497
01                          :50:18.529                             : en:01:50:18.529
01                          :52:56.687                             : en:01:52:56.687
01                          :56:36.907                             : en:01:56:36.907
01                          :58:49.372                             : en:01:58:49.372
02                          :02:27.423                             : en:02:02:27.423
02                          :05:41.784                             : en:02:05:41.784
02                          :08:46.802                             : en:02:08:46.802

Link to comment
Share on other sites

snake98

Nothing is "crashing" correct?  It is just not able to create thumbs for those items...

yes, except it keeps trying every time the plug-in runs.

Edited by snake98
Link to comment
Share on other sites

snake98

Can you provide a sample video for testing? thanks !

Here is the link to download 30 seconds is over 100 megs

(removed)

Edited by snake98
Link to comment
Share on other sites

Did you verify that the problem occurs with the sample? In fact the roku plugin might even ignore a short video like this.

Link to comment
Share on other sites

snake98

Did you verify that the problem occurs with the sample? In fact the roku plugin might even ignore a short video like this.

No, I'll make a 5 min video and try again

 

it may take a while as it keeps trying to do the big one that fails first.

Edited by snake98
Link to comment
Share on other sites

Actually yes it looks like it is hitting the 30 minute time limit that we've allotted. That is a long time to extract thumbs for one single video @@softworkz. I suppose we will have to raise the time limit even more.

Link to comment
Share on other sites

Actually yes it looks like it is hitting the 30 minute time limit that we've allotted. That is a long time to extract thumbs for one single video @@softworkz. I suppose we will have to raise the time limit even more.

 

Might be true, but I'm not yet sure about that. 

 

@@snake98 - The log lines you've posted do not match.

2019-01-08 10:47:45.031 "Extraction Start"
2019-01-08 11:30:36.952 "Extraction Error"

are from different  operations.

 

Please post a full server log.

Link to comment
Share on other sites

snake98

Might be true, but I'm not yet sure about that. 

 

@@snake98 - The log lines you've posted do not match.

2019-01-08 10:47:45.031 "Extraction Start"
2019-01-08 11:30:36.952 "Extraction Error"

are from different  operations.

 

Please post a full server log.

 

 

attached

 

fyi this is on on i7-8700 cpu.

server.log

Edited by snake98
Link to comment
Share on other sites

  • Solution

Thanks for the new log.

2019-01-09 06:43:00.317 Info MediaEncoder: ProcessRun 'ffmpgeg extract-imageseries' Started.
2019-01-09 07:13:00.359 Error MediaEncoder: Error running ffmpgeg extract-imageseries 

OK, this confirms that the 30min limit is being hit. I just wanted to be sure. In the initial post you had two separate extraction tasks with a time difference of 43 min from start of task 1 until error of task 2. 

 

Locally, I don't get any better extraction performance. The problem is that the whole video is being decoded during the extraction process which takes its time with such high-bitrate videos.

We're working to improve this process or at least increase the time limit as an intermediate solution.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

snake98

 

Thanks for the new log.

2019-01-09 06:43:00.317 Info MediaEncoder: ProcessRun 'ffmpgeg extract-imageseries' Started.
2019-01-09 07:13:00.359 Error MediaEncoder: Error running ffmpgeg extract-imageseries 

OK, this confirms that the 30min limit is being hit. I just wanted to be sure. In the initial post you had two separate extraction tasks with a time difference of 43 min from start of task 1 until error of task 2. 

 

Locally, I don't get any better extraction performance. The problem is that the whole video is being decoded during the extraction process which takes its time with such high-bitrate videos.

We're working to improve this process or at least increase the time limit as an intermediate solution.

 

 

 

 

 

okay i"ll just make a dummy .bif file for right now so it doesn't keep trying.  I don't know if hardware acceleration would help, but it broken the 3.6 betas on the roku plugin. link

Link to comment
Share on other sites

okay i"ll just make a dummy .bif file for right now so it doesn't keep trying.  I don't know if hardware acceleration would help, but it broken the 3.6 betas on the roku plugin. link

 

Hardware acceleration would surely help and we will get this working soon. The reason why we don't do it right now, is that this could totally lock down the server performance-wise.

So, before we can enable this, we'll need some way to dynamically pause or stop/resume background tasks depending on the actual server usage.

Link to comment
Share on other sites

snake98

I copied a bif from another movie and name it correctly so it would stop trying to create it, but that didn't work  is there something else I can do so it will skip that file?

Link to comment
Share on other sites

  • 4 weeks later...
olliebean

This is causing a problem for me because every time the scheduled "Create thumbnails" task runs, it's wasting half an hour on this one particular file before giving up. Could someone please explain exactly how to create and name a dummy bif file to prevent this? If I just copy it from another file's metadata, won't the subfolder names be wrong? Also is there a way to create a bif that will just be ignored by the Roku, rather than copying one and having the thumbnails from a different video showing up?

Link to comment
Share on other sites

olliebean

FWIW, I managed to get Emby itself to create a dummy bif, by manually terminating the ffmpeg process when it started working on the problem file. The drawback is I now have a bif containing thumbnails for only the first minute or so of the file and the Roku won't let me fast-forward beyond that point in the video.

Link to comment
Share on other sites

olliebean

Finally fixed it with the aid of Process Hacker by copying the ffmpeg command line, running it separately in a cmd window to create all the thumbnails (it ran for over an hour in the end), starting the Emby "Create thumbnails" task, suspending the ffmpeg process when it started processing that file, copying all the thumbnails into the temporary directory it was using, then terminating ffmpeg which effectively signaled to Emby that the thumbnails were ready to be packed into the complete bif file.

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