Page 2 of 2

Re: Need assistance with new Roku Profiles

PostPosted: Mon Jan 09, 2017 1:41 am
by atc98092
Zip, I am unable to make applehttp to work as a target container. Using the existing Chaneru profile, the file loads and begins playing, then stops like it's buffering but it never continues. Watching my network connection, I see no data being streamed. This is the file info:

  Code:
Input #0, mpegts, from 'logan's run (1976).m2ts':
  Duration: 01:58:31.62, start: 11.650667, bitrate: 24686 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p(bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s32 (24 bit)
    Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 192 kb/s
    Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 192 kb/s
    Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 192 kb/s
    Stream #0:7[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:8[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:9[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:10[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:11[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:12[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:13[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)


With a different video, ffmpeg loads then exits with the following error in the Serviio log:
  Code:
2017-01-08 17:30:37,442 WARN  [ProcessExecutor] Process cmd has a return code of 1! This is a possible error. Detailed output follows.
encoder         : Lavc57.24.102 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (dts (dca) -> aac (native))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

This is the info for that file. It happens with all 7 Star Wars m2ts files:
  Code:
Input #0, mpegts, from 'star wars (1977).m2ts':
  Duration: 02:02:17.86, start: 11.650667, bitrate: 45312 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 6.1, s32p (24 bit)
    Stream #0:2[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:4[0x1103]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:5[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:6[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 224 kb/s
    Stream #0:7[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 224 kb/s
    Stream #0:8[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090),1920x1080
    Stream #0:9[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090),1920x1080
    Stream #0:10[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:11[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:12[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:13[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:14[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:15[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:16[0x1208]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:17[0x1209]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:18[0x120a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:19[0x120b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:20[0x120c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:21[0x120d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:22[0x120e]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:23[0x120f]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:24[0x1210]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:25[0x1211]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:26[0x1212]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:27[0x1213]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:28[0x1214]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:29[0x1215]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:30[0x1216]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:31[0x1217]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:32[0x1218]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:33[0x1219]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:34[0x121a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:35[0x121b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:36[0x121c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:37[0x121d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)


I have every type of file working correctly, except for HD Blu Ray rips. It doesn't matter the vCodec, as I have h264 and VC-1 video, or even the audio codec, as it happens with Dolby TrueHD and DTS Master Audio. I thought I had it working when I transcoded the h264 video to h264 (used the mac bitrate to force transcoding) in the mpeg-ts container, even though all Roku players support it, but I only made it about 20 minutes into the movie before it stopped playing and either rebooted the Roku or gave an unsupported file error. I'm really at a loss. Plex can transcode the correctly somehow, but they use a proprietary transcoding program, not ffmpeg.

Re: Need assistance with new Roku Profiles

PostPosted: Mon Jan 09, 2017 1:39 pm
by zip
It could be a bug in FFmpeg, or a missing / invalid FFmpeg parameter passed by Serviio. As before, any chance of creating a few second clip that I can use for testing (with all the audio tracks, etc). If yes, create a bitbucket ticket and attach the video here - I will look at it when I start working on 1.9 properly

Re: Need assistance with new Roku Profiles

PostPosted: Mon Jan 09, 2017 10:06 pm
by atc98092
zip wrote:It could be a bug in FFmpeg, or a missing / invalid FFmpeg parameter passed by Serviio. As before, any chance of creating a few second clip that I can use for testing (with all the audio tracks, etc). If yes, create a bitbucket ticket and attach the video here - I will look at it when I start working on 1.9 properly


I'll cut a section out of the video. Might not be long enough to make the error occur. What is the file size limit to post it here, or would you want it posted somewhere else?

BitBucket created: https://bitbucket.org/xnejp03/serviio/i ... u-profiles

Re: Need assistance with new Roku Profiles

PostPosted: Sun Jan 22, 2017 9:14 pm
by atc98092
Zip, I've enabled debugging to get the transcoding command line, and I don't completely understand the string you are using:

  Code:
ffmpeg.exe -threads 0 -i C:\Users\Public\Videos\The Empire Strikes Back (1980).m2ts -y -c:v libx264 -pix_fmt yuv420p -b:v 96000k -maxrate:v 96000k -bufsize:v 96000k -profile:v baseline -level 3 -preset:v veryfast -crf 10 -r 24000/1001 -g 15 -bsf:v h264_mp4toannexb -flags -global_header -c:a:0 ac3 -b:a:0 192k -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-c9f5f134b1b06fc003e44b600ce26e1d.stf


What does the mp4toannexb switch do? Based on what I read on the ffmpeg documentation site, I'm not certain it's necessary, but I'm pretty new to this level of control.

That being said, at the moment I'm watching one of my Star Wars rips, and I'm 23 minutes in without an issue. I haven't changed anything on my profile command line, and I don't believe the Roku has received new firmware in the meantime. Perhaps something (no idea what) has changed somewhere and now my HD audio transcoding is working as expected. If so, I'll be wrapping up the new Roku profiles and sending them to you. I'll let you know.