Jump to content

BUG: Wrong file selected - unnecessary transcode


legallink

Recommended Posts

legallink

@@Luke yes I recognize that. I was just indicating bandwidth setting in the app (as opposed to auto) and highlighting that the server was transcoding when not required.

Link to comment
Share on other sites

Yes we are constantly looking to improve the auto bandwidth feature. I would suggest jumping on the ios beta if you're not already.

Link to comment
Share on other sites

Yes we are constantly looking to improve the auto bandwidth feature. I would suggest jumping on the ios beta if you're not already.

 

But what he is saying is that he is NOT using the auto bandwidth setting.  He set it at 40Mb (a value over the bitrate of the file available) and the logic is still deciding to transcode the item instead of direct stream it.

 

It is possible it is transcoding for some other reason than the bitrate...

 

Legal - do you have the server and ffmpeg logs from the session you described above with the two users?

Link to comment
Share on other sites

legallink

@@ebr

I didn't get to create a clean server log, but here is what I've got from last night.  I believe the relevant file is playing Seinfeld episodes (if that is helpful).  Timestamps starting around 2017-04-05 22:54:33.6285

 

You'll note that it requires a container swap regardless, so possibly that adds fuel to the fire....however, you'll note on the logs that for the same file, same player (end client is Apple TV), some remux and some transcode, only difference is user.

 

There are all the transcode/remux log files generated during that time period when I was testing the two users.

server log.txt

transcode log1.txt

transcode log2.txt

transcode log3.txt

transcode log4.txt

Edited by legallink
Link to comment
Share on other sites

Okay, I think I found it.  I think a typo got created in a recent update to the profile and the device max was set to 8Mb/s instead of 80.  Please restart the app and see what happens.

Link to comment
Share on other sites

legallink

@@ebr, just the app?  Or the server as well?  I restarted the entire apple tv before I did the test this morning (unless you are pushing an update).

 

- the responses above don't really matter unless you are pushing an update right now, as I restarted both this morning before the 2nd test.

Edited by legallink
Link to comment
Share on other sites

I just slipped in the new file.  Restarting the app should get it for you.  Are you still seeing the same issue?

Link to comment
Share on other sites

corey

@@corey - Have you ever seen this happen?

 

Can we then assume that that is the crux of this problem?  That the app is using the auto determination and that is why it is transcoding...

 

I have not observed that behavior @@ebr. I double checked the code and I don't see anything that would appear out of the ordinary there. It's a stretch but the only thing that I could see throwing it off would be the auto bitrate check. I'd love to see if it could be replicated so I can take a look at this.

Link to comment
Share on other sites

legallink

@@ebr the problem is still the same. Switch profiles and one transcodes and one direct stream. I don't know if my copy updated or not but I've closed out the app and started again.

Link to comment
Share on other sites

What do you mean switch profiles?

 

He means logging in as two different users.

Link to comment
Share on other sites

legallink

@@Luke. That's how I'm testing the issue. Both profiles on the same device with the same settings except one allows transcoding and one doesn't. The one that doesn't allow transcoding direct streams the file and the one that does allow transcoding, transcodes the file when clearly it should be and can direct stream. It was simply one way of isolating potential variables.

Edited by legallink
Link to comment
Share on other sites

I think it is coincidental. We measure the bandwidth via the auto detection, and then save that value in memory. There are several events that may occur that will cause us to erase the saved value, and login/logout being one of them. I don't think this is related to the user but simply due to the auto-measurement producing different values and different times.

Link to comment
Share on other sites

legallink

@@Luke I appreciate your willingness to try to help here, but the dismissal approach isn't helpful and it just signals that you haven't read/understood the problem. im not distinguishing between users to identify that users are treated differently (even though they shouldn't be because it is the exact same setup and within seconds of each other on a hardwired LAN). And coincidental would mean it isn't repeatable, which it is.

 

The point I'm trying to highlight is that despite there being enough bandwidth, if the user is permitted to, it transcodes the file (and in this instance at a low bandwidth and quality) despite there being no need to transcode.

 

Anyways, it appears to avoid unnecessary transcodes I have to turn off transcoding which is problematic as it means files will fail to play if they actually need to transcode. So my choices are to transcode at least 1/2 of my files while playing despite there being no need or not be able to play the other half because I've turned transcoding off. I've pre- transcoded all of my files in accordance with the emby recommend specs in order to avoid the need to transcode.

 

@@ebr let me know if there is some to do here or if it just is what it is, or if I'm missing something.

Link to comment
Share on other sites

legallink

@@Luke I've put the in-app bitrate setting at the max for both users so that "auto" detection wouldn't be an issue as that's been a previously diagnosed issue.

Link to comment
Share on other sites

And that resolves it, right? I'm asking the question because i have yet to see a log file where the server responded incorrectly. In other words, there haven't been any examples where let's say the video was 10mbps, the app requested 12mbps max, and this resulted in transcoding. In all of the examples I've seen the video bitrates were higher than the requested bitrate by the app. If there is an example where this isn't happening then please point me to it in case I might have missed it. Thanks !

Link to comment
Share on other sites

legallink

@@Luke no that doesn't resolve it. I can give you more logs but the most recent logs i posted I assume show that the bit rate is set at 40mbps. If it is requesting something else, I'm not sure what would be causing that. There is a max streaming rate set on the server for 15mbps but I thought that only applied for outside of the LAN. I can remove that and see if that solves the problem.

Link to comment
Share on other sites

I'm taking a second look at this example: https://emby.media/community/index.php?/topic/45973-bug-wrong-file-selected-unnecessary-transcode/?p=438507

 

the three transcode logs are all seinfeld mkv. it appears there is only one version of this episode and no folder sync copy, correct? This will not direct play on apple devices because the .mkv container is not supported, however, we can stream copy the video and it looks like we are doing that in one of the three ffmpeg logs you supplied.

 

the other two are doing a full transcode, not because of the bitrate but due to other factors. the level 50 video is the first one that jumps to mind. up until recently we set a max level of 41, but newer server versions have upped that to 51 for iOS web app, and the iOS native app will have this in the next app update.

Link to comment
Share on other sites

Legal - can you please give us a fresh set of logs now that the max bitrate in the app is (or should be) fixed?

 

I understand you are not using the auto setting so this issue should be unrelated to anything having to do with that.  The last logs I looked at, the reason for the transcode was due to an erroneous maximum setting in the app of 8Mb/s.  I want to confirm we've moved past that.  Thx.

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