Jump to content

Feature to Force DirectPlay Only Without Any Detection and Disable All Transcoding


gordan
Go to solution Solved by gordan,

Recommended Posts

Well mainly because it forces you to come talk to us, and then your feedback gets used to help resolve issues and improve things for everyone. For example, as a result of this conversation I've now gone and taken another look at firefox's documentation on mdn, and they have updated it with more information that we can use to improve the out of box experience.

  • Like 4
Link to comment
Share on other sites

gordan

A fair point well made, but in addition to filing a bug report and having to live on the bleeding edge until the next official release, it would be rather nice to have a "make everything just work" tick box. Now, granted, in my case that works because I specifically made sure I chose the codecs and containers carefully when extracting my entire DVD collection. I somewhat dislike the idea of software that always knows better and cannot be told otherwise.

 

Now, thinking about it, there is more than one way to solve this problem - right now I am pondering if it would perhaps be easier to simply write a shell script wrapper to replace ffmpeg, and if it's running as the emby user, simply do nothing, mkfifo the target file and cat the source to it. It would do what I want, but, it is, frankly, a little too gross a hack for my liking. And if I am not the only one in need of something like this, then that gross hack is likely to become the standard gross hack instead of a missing feature.

Link to comment
Share on other sites

  • Solution
gordan

And just in case somebody else finds this sort of thing useful, here is how to neuter transcoding and always force DirectPlay. If the client device doesn't support it, it will choke on it, but I am just fine with that.

 

# mv /bin/ffmpeg /bin/ffmpeg.bin

 

# cat << EOF > /bin/ffmpeg

#!/bin/bash
if [ "$USER" != "emby" ]; then
        /bin/ffmpeg.bin "$@"
else
        source=`echo "$@" | sed -e 's/.* -i file://' -e 's/ -map .*//'`
        target=`echo "$@" | sed -e 's/.* -y //'`

        ln -- "$source" "$target"
fi
EOF

 

This moves ffmpeg out of the way into ffmpeg.bin, and creates a shell script wrapper for it.

 

If it is invoked as user "emby", it will do nothing - simply symlink the source file to the transcoding temporary directory. When playback is finished, this will be unlinked, but the original link will remain. (Note: Your media folder directory _MUST_ be on the same file system as the transcoding cache, otherwise this won't work.)

 

If ffmpeg is invoked by any other user, it will invoke ffmpeg with the same parameters it was passed.

 

This will effectively disable transcoding for emby and the raw stream will be pased to the requesting client. Emby will _think_ it is transcoding for the client, but it will in fact be piping the raw file in it's origina form to the client, i.e. DirectPlay.

 

It's a horrible, dirty hack, but it will work and it does exactly what I wanted, albeit not as cleanly as a tickbox that would skip the ffmpeg invocation alltogether.

Edited by gordan
  • Like 4
Link to comment
Share on other sites

Chaps, i want to break an arrow in favour of gordon here. I do believe he has a point. I find it annoying that I have a powerfull i5 with 8GB RAM desktop running Firefox that won't show any HD video because the server is a little P4 3GHz with 512Mb ECC Ram (little DELL Poweredge).

 

Iàve tried disabling those two options and I immediately get an error "No compatible streams are currently available. Please try again later or contact your system administrator for details.". If i have all three boxes ticked, it just refuses to play back in browser unless I select the 360p option (any higher and it stalls). If I played direct playback I would have enough bandwidth and power to have direct play.

 

Also, why is Emby trying to play all my HD movies directly at 480p 4Mbs rather than automatically detercting that it would run smooth at 360p?

Link to comment
Share on other sites

gordan

Chaps, i want to break an arrow in favour of gordon here. I do believe he has a point. I find it annoying that I have a powerfull i5 with 8GB RAM desktop running Firefox that won't show any HD video because the server is a little P4 3GHz with 512Mb ECC Ram (little DELL Poweredge).

 

Iàve tried disabling those two options and I immediately get an error "No compatible streams are currently available. Please try again later or contact your system administrator for details.". If i have all three boxes ticked, it just refuses to play back in browser unless I select the 360p option (any higher and it stalls). If I played direct playback I would have enough bandwidth and power to have direct play.

 

Also, why is Emby trying to play all my HD movies directly at 480p 4Mbs rather than automatically detercting that it would run smooth at 360p?

 

Thank you. :)

 

In answer to your question, the problem is that detecting what might or might not run smooth is practically impossible - all the server can tell is that you are running Firefox, that it supports certain codecs, and at a push, it could work out what CPU class you have (e.g. i686, x86-64, armv5tel, etc.) Unfortunately, i686, for example, is a sufficiently broad range that it could choke on 480p, or it could be just fine for 1080p, especially since there is also GPU capabilities to consider which the server has no way of knowing.

 

