Jump to content

One series of shows stuck at 99% only when played on Roku.


amack

Recommended Posts

Here is the real culprit..

Spoiler

2022-01-12 17:50:48.553 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 0
2022-01-12 17:50:48.553 Info App: AppendExtraLogData - File Deleted
2022-01-12 17:50:48.554 Info App: ProcessRun 'StreamTranscode 7e2bba' Process exited with code 1
2022-01-12 17:50:48.589 Info App: ProcessRun 'StreamTranscode 7e2bba' Execute: C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\system\ffmpeg.exe -loglevel +timing -y -print_graphs_file "C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\logs\ffmpeg-transcode-7e2bbabf-af54-4984-b8c8-0ed048e2bf55_1graph.txt" -copyts -start_at_zero -f mp4 -ss 00:00:03.000 -c:v:0 h264 -i "Y:\TV_14\Star Trek The Next Generation\Star Trek TNG Season 05\Star Trek The Next Generation S05E02 Darmok.mp4" -map 0:0 -map 0:1 -sn -c:v:0 libx264 -g:v:0 72 -maxrate:v:0 3498055 -bufsize:v:0 6996110 -sc_threshold:v:0 0 -keyint_min:v:0 72 -r:v:0 23.976024627685547 -pix_fmt:v:0 yuv420p -preset:v:0 veryfast -profile:v:0 high -level:v:0 4.0 -x264opts:v:0 "subme=0:me_range=4:rc_lookahead=10:partitions=none" -crf:v:0 23 -c:a:0 copy -metadata:s:a:0 language=eng -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\transcoding-temp\238BB4.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_start_number 1 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\transcoding-temp\238BB4_%d.ts"
2022-01-12 17:50:48.705 Info App: AppendExtraLogData - Read graph file: C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\logs\ffmpeg-transcode-7e2bbabf-af54-4984-b8c8-0ed048e2bf55_1graph.txt
2022-01-12 17:50:48.705 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 0
2022-01-12 17:50:48.705 Info App: AppendExtraLogData - File Deleted
2022-01-12 17:50:48.706 Info App: ProcessRun 'StreamTranscode 7e2bba' Process exited with code 1
2022-01-12 17:50:48.711 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.7.0
    Command line: C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows 6.1.7601 Service Pack 1
    Framework: .NET Core 3.1.21
    OS/Process: x64/x64
    Runtime: C:/Users/admin.8005T-SIETE2/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 8
    Data path: C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server
    Application path: C:\Users\admin.8005T-SIETE2\AppData\Roaming\Emby-Server\system
    System.Exception: System.Exception: Error starting ffmpeg
       at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationToken cancellationToken, Boolean acquireResources)
       at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String playlistId, String segmentId, Int32 subtitleStreamIndex)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: Emby.Server.MediaEncoding
    TargetSite: Void MoveNext()

Ffmpeg believes it has finished and so does Emby. It has deleted the transcoded TS file already. But the Roku wants it still as it believes it still has more to play (blame the header?). This is very, very, very, (insert 100 more verys) much a problem with hardware acceleration or some ghosts.

@elhuevon You might try with MKV and have different results. Rather than re-encode the streams. Just re-container-ize. Maybe inside MKV they play nicer.

Edited by speechles
Link to comment
Share on other sites

@speechles

I assume this is more than renaming the extension from mp4 to mkv, correct? What do I need to recontainerize to mkv?

 

Link to comment
Share on other sites

Happy2Play
4 minutes ago, elhuevon said:

@speechles

I assume this is more than renaming the extension from mp4 to mkv, correct? What do I need to recontainerize to mkv?

 

Just process it with mkvtoolnix.

Link to comment
Share on other sites

54 minutes ago, Happy2Play said:

Just process it with mkvtoolnix.

It won't be able to demux the MP4.

@elhuevon You can do this with ffmpeg. If ffmpeg is in the path the below will work. Just point "input.mp4" to the full path of the file you want to convert.

ffmpeg -i input.mp4 -vcodec copy -acodec copy -c:s copy output.mkv

Edited by speechles
Link to comment
Share on other sites

pwhodges
15 hours ago, speechles said:

It won't be able to demux the MP4.

What makes you think that?  MKVToolNix happily reads and demuxes mp4, avi, ts, and I don't know what else; it only writes mkv, though.

Paul

  • Like 1
Link to comment
Share on other sites

I did both suggestions using ffmpeg  in a cmd window and running the file in MKVtooknx.  They both spit out fine mkv files but neither would play on the Roku.  The Ref Frame is still 16.  Which I would expect since neither option is changing anything that I can tell.  I didn't see any settings in MKVtoolnx to change Frame setting but I'm not sure where to look.  The problem seems to be more than just the container.

Link to comment
Share on other sites

