Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 I guess technically they never have, but I swore they played before as I have a few that are watched. But who knows they may have been transcoded back then. https://forums.roku.com/viewtopic.php?t=7203 Link to comment Share on other sites More sharing options...
speechles 1929 Posted September 13, 2017 Author Share Posted September 13, 2017 (edited) @@Happy2Play Here is the code for the capabilities profile to send to the server. mpeg4Conditions = [] mpeg4Conditions.push({ Condition: "LessThanEqual" Property: "RefFrames" Value: tostr(maxRef) IsRequired: false }) mpeg4Conditions.push({ Condition: "LessThanEqual" Property: "VideoBitDepth" Value: "8" IsRequired: false }) mpeg4Conditions.push({ Condition: "LessThanEqual" Property: "Width" Value: maxWidth IsRequired: true }) mpeg4Conditions.push({ Condition: "LessThanEqual" Property: "Height" Value: maxHeight IsRequired: true }) mpeg4Conditions.push({ Condition: "LessThanEqual" Property: "VideoFramerate" Value: framerate IsRequired: false }) if playsAnamorphic = false Then mpeg4Conditions.push({ Condition: "Equals" Property: "IsAnamorphic" Value: "false" IsRequired: false }) end if mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DX50" IsRequired: true }) t = m.Extension if t <> invalid then ' mkv container with mpeg4 cannot be xvid/divx/mp4v r = CreateObject("roRegex","mkv","i") if r.isMatch(t) then mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DIVX" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "XVID" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "MP4V" IsRequired: false }) end if end if profiles.push({ Type: "Video" Codec: "mpeg4" Conditions: mpeg4Conditions }) Here is the code which decides whether to use mpeg4 or h264 when transcoding. This is in the app, not the capabilities to force the server to respect this. u = m.Extension ' the default transVideo = "h264" ' get container if u <> invalid then ' mkv container with mpeg4 cannot be xvid/divx r = CreateObject("roRegex","mkv","i") if r.isMatch(u) or onlyh264 = "1" then ' do nothing mpeg4 in mkv should not pass else ' mpeg4 is not in mkv p = CreateObject("roRegex","mpeg4","i") if p.isMatch(t) then transVideo = "mpeg4" end if end if end if So the short end of the stick is.. yes.. mpeg4 was always acceptable. If roku now wants to change the game and rewrite documentation that is on them. But the rules are there because they always worked on a roku3, at the time rokus best device. Now that other hardware is out, which isn't based on the same broadcom chip. Now we have a can of worms, as what we once knew was correct, now may have some edge cases that wont. The very odd part is the transcode is copy both streams. So it acts like it just dislikes the mp4 extension to direct play. Then HLS can give it same exact audio/video streams, mpeg4/aac and it plays? So HLS has better support in the firmware than direct play. Thats probably the answer. If you were to repackage those same 2 streams into an MKV I bet they play just fine. This is the same issue several users on roku forums pointed out. MKV > MP4 now. Edited September 13, 2017 by speechles Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 Removed "sample" from the file-name and it loaded fine. Won't direct play in Emby app or Bnn on my Roku Premiere +. but it will play fine in Bnn if i use either transcode option. Link to comment Share on other sites More sharing options...
mikeraburn 60 Posted September 13, 2017 Share Posted September 13, 2017 I have several mp4s and just viewed one 2 days ago and it directs play in Blue Neon on auto detect. Roku Ultra Link to comment Share on other sites More sharing options...
mikeraburn 60 Posted September 13, 2017 Share Posted September 13, 2017 @@Flamebird This may seem like a silly question and you may have stated it in one of your posts, but here it goes, Are you plugging a USB device into the Rokus USB port and trying to view the files from that usb device or are you utilizing a computer / NAS box with Emby server installed and viewing over the network? Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 (edited) I have several mp4s and just viewed one 2 days ago and it directs play in Blue Neon on auto detect. Roku Ultra Are they MPEG4 encoded? Edited September 13, 2017 by Happy2Play Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 (edited) @@speechles converting to mkv made no difference on my Roku Ultra. Force transcode Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> ac3 (native)) My Roku 3 is at a different location so I can't test older device. Edited September 13, 2017 by Happy2Play Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 I have several mp4s and just viewed one 2 days ago and it directs play in Blue Neon on auto detect. Roku Ultra Are they MPEG4 or h264 in the folder? It seems like the MPEG4 part is the problem. Now I'm wondering if Plex has been transcoding these files all along and I didn't notice it. Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 @@Flamebird This may seem like a silly question and you may have stated it in one of your posts, but here it goes, Are you plugging a USB device into the Rokus USB port and trying to view the files from that usb device or are you utilizing a computer / NAS box with Emby server installed and viewing over the network? Media is on a Synology NAS plugged into my router; Emby server is currently on my laptop, as I use it for testing out new programs to see if I like them, before committing to my main pc. Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 @@speechles @@ebr Was mpeg4 removed as supported Roku format? https://sdkdocs.roku.com/display/sdkdoc/Audio+and+Video+Support I just confirmed all my mpeg4 media gets Green Screen. The truly strange thing is that some of the files that were originally "green screening" in Emby; later played fine. That's why I picked the episode I did, as it consistently showed the problem. Link to comment Share on other sites More sharing options...
speechles 1929 Posted September 13, 2017 Author Share Posted September 13, 2017 (edited) On scrolling back, OMG.. I see why... t = m.Extension if t <> invalid then ' mkv container with mpeg4 cannot be xvid/divx/mp4v r = CreateObject("roRegex","mkv","i") if r.isMatch(t) then mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DIVX" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "XVID" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "MP4V" IsRequired: false }) end if end if Those isRequired should be all true. Man... The file is an mp4v and these are known to not direct play. I didn't fully understand at that time what the isRequired flag was doing or smth. But on closer inspection I was suddenly.. Man.. I feel stupid.. *SLAPS SELF IN FACE* So MKV and MP4 this should apply to, not just MKV. All the above code becomes this : mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DIVX" IsRequired: true }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "XVID" IsRequired: true }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "MP4V" IsRequired: true }) @@ebr once you make this change, that video should auto-detect to transcode. *crosses fingers* Edited September 13, 2017 by speechles Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 @@speechles So how would that apply to mp4 as that code is for mkv, correct? Link to comment Share on other sites More sharing options...
Gilgamesh_48 948 Posted September 13, 2017 Share Posted September 13, 2017 One thing of note is that, from time to time, Roku updates support files without any notification. I do not know which files get updated or exactly what happens but I had some quite detailed discussions with another advanced developer and he had determined that one of the stealth updates screwed up a support file that messed up playback of some files. This was a couple of years ago. It must be extremely frustrating programming for the Roku platform. They change things even many that are documented in the SDK without any notice or explanation. It is not just a moving target but it is a randomly moving target. It must be a little like sitting on one of the horses on a merry-go-round trying to hit someone on another merry-go-round a quarter mile away using a slingshot when the operators of each ride start and stop them at random. There is a reason why most of the apps seen on the Roku are extremely basic in operation and appearance. It is just too hard for most folks to make a pretty and functional Roku app. That is why I have a lot of respect for those that have successfully produced a good, solid and quite functional app like this one. My hat's off to you, sir. BTW: Just for point of info. Everything I have is just simple files with no advanced audio or video. Not everything I have direct plays because I have some MKVs that are incompatible with Roku and I even have some old AVIs that I am too lazy to convert. I do not need any of the advanced formats due to the fact that I am of advanced years and my old eyes and ears cannot see or hear the difference. That is also the reason I sometimes ask for things others do not want. My age sometimes is an asset and other times it is a liability. But senility is a wonderful thing at times. I never have to watch a rerun. ,) 1 Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 On scrolling back, OMG.. I see why... t = m.Extension if t <> invalid then ' mkv container with mpeg4 cannot be xvid/divx/mp4v r = CreateObject("roRegex","mkv","i") if r.isMatch(t) then mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DIVX" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "XVID" IsRequired: false }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "MP4V" IsRequired: false }) end if end if Those isRequired should be all true. Man... The file is an mp4v and these are known to not direct play. I didn't fully understand at that time what the isRequired flag was doing or smth. But on closer inspection I was suddenly.. Man.. I feel stupid.. *SLAPS SELF IN FACE* So MKV and MP4 this should apply to, not just MKV. All the above code becomes this : mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "DIVX" IsRequired: true }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "XVID" IsRequired: true }) mpeg4Conditions.push({ Condition: "NotEquals" Property: "CodecTag" Value: "MP4V" IsRequired: true }) @@ebr once you make this change, that video should auto-detect to transcode. *crosses fingers* I can tell my roommate that it's all his fault, because he made them MPEG4 instead of h264. I don't think he knows that there's a difference and I hadn't noticed that they weren't h264, So, that's my fault, but I'm not telling him that! 1 Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 Well we discovered the issue and it will get resolved in a update. 1 Link to comment Share on other sites More sharing options...
ebr 14959 Posted September 13, 2017 Share Posted September 13, 2017 The sample file you gave me is direct playing fine on my Roku... What firmware version are you guys on? Mine updated yesterday. Link to comment Share on other sites More sharing options...
mikeraburn 60 Posted September 13, 2017 Share Posted September 13, 2017 and, my statement was incorrect. Emby / Roku My mp4s are indeed H264. Anything with MPEG4 I run through my laptop to televison using KODI. I have 2 setups and I tend forget that. 1 Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 (edited) The sample file you gave me is direct playing fine on my Roku... What firmware version are you guys on? Mine updated yesterday. My Ultra is on build 4144 and beta app v3.0.47 Edited September 13, 2017 by Happy2Play Link to comment Share on other sites More sharing options...
ebr 14959 Posted September 13, 2017 Share Posted September 13, 2017 My Ultra is on build 4144 and beta app v3.0.47 And the file he posted above doesn't play properly for you? I'm kinda at a loss unless it is device-specific. Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 And the file he posted above doesn't play properly for you? I'm kinda at a loss unless it is device-specific. No, I get green box with audio. I tried multiple MPEG4/mp4 files I have and they all do the same thing. They transcode fine. Link to comment Share on other sites More sharing options...
ebr 14959 Posted September 13, 2017 Share Posted September 13, 2017 Okay, now I'm freaked out. I played that thing three or four times (for a few seconds). It was Barney's wife cooking in the kitchen. I just went back and tried it again and now I'm seeing the green screen... 1 Link to comment Share on other sites More sharing options...
ebr 14959 Posted September 13, 2017 Share Posted September 13, 2017 Re-started my Roku and now it plays again... Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 Okay, now I'm freaked out. I played that thing three or four times (for a few seconds). It was Barney's wife cooking in the kitchen. I just went back and tried it again and now I'm seeing the green screen... That's what was freaking me out. It seemed so random and the first few files I tried got the green screen; but then later they direct played perfectly. the Barney Miller one was the only file I was sure had never direct played for me. I really hate intermittent problems. . . I like nice simple reproducible issues. Link to comment Share on other sites More sharing options...
Happy2Play 8356 Posted September 13, 2017 Share Posted September 13, 2017 @@ebr Well at least you see what we are getting. Link to comment Share on other sites More sharing options...
Flamebird 7 Posted September 13, 2017 Share Posted September 13, 2017 Re-started my Roku and now it plays again... 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