Auto-detecting client capabilities has significant fundamental limitations, which is why I think there should be a configuration switch to tell it to not even bother trying.

  • Like 1
Link to comment
Share on other sites

Deathsquirrel

Chaps, i want to break an arrow in favour of gordon here. I do believe he has a point. I find it annoying that I have a powerfull i5 with 8GB RAM desktop running Firefox that won't show any HD video because the server is a little P4 3GHz with 512Mb ECC Ram (little DELL Poweredge).

 

Iàve tried disabling those two options and I immediately get an error "No compatible streams are currently available. Please try again later or contact your system administrator for details.". If i have all three boxes ticked, it just refuses to play back in browser unless I select the 360p option (any higher and it stalls). If I played direct playback I would have enough bandwidth and power to have direct play.

 

Also, why is Emby trying to play all my HD movies directly at 480p 4Mbs rather than automatically detercting that it would run smooth at 360p?

 

You could be all wacky and use a more capable client or server.  Either would address the issue with zero dev time wasted.  Heck, you could use FF to browse and use an external player for the playback.

 

Not every situation that doesn't work to one person's idea of perfection needs a programmatic fix.

Link to comment
Share on other sites

lulzyatlas

I'm also a +1 for an option to simply disable stream detection. It isn't a whole new feature that requires tons of time. It's an option to turn off a built in process or tell it to force attempt a direct play/direct stream.

 

For many of us it does more harm than good, and there's no viable alternative. There are plenty of instances of Emby either trying to needlessly transcode or with transcoding disabled stopping at "No Compatible Streams", which isn't any better for usability than someone breaking their setup with a checkbox that could fix this.

 

And an option to disable will also be a big boost towards playability on non-transcoding setups, no debugging and broken detection fixes required.

 

Not everything requires a fix, but it seems worth the effort for a simple workaround which would solve endless problems for those of us who know how to configure our devices for playback. This is one of those times over simplification can hinder functionality.

Edited by lulzyatlas
  • Like 3
Link to comment
Share on other sites

gordan

You could be all wacky and use a more capable client or server.  Either would address the issue with zero dev time wasted.  Heck, you could use FF to browse and use an external player for the playback.

 

Not every situation that doesn't work to one person's idea of perfection needs a programmatic fix.

 

That attitude (throw more hardware at the problem) is why we are today achieving no more with computers than we did in the '90s when we had 1000x less hardware at our disposal. Any developer that pre-emptively holds that view has no business calling themselves a developer. I provided above 7 lines of code for a ffmpeg wrapper that selectively neuters the transcoding when invoked via emby. It took me under 5 minutes to write and test. I would expect implementing disabling of auto-detection in the code to take a roughly similar amount of code. Are you really saying that 5 minutes of development time is not worth the saving in CPU cost between the lowest end and highest end CPUs, not to mention the cumulative electricity costs, all times the number of deployments?

 

I can think of cases where developers' time is that valuable, but they tend to work in environments where saving a few clock cycles and/or picowatts per operation is hugely important because throwing more hardware at the problem simply isn't a viable option.

Edited by gordan
  • Like 6
Link to comment
Share on other sites

Our hesitation here is definitely not the time it would take to implement a bypass.  It is the usability for the majority of users.  I understand that you guys are not in that majority and, being so, you have come up with a workaround that accomplishes exactly what you need right now.  Well done :).

Link to comment
Share on other sites

gordan

So put the option in a config file rather than making it accessible from the GUI. Then the only way to enable it is to actively get away from the namby-pamby hand-holding for the most uninitiated of users who need all their configuration options to be big and rubberized to prevent risk of swallowing the buttons.

  • Like 2
Link to comment
Share on other sites

Deathsquirrel

So put the option in a config file rather than making it accessible from the GUI. Then the only way to enable it is to actively get away from the namby-pamby hand-holding for the most uninitiated of users who need all their configuration options to be big and rubberized to prevent risk of swallowing the buttons.

 

Then it's even worse when there is no way to check the option through the UI so it's harder for them to support.  As a general rule the team won't put in options to the UI that are dangerous or useless to most users if they can address the issue in a more user-friendly way.  In this case that's fixing the detection routines so this option isn't necessary.

Link to comment
Share on other sites

@@Deathsquirrel

 

Obviously you have an opinion. So does the other fellow. To not have this option means "emby is lacking". To argue about it is ridiculous. It is a needed option otherwise, why are we dicussing it? Instead of being a "negative nancy" always, and trust me i have seen your posts you are always depressing, try to be helpful and see where this fellow is coming from. He isnt asking to rape your wife, or murder your family. Allowing this "would be dangerous". He is simply asking for a feature request like a normal person. Sure he gets heated, shows emotion, and tries to get his point across in a heated debate but this doesnt mean you have to "parent him". Too often users of this forum are told that emby users are too stupid to understand things. I disagree, because most people use plex. Its a fact. Not a slight on emby. Plex has more people, so the chance of them having stupid users is far greater. The people choosing emby left plex for greener pastures. Prefer livetv. Etc. Etc. This would indicate to me that the emby users are smarter than plex users. Plex has this option, emby does not. Enough said.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
  • Like 3
