Jump to content

Random commercials


StuBailey

Recommended Posts

StuBailey

I added random commercials using a batch file to randomly rename filenames with numbers such as 01.mp4, 02.mp4, 03.mp4 etc. The batch file simply renames 01.mp4 to any random number based on the total amount of files so 01.mp4 might become 214.mp4 and so on. I use stream files to call the file so the first "whatever.strm" file contains the path to "01.mp4". It works great except for 2 minor problems. The first problem is that it works great on the web client, but on the TV using a Roku, many files work while others hang and then an error display about no streams available. If you hit the refresh button in the TV display the file plays, but you need to do that for any that won't load. If you refresh the show or season on the web display they all work. The second problem is if the library is set for metadata fetching, any manually re-numbered episodes gets overwritten when you refresh the show or season from the web client even if the show or season is locked. If you stop the metadata fetching, it affects the entire library. Maybe I missed something with that. I guess there's a 3rd problem - a remote user can't refresh the entire show or season from the TV. I had a 5 season show displaying 10 seasons with season 6-10 saying Season 1 + Commercials etc. I made a separate library with metadata turned off so everything stays intact so no biggie.
Could be the Roku itself where you have no way to fix it. Maybe have the library offer individual folders/shows to turn off fetching. Maybe an NFO setting to refresh without fetching metadata when you click on a tv series to browse. This was a fun project like programming the old C64 :)

Using Emby 4.7.6 with a Roku Ultra

Link to comment
Share on other sites

Hello StuBailey,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:


Thank you.

Emby Team

Link to comment
Share on other sites

Hi. It is likely this is solved by the current Roku beta.  I will add you to the PM thread so you can install it and try.

Thanks.

Link to comment
Share on other sites

StuBailey

Thanks... tried it.. wasn't sure if I should reply here or the PM thread... but it still happens. It could be just a coincidence but one time it played the first second or two over and over before the error message. Other than that most work except for a few out of 160 or so...

 

Separate issue but I read in that PM thread about  "Roku firmware update is going to make it impossible to get to our OSD" -- while in SUGGESTION mode/setting, if you go up to top and put it on MOVIES, and then go back to SUGGESTIONS, the green outline box on the first movie/tv selection does not line up properly.. It's been like this for awhile... but if you won't be able to get to the OSD I figured to mention it now...

 

If only 20 people can use/install the beta I can delete it..

Link to comment
Share on other sites

StuBailey

 

Simply slide menu over to MOVIES, let it display, then slide back to suggestions and the alignment is off.. even if there was a Continue Watching above the Latest. And this is on The Roku Beta also. I'll be glad to post what I see, but can only compare things to the web interface so I'm not sure where to post this.

 

alignment.thumb.jpg.0e8e167e75d11c0489e8b7dc876c39a2.jpg

Link to comment
Share on other sites

StuBailey
12 hours ago, ebr said:

Hi. It is likely this is solved by the current Roku beta.  I will add you to the PM thread so you can install it and try.

Thanks.

I'm pretty sure I found the problem... Before hitting the play button I see where it shows the video resolution and the audio format.. If the screen says AAC or UND AAC and it hangs, I hit the refresh button and it will then say English Opus stereo.. And it also happens if it first says English Opus and hangs, and a refresh then will display AAC or UND AAC.

Link to comment
Share on other sites

14 hours ago, StuBailey said:

Tested and verified by using nothing but AAC and then nothing but OPUS. Mixed together requires a refresh.

So are you all set now?

Link to comment
Share on other sites

StuBailey

I'm set.... turns out the issue is for you guys to decide since it was a error in a very uncommon way where I intentionally avoided a refresh..

Link to comment
Share on other sites

Did you initially import the video into your library, and then replace it with a new version where the audio was different?

Link to comment
Share on other sites

StuBailey

yes and no :) - there were all there but I renamed the files so let's say I had 6 files and file 1.mp4 was renamed to 6.mp4 - and file 2.mp4 was renamed to 3.mp4.... and so on. I figured since all six were already there, the computer, or emby wouldn't know... so basically you could test with 2 files by swapping the names.. It works until one had a different audio codec like that opus codec. I'm not sure how or why it would make a difference but it seems maybe the last time it loaded maybe it was in cache or something - maybe the nfo? I'd  have to go inspect that again..

Link to comment
Share on other sites

StuBailey

Basically, yes. I've done that in the past many times for a better quality file. And many time it was an .mkv to replace an .mp4 or vice versa.. made sure the file name was the same, except for the extension, and scanned and had no problem but never had a problem to notice the audio.


..and just did it the way you described. I had a file there with AAC, deleted it and put in place one with same file name that had OPUS.. same thing without refreshing... spins and spins and then the error. But also just noticed a scan also prevents problems... The problem is basically from me not scanning or refreshing. I was testing it as I was hoping to use it. I had Windows scheduled to run the batch file of swapping filenames in the morning to scramble the files thinking that would work if I'm not at the computer to scan or refresh, so anyone else on my server would see random commercials or trailers etc. Turns out it works unless that audio codec opus is there... not sure about other audio.  The workaround for me was to re-encode the files to AAC.

 

Relax, emby is great!

 

 

 

Link to comment
Share on other sites

On 9/25/2022 at 8:12 PM, StuBailey said:

Basically, yes. I've done that in the past many times for a better quality file. And many time it was an .mkv to replace an .mp4 or vice versa.. made sure the file name was the same, except for the extension, and scanned and had no problem but never had a problem to notice the audio.
..and just did it the way you described. I had a file there with AAC, deleted it and put in place one with same file name that had OPUS.. same thing without refreshing... spins and spins and then the error. But also just noticed a scan also prevents problems

 

 

 

OK so yes this is expected because the information gathered during the library scan is used to determine how we're going to play. Thanks for the feedback.

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