bardmaster 17 Posted May 9, 2017 Author Share Posted May 9, 2017 looks like blue neon is transcoding - interesting! High-80's fps transcode log.txt Link to comment Share on other sites More sharing options...
Luke 37099 Posted May 9, 2017 Share Posted May 9, 2017 Ok so @@ebr will need to review. Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted May 9, 2017 Share Posted May 9, 2017 The Neon Blue app is just reducing bitrate. Are both apps set to the same bitrate? Link to comment Share on other sites More sharing options...
ebr 14925 Posted May 9, 2017 Share Posted May 9, 2017 Yeah the default in BN I think is 3Mb. Set the options to force direct play as Speechles indicated above to get an apple-apple comparison. Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 9, 2017 Share Posted May 9, 2017 (edited) Yep, as ebr stated, to make this a real test dont click "play" yet on the problem items detail screen, instead click the "more" button then choose "force direct". See what happens when you play something. You want to avoid using either of the "auto-detection" choices. You want to be in full control of the play method for these tests, not the software. In preferences there is an option called "reset play method" which can be set to NO. This will keep the software from reset (switching back to auto-detection) your play method choice after you complete each play session test. You can also use "force transcode" and "force transcode w/o directstream". The force transcode will still possibly copy the video stream (depending on your max video bitrate you set in preferences), this might still cause an issue. If so, use the "w/o directstream" option, this will tell the app to use a max video bitrate of just below the bitrate of the videostream (-1), so this works to force a full transcode of the video with the absolute minimum quality loss. Using all 3 of these play methods helps diagnose whether its the apps auto-detection not working, or something in the roku firmware causing an issue. Edited May 9, 2017 by speechles Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 10, 2017 Author Share Posted May 10, 2017 OK I set force direct for the same sample file and had some interesting results. The first time I ran the video it played but without sound. The second time it crashed Roku at the 100% loading mark in the same manner - Emby thinks it's still running. Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 10, 2017 Share Posted May 10, 2017 (edited) OK I set force direct for the same sample file and had some interesting results. The first time I ran the video it played but without sound. The second time it crashed Roku at the 100% loading mark in the same manner - Emby thinks it's still running. Hmm.. the fact it played but without sound is weird. It should produce almost near identical issues every time, predictable. Maybe it was resume in direct play when playing without sound? Can you try, use the "force transcode" option and see if the item plays. If it does, move the pointer ahead to the middle of the video. Then let it play again and then exit out of the player via the back button. This should create a resume point. Then try to resume the video when using "force direct" option. Does this work? It would be nice to be better able to understand what is happening. If you set the max video bitrate to 40Mbit and try to play the item with "use auto-detection" this should be the same behavior as using "force direct" (at least in regards to that video). It has to be those digital tv subtitles causing the issue. That is the only real culprit that I can see to point my finger at. Wish I could tell you more, but this is one of those things we might need to gather up the scooby snacks and try to get the mystery machine headed our way. I seriously can't see a reason for the roku to reboot whilst playing that video, unless the header is compressed in the mp4 ...OR.. the video stream is embedded (muxed) with subtitle streams the player doesn't understand when using mp4 as the container. Edited May 10, 2017 by speechles Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted May 10, 2017 Share Posted May 10, 2017 No sound from direct play would make since if the audio is AAC 5.1, if same as info provided above. I didn't see a Roku model listed anywhere as only the newest versions supported AAC 5.1. Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 10, 2017 Share Posted May 10, 2017 if audio.lookup("AAC") <> invalid audioContainers = audioContainers + ",mp4,mka,m4a" mkvAudio = mkvAudio + ",aac" mp4Audio = mp4Audio + ",aac" end if ... s = CreateObject("roRegex","aac","i") if s.isMatch(t) and forceSurround = "0" then if audio.lookup("AAC") <> invalid transAudio = AACconv end if end if ... ' support AAC if found AACchannels = audio.lookup("AAC") if AACchannels <> invalid AACchannels = left(AACchannels,1) profiles.push({ Type: "VideoAudio" Codec: "aac" Conditions: [{ Condition: "Equals" Property: "IsSecondaryAudio" Value: "false" IsRequired: false }, { Condition: "LessThanEqual" Property: "AudioChannels" Value: AACchannels IsRequired: true }) }) end if Yeah if forcing direct play on AAC 5.1 it should give no sound if you really don't have it capable on your end device the roku connects to. If auto-detect is used, the above code determines support for it. You can see mp4 and aac go together like peanut butter n jelly does on sandwiches, an awesome combination. After mp4/aac support is added the auto-detect determines the max AAC channels supported and transcodes or not based upon discovery from the device.Using force transcode will respect the profile shown above for AAC. It will only direct stream (copy) the audio, if the device supports 6 channels (5.1) otherwise will transcode the audio stream and downsample.I suspect ebr is following the same kind of logic in his capabilities. The problem is, the mp4 passes all the checks and makes it through as though the device can direct play. The new 7.6 firmware will allow devices to downsample the AAC to 2.0 on the device on the fly. These devices that do this, will report they are capable of AAC 5.1 when really its downsample to 2.0.@@bardmaster Is there somewhere on the internets you can put a sample of that video which exhibits the problem somewhere, so that ebr and myself can play with it? Thanks Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 I did a quick recording and was able to upload - see attached. input.ts = original recording from Emby output.mp4 = my transcoded version To save space, I transcoded to a low bitrate, doesn't appear to make a difference re: Roku crashing whether I reduce bitrate or not. ffmpeg -i input.ts -b:v 500k -y output.mp4 TEMP.zip Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 13, 2017 Share Posted May 13, 2017 (edited) @@bardmaster Which type of roku device do you have? Tested on blue neon with my roku ultra: Force direct the .ts it fails with "malformed data" then falls back to transcoding and plays fine, sound is present. Force direct the .mp4 it plays fine in direct play, sound is present. Tested on roku beta app, same behavior, the ts is transcoded, the mp4 direct plays. During testing though, ran across a video that crashed the roku ultra immediately. Seems if you force direct an avi it will now crash the device, rather than produce the usual "unsupported video type" or "malformed data" errors. This means the video player is buggy, and 7.6 firmware hasnt corrected it. Knowing what type of device you have will help figure out what is going on. Sent from my Nexus 7 using Tapatalk Edited May 13, 2017 by speechles Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 Roku 2 4210x, same behavior on Roku 3 4230x Sent from my SM-G920V using Tapatalk Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 What would be awesome if you try to replicate the scenario with your own TS recording. Sent from my SM-G920V using Tapatalk Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 13, 2017 Share Posted May 13, 2017 (edited) What would be awesome if you try to replicate the scenario with your own TS recording. Sent from my SM-G920V using Tapatalk Aye, but would require some sort of dvr to accomplish such a task. Some type of satellite or cable subscription. An antenna hooked up to some type of digital recorder. None of which I have. In absense of such, I can run the same tests above on my old roku3. Havent used it much last 6 months. Dusted it off, and updated it to 7.6.0 build 4125-04. --- Roku3 4200x with blue neon and force direct: .ts fails with "malformed data" falls back to transcoding, plays fine, can hear sound. .mp4 plays direct but no sound. --- Roku3 4200x with blue neon and force transcode: .ts plays transcoded, can hear sound. .mp4 hangs at 100% loading bar, for seems like 5-6 seconds, moments later roku reboots... --- Roku3 4200x with blue neon and force transcode w/o direct stream: .ts plays transcoded, can hear sound. .mp4 plays transcoded, can hear sound. Perhaps the broadcom 11130 chipset the roku 3 (and newer roku 2) doesnt like 1 refframe? That would be the only thing that makes sense here. Notice that the transcode without direct stream works. This forces the server to re-encode the video stream, not copy. @@ebr do you have time to test this theory. Its the same as your issue on android regarding 1 refframe. This issue only affects devices beginning with 42** in their model number. Odd it doesnt affect direct play, yet only while transcoding when the video stream is copied. An HLS bug in that chipsets firmware possibly? Things that make you go hmmm.. Edited May 13, 2017 by speechles Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 Aye, but would require some sort of dvr to accomplish such a task. Some type of satellite or cable subscription. An antenna hooked up to some type of digital recorder. None of which I have. In absense of such, I can run the same tests above on my old roku3. Havent used it much last 6 months. Dusted it off, and updated it to 7.6.0 build 4125-04. --- Roku3 4200x with blue neon and force direct: .ts fails with "malformed data" falls back to transcoding, plays fine, can hear sound. .mp4 plays direct but no sound. --- Roku3 4200x with blue neon and force transcode: .ts plays transcoded, can hear sound. .mp4 hangs at 100% loading bar, for seems like 5-6 seconds, moments later roku reboots... --- Roku3 4200x with blue neon and force transcode w/o direct stream: .ts plays transcoded, can hear sound. .mp4 plays transcoded, can hear sound. Perhaps the broadcom 11130 chipset the roku 3 (and newer roku 2) doesnt like 1 refframe? That would be the only thing that makes sense here. Notice that the transcode without direct stream works. This forces the server to re-encode the video stream, not copy. @@ebr do you have time to test this theory. Its the same as your issue on android regarding 1 refframe. This issue only affects devices beginning with 42** in their model number. Odd it doesnt affect direct play, yet only while transcoding when the video stream is copied. An HLS bug in that chipsets firmware possibly? Things that make you go hmmm.. Wow you are a true cord-cutter! I salute you, sir! I suppose I'm just bending it myself, as I have a Comcast subscription but use my own hardware and software to watch and record TV. That's why I was drawn to Emby, since their new platform (post-MB3 if you will) is like my old favorite, Plex, mixed with an excellent live TV and DVR solution. Sorry, just rambling on a Friday nite! Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 13, 2017 Share Posted May 13, 2017 The good part here, is your scenario is reproduceable. Just need ebr to see if he can reproduce the issue the same on blue neon, which I am positive he can. This is why I chose to allow the forced play methods was to allow this exact method of troubleshooting playback. All that is required is a capabilities change that if the device model is a 42** variant to set the h264 profile so that refframe != 1 and set that as isrequired. Will need to wait and see... Sent from my Nexus 7 using Tapatalk Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 OK I just tried it on a Roku Streaming Stick (3600X) and that sample played fine - both video and audio. So yes it looks like you're onto something, @@speechles! Link to comment Share on other sites More sharing options...
ebr 14925 Posted May 13, 2017 Share Posted May 13, 2017 All that is required is a capabilities change that if the device model is a 42** variant to set the h264 profile so that refframe != 1 and set that as isrequired. But only for an mp4 container, right? Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 13, 2017 Share Posted May 13, 2017 But only for an mp4 container, right?Yes sir. Mp4 for sure, but not sure if mov/m4v have the same problem, since those are masqueraded as mp4 it is possible. Mkv appears to be problem free. Sent from my Nexus 7 using Tapatalk Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 13, 2017 Author Share Posted May 13, 2017 Agreed, mkv is playing fine regardless of codec. Sent from my SM-G920V using Tapatalk Link to comment Share on other sites More sharing options...
ebr 14925 Posted May 14, 2017 Share Posted May 14, 2017 Please test this with 3.0.24. Thanks. Link to comment Share on other sites More sharing options...
bardmaster 17 Posted May 14, 2017 Author Share Posted May 14, 2017 Please test this with 3.0.24. Thanks. Sorry @@ebr, just updated the beta app to 3.0.24 but Roku still crashes... Link to comment Share on other sites More sharing options...
speechles 1920 Posted May 14, 2017 Share Posted May 14, 2017 (edited) Sorry @@ebr, just updated the beta app to 3.0.24 but Roku still crashes... I know why it isnt working. It isn't the fact it has to transcode versus direct play that is the problem. It is the fact the video stream cannot be copied when it is transcoding. This will crash the player. device = CreateObject("roDeviceInfo") if left(tostr(device.GetModel()), 2) = "42" and item.mediasources <> invalid and lcase(item.mediasources[0].Container) = "mp4" h264Conditions.push({ Condition: "NotEquals" Property: "RefFrames" Value: "1" IsRequired: true }) end if That code should prevent it from copying an h264 stream. Does the server have a "RefFrames" property for h264 conditions though? This I am not sure.. but to be sure the below method will always work... I make the "do not copy video stream" happen in the blue neon app, by checking the bitrate of the video stream of the item which is attempting to play. If it has no bitrate nothing can be done. But if it does, the maximum video bitrate the app will set for that item is (video.bitrate - 1). This forces the server to then transcode the video stream, not merely copy it. @@ebr you will need to do something similar for items which cannot have the video stream copied. There is no way to inform the server not to copy the video stream, except by setting the maximum bitrate to 1 below the video stream bitrate. sorta like this: device = CreateObject("roDeviceInfo") if left(tostr(device.GetModel()), 2) = "42" if item.mediasources <> invalid and lcase(item.mediasources[0].Container) = "mp4" for each mediasource in item.mediasources[0].MediaStreams if mediasource.Type = "Video" if lcase(mediasource.codec) = "h264" and mediaSource.RefFrames = "1" if mediasource.bitrate <> invalid maxVideoBitrate = mediasource.bitrate - 1 exit for end if end if end if end for end if end if Edited May 14, 2017 by speechles Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now