I cannot find anything official but I have found discussions of people having trouble with videos on the Roku when the ref frames are over 9 although some reference up to 12 working okay.  I cannot find any examples of videos with 16.

Link to comment
Share on other sites

I looked through various media types on my server, everything is lower, a lot lower than 16.

Is there an easy way to change ref frames without reencoding?

Link to comment
Share on other sites

1 hour ago, elhuevon said:

I looked through various media types on my server, everything is lower, a lot lower than 16.

Is there an easy way to change ref frames without reencoding?

Reencoding is the only way.

Link to comment
Share on other sites

31 minutes ago, elhuevon said:

I'm willing to do that. Which program would be recommended, Handbrake?

Yes, or the server's built in conversion feature.

Link to comment
Share on other sites

I copied three files into a test folder that Emby can see.  I started the conversion process.  They either immediately fail or they get to 60% and fail. Then I just put one file in the folder with a  custom profile to convert to mkv.  That failed quickly as well.  The log file has a lot of errors. See attached.

ffmpeg-transcode-a8fe3065-38a2-4c9a-9591-879cc4e3055b_1.txt

Link to comment
Share on other sites

One thing you could try is turning off hardware transcoding in server transcoding settings and see if that helps with that.

Link to comment
Share on other sites

Happy2Play

Was just testing this on file provided and I don't get this QSV decoding error but am on Windows stable and beta.  May be driver related.

Is this a headless server?

Encoder QuickSync RDPDD Chained DD - H.264 (AVC)
Decoder QuickSync RDPDD Chained DD - H.264 (AVC)

Adapter #0: 'RDPDD Chained DD' Id:0 (Driver: 655378.659785, Vendor: 0, SDK Version: 1.11)

Hardware Video Acceleration Fails with Remote Desktop (RDP) on Windows : Emby

@softworkzwould this be correct?

  • Like 1
Link to comment
Share on other sites

>>>>>>  Affected codecs
Encoder QuickSync RDPDD Chained DD - H.264 (AVC)
        Adapter #0: 'RDPDD Chained DD' Id:0 (Driver: 655378.659785, Vendor: 0, SDK Version: 1.11)
        Frame Sizes: 32x32...8192x8192 - Width Alignment: 16 - Height Alignment: 16
        Color Formats: NV12, P010, QSV
        Profiles: Baseline Profile (Level 5.2), Main Profile (Level 5.2), High Profile (Level 5.2)

Decoder QuickSync RDPDD Chained DD - H.264 (AVC)
        Adapter #0: 'RDPDD Chained DD' Id:0 (Driver: 655378.659785, Vendor: 0, SDK Version: 1.11)
        Frame Sizes: 16x16...16384x16384 - Width Alignment: 2 - Height Alignment: 2
        Profiles: Baseline Profile (Level 5.2), Main Profile (Level 5.2), Extended Profile (Level 5.2), High Profile (Level 5.2), Constrained Baseline Profile (Level 5.2), Progressive High Profile (Level 5.2), Constrained High Profile (Level 5.2)

QuickSync RDPDD Chained DD => those devices are coming from the remote desktop service.

Your hardware (CPU) does not support DX11, only DX9, which means that you need to have a monitor connected and Emby Server must not run inside an RDP session in order for HW acceleration to work.

Link to comment
Share on other sites

The server runs on Win7 but I admin it through rdp as needed (headless) never been an issue.

So conversion should work if I'm on the server (not in an rdp session) or follow the link to make a GP change, correct?

Link to comment
Share on other sites

Disabled HW acceleration (took a second to find).  Did  two files one a TV profile and the other a custom profile again.  They did not fail this time.  They converted and copied over.  Most importantly they played on the Roku.  Still need to double check the Rokus in the house and maybe try a few other files but this is looking very promising.

What does HW acceleration do?  Should it be re-enabled  after all the conversions are done?

Edited by elhuevon
Link to comment
Share on other sites

On 1/23/2022 at 8:19 PM, softworkz said:

Your hardware (CPU) does not support DX11, only DX9, which means that you need to have a monitor connected and Emby Server must not run inside an RDP session in order for HW acceleration to work.

On 1/23/2022 at 11:16 PM, elhuevon said:

The server runs on Win7 but I admin it through rdp as needed (headless)

 

16 minutes ago, elhuevon said:

What does HW acceleration do?

It can use the chip on  your video card or integrated video to speed up graphics operations.

17 minutes ago, elhuevon said:

Should it be re-enabled  after all the conversions are done?

Probably not unless you plan to connect a monitor to the server.

Link to comment
Share on other sites

Happy2Play
On 1/30/2022 at 7:18 AM, elhuevon said:

Disabled HW acceleration (took a second to find).

What options do have available in Transcoding "Enable hardware acceleration when available:" option Advanced?

example

image.png.9bd9e4f2c3f6d07702ca327498ea22fe.png

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