Link to comment
Share on other sites

gordan

Then it's even worse when there is no way to check the option through the UI so it's harder for them to support.  As a general rule the team won't put in options to the UI that are dangerous or useless to most users if they can address the issue in a more user-friendly way.  In this case that's fixing the detection routines so this option isn't necessary.

 

How is that worse than, say, requiring the user to copy the logs for troubleshooting purposes? You seem to be really going hard out of your way to justify a lack of performance and efficiency improving feature, including earlier suggesting a hardware solution to a software problem.

 

It would be interesting if there was a way to measure how many deployments my gross hack above makes it onto. There are at least two other people on this thread who want this feature, and we cannot possibly be the only ones.

  • Like 6
Link to comment
Share on other sites

Deathsquirrel

@@Deathsquirrel

 

Obviously you have an opinion. So does the other fellow. To not have this option means "emby is lacking". To argue about it is ridiculous. It is a needed option otherwise, why are we dicussing it? Instead of being a "negative nancy" always, and trust me i have seen your posts you are always depressing, try to be helpful and see where this fellow is coming from. He isnt asking to rape your wife, or murder you family. Allowing this "would be dangerous". He is simply asking for a feature request like a normal person. Sure he gets heated, shows emotion, and tries to get his point across in a heated debate but this doesnt mean you have to "parent him". Too often users of this forum are told that emby users are too stupid to understand things. I disagree, most people use plex. Its a fact. Not a slight on emby. The people choosing emby left plex for greener pastures. Prefer livetv. Etc. Etc. This would indicate to me that the emby users are smarter than plex users. Plex has this option, emby does not. Enough said.

 

Sent from my Nexus 7 using Tapatalk

 

He's asking for a feature that's not going to be added.  Suggesting workarounds is productive.  Unnecessary of course because he built one for himself, but still perfectly reasonable.

As for tone, I'm not getting paid to be nice...or paid at all.  If a request seems like a stupid waste of time I can certainly express my opinion as freely as anyone else.

Link to comment
Share on other sites

gordan

@@Deathsquirrel

Too often users of this forum are told that emby users are too stupid to understand things. I disagree, most people use plex. Its a fact. Not a slight on emby. The people choosing emby left plex for greener pastures. Prefer livetv. Etc. Etc. This would indicate to me that the emby users are smarter than plex users. Plex has this option, emby does not. Enough said.

 

Actually, I am looking to leave Plex because it, too, doesn't have this feature. Plex' ARM build simply removes transcoding as an option (equivalent to what unticking the transcoding options discussed earlier does in Emby). It still refuses to play if it's auto-detection detects that the device can't handle DirectPlay. As far as I can tell, auto-detection (or an "improvement" to it) was introduced in Plex some time last year and caused things to break for many users, myself included. Hence this thread.

Link to comment
Share on other sites

@@Deathsquirrel

 

<retracted earlier post>

 

Please spend time on ther posts, less on this one

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
  • Like 1
Link to comment
Share on other sites

gordan

He's asking for a feature that's not going to be added.  Suggesting workarounds is productive.  Unnecessary of course because he built one for himself, but still perfectly reasonable.

As for tone, I'm not getting paid to be nice...or paid at all.  If a request seems like a stupid waste of time I can certainly express my opinion as freely as anyone else.

 

Stupidity is relative - especially relative to suggesting throwing more hardware at a software problem.

  • Like 1
Link to comment
Share on other sites

Deathsquirrel

@@Deathsquirrel

 

Instead of posting a reply. Read what I have posted. The nonsense that this will not get added? Really? Are you the god of emby that makes decisions? No you are not. This shit is open source. I can hack the server and release a fork that does this. Might as well then remove the pay restrictions too eh? Rip out that premiere nonsense? You cant possibly see where I am going with this, but the developers will. You want to entertain users with emby then entertain their whims or suffer migration and punitive forks. I dont see why you are even in on this conversation quite frankly. Please spend time on ther posts, less on this one

 

Sent from my Nexus 7 using Tapatalk

 

 

Both EBR and Luke have posted in this thread repeatedly saying that this request doesn't fit their design goals and that they would rather keep the current design and fix the detection issue.  If 'no' isn't the takeaway from that I don't know how else to read it.  Hence suggesting workarounds that were very appropriate to Geotux's situation of trying to play HD video on a powerful PC desktop with an underpowered server.

 

I don't think that addresses Gordan's needs but then I didn't reply to his post so I wasn't really trying to.

Link to comment
Share on other sites

I have a better idea, since feature requests are sort of just feeling out ideas. They allow anybody to throw their opinions around which isnt productive at all.

 

/me pretends @@Deathsquirrel doesnt exist

/ignore @@Deathsquirrel

 

@@ebr @@Luke Why not give every lifetime premiere member one (or maybe two wishes). Start a new forum section called wishes. Every user who becomes a premiere supporter for lifetime gets a wish. This would focus time in the right spot. Spending the money these users gave you to then possibly fulfill their wish. The forum can track the users who are lifetime supporters by asking them to link their emby server via emby connect for access to this section. This would reduce the amount of "noise" in these types of threads. It would focus on the most important users, the ones who are with you for life. This would create an additional incentive to users. This might put additional pressure on the development team, but would focus efforts better on the users who matter most. Please think about this. :)

 

 

Edit: Was the like from deathsquirrel real, or just to annoy me because he thinks I am ignoring him. Hard to tell. Lets assume its because the above is a good idea and stop thinking bad tboughts. The monsters arent real. We can all see that right?

Edited by speechles
  • Like 7
Link to comment
Share on other sites

gordan

Both EBR and Luke have posted in this thread repeatedly saying that this request doesn't fit their design goals and that they would rather keep the current design and fix the detection issue.  If 'no' isn't the takeaway from that I don't know how else to read it.  Hence suggesting workarounds that were very appropriate to Geotux's situation of trying to play HD video on a powerful PC desktop with an underpowered server.

 

I don't think that addresses Gordan's needs but then I didn't reply to his post so I wasn't really trying to.

 

None of the suggested workarounds are in fact particularly useful to any of the people who implied that the feature I proposed would be useful. My wrapper bodge addresses the problem, but it's pretty awful compred to a real solution.

Link to comment
Share on other sites

Deathsquirrel

Why not give every lifetime premiere member one (or maybe two wishes). Start a new forum section called wishes. Every user who becomes a premiere supporter for lifetime gets a wish. This would focus time in the right spot. Spending the money these users gave you to then possibly fulfill their wish. The forum can track the users who are lifetime supporters by asking them to link their emby server via emby connect for access to this section. This would reduce the amount of "noise" in these types of threads. It would focus on the most important users, the ones who are with you for life. This would create an additional incentive to users. This might put additional pressure on the development team, but would focus efforts better on the users who matter most. Please think about this. :)

 

Plex (I think) does this on a rotating basis.  You get to assign your subscriber votes to an idea and I think you get that vote back to put on something else when your previous assignment is closed out.  I could have the application wrong of course but the idea is solid IMO.

Link to comment
Share on other sites

Yeah, otherwise the value of the feature suggestion section is a grave yard. Come see where the good ideas come to die and never get realized. Everyone deserves their back scratched if they scratch yours. It should be a place of friendliness and common goals. You want feature X too? omg.. Now I can "spend" my wish on another feature since yours was spent on that. Sweet! The comments in a wishes section would be much more friendlier because the people with access to that section have invested in it. This would reduce the time spent chasing posts like this which may drift into antagonistic behaviors and untowards conduct. I agree deathsquirrel. I am only human as are you. Neither of us deserves to be pointed out as an idiot. Everybody has a common goal here. Lets make emby better. So in the spirit of the season, lets put forth a better community. Sorry for the earlier remarks. Im just trying to get progress here. So tiring seeing users hopes dashed, and their ideas left to rot. I get a little tear in my eye.

 

Sent from my Nexus 7 using Tapatalk

Link to comment
Share on other sites

gordan

I have a better idea, since feature requests are sort of just feeling out ideas. They allow anybody to throw their opinions around which isnt productive at all.

 

/me pretends @@Deathsquirrel doesnt exist

/ignore @@Deathsquirrel

 

@@ebr @@Luke Why not give every lifetime premiere member one (or maybe two wishes). Start a new forum section called wishes. Every user who becomes a premiere supporter for lifetime gets a wish. This would focus time in the right spot. Spending the money these users gave you to then possibly fulfill their wish. The forum can track the users who are lifetime supporters by asking them to link their emby server via emby connect for access to this section. This would reduce the amount of "noise" in these types of threads. It would focus on the most important users, the ones who are with you for life. This would create an additional incentive to users. This might put additional pressure on the development team, but would focus efforts better on the users who matter most. Please think about this. :)

 

+1

 

Or maybe have the option of offering a feature bounty, payable half when it makes it into a feature branch, half when it makes it into a stable release.

Edited by gordan
Link to comment
Share on other sites

gordan

Plex (I think) does this on a rotating basis.  You get to assign your subscriber votes to an idea and I think you get that vote back to put on something else when your previous assignment is closed out.  I could have the application wrong of course but the idea is solid IMO.

 

There is no such option with Plex, as far as I am aware. Can you point me at where in their documentation or on their forum it says this?

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