Jump to content

ISO Support (as a folder, not ISO playback)


Recommended Posts

Peckmore
Posted

Hi there,

I know ISO support has come up many, many, many, many, many, many times in the past, but most of the requests seem to focus on ISO playback. However, I would like to ask if it would be possible to get support for ISOs as "folders"?

Is there any possibility of adding support for playing back video files from within an ISO? This would be similar to the current DVD and BluRay folder plugins, but instead of having the contents of the disc in a folder, it's all in an ISO. Just as an example, something like DiscUtils is a C# library which allows for reading files from within an ISO without having to extract it first. I'm assuming doing a live remux of the file(s) from within the ISO (by feeding them into ffmpeg) would then allow the video to be played on any client just as any other video would?

This would allow for videos to be played back that are stored in an ISO, and not lose any of the benefits of Emby and it's client ecosystem - Emby could still transcode if required, and all clients would be able to play the videos.

I know Emby focuses on making things user friendly for all users, but something like this could happily be an "advanced user only" feature - no automatic scanning of files or detection by Emby, but if a STRM file is found (with accompanying NFO file), and the STRM file points to the ISO as a folder, then it would be understood and opened accordingly. E.g., 

\\EMBYSERVER\Movies\Topgun.iso\VIDEO_TS\VTS_01_0.IFO

Is there any chance of something like this being added to the current DVD and BluRay folder plugins? 😊

(Also, I know that the default reply is usually "convert to MKV", but there are a lot of discs where it is nice to have access to the whole disc. In those scenarios, I can use Kodi if I ever want the full "disc experience", but for 99.9% of viewing still use Emby without having to store both the ISO and duplicate MKVs. 😁)

  • Like 2
  • Disagree 1
  • Agree 1
Posted

Hi.  I don't understand the distinction you are making between this request and the others.  You are asking for us to be able to mount, read and play ISO files.  They aren't "folders".   As you noted, this has been covered a lot.  Why not just convert them?

  • Disagree 1
Peckmore
Posted
2 hours ago, ebr said:

Hi.  I don't understand the distinction you are making between this request and the others.  You are asking for us to be able to mount, read and play ISO files.  They aren't "folders".   As you noted, this has been covered a lot.  Why not just convert them?

Hi there!

The distinction is because I wasn’t asking for menu support, etc., just the ability to play vob/m2ts files, but instead of being stored inside a folder, they are stored inside an ISO.

I know ISOs aren’t “folders” in the literal sense, but they are just file containers and, as illustrated in the linked DiscUtils project, it is possible to access the files within an ISO without having to mount it, or play it as an ISO, or “extract” the contents of the entire ISO. You can access any file within the ISO, and receive a Stream object which can then be treated like any other Stream object.

My understanding is that Emby already has the ability to play vob/m2ts files, and the DVD and BluRay folder plugins allow Emby to “understand” the file structure of a disc if copied into folder, and play the video files contained within (again, only as video files, not full disc/menu support). My request was whether it would be possible to extend these plugins to also be able to treat an ISO as just a folder (not by mounting it or playing it in the traditional sense, but by looking inside the container and accessing the data/files directly), and enable vob/m2ts files to be played directly from within the ISO.

This would be equivalent to just playing a video file directly, meaning it should work in all Emby clients, as Emby server would stream the data to the client as it already does, and the server could still remux or transcode the data if needed by a client, as it does with any other video.

Effectively, it gives the “best of both worlds”, as rips can be stored as ISOs, but played back as normal video files.

As for converting, as I say, I like to keep the ISOs and occasionally play them via Kodi, but if Emby could play a vob/m2ts file directly from within an ISO then I wouldn’t need to also keep MKV files alongside the ISOs, reducing the need to effectively store 2 copies of every video.

  • Like 1
  • Disagree 1
  • Agree 1
RanmaCanada
Posted

No. Just no. There is no point in going backwards. NONE.

Move forward with everyone else. This is so 90's.

  • Disagree 3
  • Agree 3
Peckmore
Posted
2 hours ago, RanmaCanada said:

No. Just no. There is no point in going backwards. NONE.

Move forward with everyone else. This is so 90's.

I mean, it's not really going backwards is it? More sideways.... 😁

As I said above, Emby already supports DVD and BluRay folders, all this feature request is for is to effectively extend that support to folders inside an ISO. No need to mount it, no menu support, etc., just playing the video files but straight from within the ISO instead of copying the files into a folder.

I know Plex has no ISO or folder support, but Jellyfin has been doing work lately to try and extend ISO support (although they seem to be going even further and doing full disc playback too, which isn't what I'm asking for), and they also have a feature request similar to mine to allow for playback of files from within an ISO - they even discuss using DiscUtils, and then taking the Stream returned from DiscUtils and writing it to stdin for ffmpeg.

And so, whilst I appreciate this will probably never be the most popular feature request, there are definitely other users out there who I think would also like to see this as a feature. And as I say, it could be an advanced users only feature, so Emby doesn't automatically scan/index ISO files, but if we manually craft a STRM and NFO file correctly, the ISO will be supported (again, as a "folder"/container, not full playback).

(Also, I mention Jellyfin above purely for discussion, and to illustrate that there is some desire for this feature request - I love Emby, and have no desire to switch to any other platform, so please don't misconstrue any references to competing platforms! 😊)

  • Like 1
  • Disagree 1
  • Agree 1
Posted
17 hours ago, Peckmore said:

there are definitely other users out there who I think would also like to see this as a feature.

Just One, here so far...

...Just rip the ISO's, it is very quick as you don't have to wait for the pathatic speeds of an optical drive... 

Peckmore
Posted
9 hours ago, TMCsw said:

Just One, here so far...

...Just rip the ISO's, it is very quick as you don't have to wait for the pathatic speeds of an optical drive... 

As I mentioned above, I've got the episodes already ripped to MKV, but I've also got the ISO for when I want that full menu "experience" and I can just switch across to Kodi to play them.

However, it would be nice if I didn't need 2 copies of the same episodes, and could just play the episodes directly from within the ISO (again, as a "folder", not full ISO/menu playback). That way, I can watch any episode through Emby with all of it's benefits, but if I do want the full DVD experience, I can hop onto Kodi, all from the same ISO, and saving a lot of disk space in the process. 😁

  • Like 1
Posted
6 hours ago, Peckmore said:

However, it would be nice if I didn't need 2 copies of the same episodes, and could just play the episodes directly from within the ISO (again, as a "folder", not full ISO/menu playback). That way, I can watch any episode through Emby with all of it's benefits, but if I do want the full DVD experience, I can hop onto Kodi, all from the same ISO, and saving a lot of disk space in the process.

Couldn't you also just unpack the ISOs into folder structures and have the same thing...?

  • Agree 1
Posted

Not having the ISO feature in Emby is what moved me to a different solution in my home theater setup. I really love Emby but I also want my movie collection with menu support for the extras that are on the disc.

I ended up using the Zidoo 1000 Pro for my device. The menu options are great. The decide is Android based and it's the highest quality that I know of that you can get for video and audio quality.

You can side load Emby with this as well. 

But it has the option from the movie poster to either play the the full disc and get the menus or you can just play the movie and skip the menus. All from the ISO. One of the Only downsides is that it's about $500 depending on which you get. 

I was using an Nvidia shield pro and when I switched over the sound quality and video quality was immediately noticed. 

I have a dedicated theater room I built my self so everyone's needs may be different. If you want a high end experience I would recommend Zidoo!

 

https://www.zidoo.tv/Product/index/model/Z3000+PRO/target/WAI9KvWCJQBKKmVViAFMcQ%3D%3D.html

 

 

  • Like 1
  • Agree 1
Posted
5 hours ago, Stylin said:

Not having the ISO feature in Emby is what moved me to a different solution in my home theater setup. I really love Emby but I also want my movie collection with menu support for the extras that are on the disc.

I ended up using the Zidoo 1000 Pro for my device. The menu options are great. The decide is Android based and it's the highest quality that I know of that you can get for video and audio quality.

You can side load Emby with this as well. 

But it has the option from the movie poster to either play the the full disc and get the menus or you can just play the movie and skip the menus. All from the ISO. One of the Only downsides is that it's about $500 depending on which you get. 

I was using an Nvidia shield pro and when I switched over the sound quality and video quality was immediately noticed. 

I have a dedicated theater room I built my self so everyone's needs may be different. If you want a high end experience I would recommend Zidoo!

 

https://www.zidoo.tv/Product/index/model/Z3000+PRO/target/WAI9KvWCJQBKKmVViAFMcQ%3D%3D.html

 

 

Hi, you can use .ISO files in Emby. You just need to configure external players in Emby apps in order for them to play.

  • Like 1
Posted

Thanks for the update, can you link me to the guide for how to do this? If this works and I'm able to play back my ISO files with menu  support would be a game changer for me.

Posted
On 8/11/2024 at 10:56 PM, Luke said:

Hi, you can use .ISO files in Emby. You just need to configure external players in Emby apps in order for them to play.

Hi Luke,

As @Stylinmentioned above, the Zidoo 1000 Pro allows you to "either play the the full disc and get the menus or you can just play the movie and skip the menus. All from the ISO.". Which I guess brings me neatly back to my original feature request! 😄

Is there any chance of having support for playing videos directly from within an ISO (as a container/"folder")? Even if only as an advanced feature, with hand-crafted NFO/STRM files?

Posted
On 8/3/2024 at 12:22 PM, ebr said:

Couldn't you also just unpack the ISOs into folder structures and have the same thing...?

 

Posted
15 hours ago, ebr said:

 

My apologies, I missed this reply the first time! 😀

I would assume it is possible - I know Emby has support for folders and, whilst I've never tried it on Kodi, I'm going to guess that they support folders too.

However, that isn't what I'd like to do - having folders on my NAS, with other files intermingled is not what I'm after. (And please correct me if I'm wrong, but last time I tried, the NFO files, etc. got placed within the folders, and I'm not after Emby/Kodi auto-detecting the folders for me).

My goal is just to have a single ISO for each disc that I rip, that I can then craft NFO files (and STRM files if required) for, to allow for videos to be played back from "within" the ISO, via Emby. Then, if I ever want full disc playback, I can hop to Kodi and play the ISO. And I also have a perfect (unencrypted) backup of each of my discs.

I appreciate everyone's comments about alternatives, but ultimately none of those are the solution I'm looking for and, whilst I appreciate it's a long shot, my hope is there is a chance this feature request could get picked up, even if just as an "advanced user" feature, or plugin, etc. 🤞😁

  • Like 1
Posted

Hi.  I'm afraid that optical media (what ISO files are trying to replicate) is all but dead so, never say never, but I don't see much payback on us spending resources to support it when the entire industry is moving away from it.

  • Disagree 2
  • Thanks 1
Posted (edited)
1 hour ago, ebr said:

Hi.  I'm afraid that optical media (what ISO files are trying to replicate) is all but dead so, never say never, but I don't see much payback on us spending resources to support it when the entire industry is moving away from it.

No problem, and I appreciate the feedback! As I say, I'm not after full ISO menu support, just the ability to play files from within an ISO, but I appreciate there probably isn't as much demand for this as there is other features.

If you guys ever reach a point where you've implemented everything else however, please give this feature another look! 🤣

Edit: On a side note, is this something that could potentially be achieved through a plugin? Or would it require access into Emby beyond what a plugin is capable of? I saw in your SDK there was an interface called IItemResolver, and I wondered if this would be the avenue into creating something like ISO support as a plugin?

Edited by Peckmore
  • Like 1
Posted
3 hours ago, Peckmore said:

No problem, and I appreciate the feedback! As I say, I'm not after full ISO menu support, just the ability to play files from within an ISO, but I appreciate there probably isn't as much demand for this as there is other features.

If you guys ever reach a point where you've implemented everything else however, please give this feature another look! 🤣

Edit: On a side note, is this something that could potentially be achieved through a plugin? Or would it require access into Emby beyond what a plugin is capable of? I saw in your SDK there was an interface called IItemResolver, and I wondered if this would be the avenue into creating something like ISO support as a plugin?

Looking at DiscUtils that you linked to - in theory the entire source code for this could be embedded into a plugin. However, this can only examine iso files and cannot mount to a local path. Ultimately you need a real path that can be fed into ffmpeg. So what the plugin could do is register an api endpoint with the server. This api could return the contents of files within the .iso file, and then this api url could be the resulting url that ffmpeg streams from.

There's a lot of moving parts, but if there is a community member who has the capability of doing the work then I will help them with the emby side of things.

  • Like 2
  • 1 month later...
Posted (edited)
On 8/14/2024 at 6:30 PM, Luke said:

Looking at DiscUtils that you linked to - in theory the entire source code for this could be embedded into a plugin. However, this can only examine iso files and cannot mount to a local path. Ultimately you need a real path that can be fed into ffmpeg. So what the plugin could do is register an api endpoint with the server. This api could return the contents of files within the .iso file, and then this api url could be the resulting url that ffmpeg streams from.

There's a lot of moving parts, but if there is a community member who has the capability of doing the work then I will help them with the emby side of things.

Hi @Luke, my apologies for taking so long to reply to your previous post!

Firstly, I'd just like to say that your response is the reason why Emby rocks, and is the best of the media platforms out there - this is a fairly niche feature, to cater to a handful (at best) of users, yet you are still willing to potentially work on the feature with the community and see if it is viable! You guys are the best! 😁

With that said, based on your previous comment I thought I'd have a go at "putting my money where my mouth is" and have a stab at being the community member who attempts to implement the required plugin. My initial work on this plugin can be found in the following repo:

IsoContainerPlayback

I don't know if I've gone down the right lines with this (trying to present a video as a single stream), or if it will need refactoring to make each individual file from the ISO available separately upon request, but I thought it might be a decent starting point? Below is a summary of the project, taken from the readme:

IsoContainerPlayback

This is the Emby plugin itself. It consists of the plugin code (to interface with Emby server), and a class called IsoStream (and the derived classes BluRayIsoStream, DvdIsoStream, and VideoCdIsoStream), which provide the core functionality of streaming a video from the contents of an ISO.

IsoStream (and it's derivatives) handle the task of opening the files from within the specified ISO and presenting them as a single .Net Stream. The goal is for this stream to be used to allow for the playback of video from within an ISO.

Note: Whilst IsoStream is complete and working, the actual Emby plugin code is still work-in-progress. The plugin will correctly register itself with Emby server, and there are initial attempts at exposing API endpoints, but these still need more work to make them useful.

This project also includes the source to any required 3rd-party libraries, as plugins can only access framework libraries and the Emby SDK.

IsoPlayback.TestClient

This is a WinForms project that uses an embedded VLC player to try and prove and test the IsoStream implementations within the IsoContainerPlayback project.

The app will load a specified ISO using IsoStream, and then pass the stream to the embedded VLC player to play using the following code:

IsoStream isoStream;

// Load an iso into isoStream

videoView.MediaPlayer.Play(new Media(_libVlc, new StreamMediaInput(isoStream)));

I hope I'm along the right lines with this and would be happy to work on this and make whatever changes are needed if it's still possible to consider implementing? If so, please let me know what else I need to work on (I know the API endpoints will need more work and, as mentioned above, the stream implementation may need altering) and I'd be happy to get it done. 😁

Edited by Peckmore
  • Like 1
Posted
Quote

or if it will need refactoring to make each individual file from the ISO available separately upon request

Hi, this is what you will need. Essentially you need to make the .iso appear as if it were an expanded bluray or dvd folder. once you have that, then we can get it to play identically to how a folder rip would play.

My suggestion would be to register an api to extract a file from an iso. It should accept as a param the relative path of what file to extract. Just hardcode the iso path into the method for now. We'll make that more dynamic later. In addition to this, you'll probably also need an api to get a list of files based on a relative path inside the iso.

Add the [Unauthenticated] attribute to your routes for now so that you can test it easily in the browser.

So that's really the hard part. Once you have that, then the Emby side of it will be much easier and I can help fill that in.

  • Like 2
Posted

Hi @Luke

Apologies for getting the wrong end of the stick with my original implementation - I'd interpreted your comment as though you'd just need a stream wrapper around all of the files representing a video on an ISO, to then feed into ffmpeg. I realise now what you asked for was effectively a "virtual file system"-type wrapper to allow access into an ISO, which I guess you can then effectively just use the BluRay and DVD folder plugins/code on top of? 😁

I've redone the plugin based on your feedback, and pushed it all to the repo. The plugin now exposes 2 API endpoints - one to get a list of the contents from a folder within an ISO, and another to get a stream to any file within an ISO based on it's full path (within the ISO). The stream is a wrapped stream that, when disposed, will also dispose of the underlying streams, so hopefully there should be no leaks.

As per your suggestion, I've added the [Unauthenticated] attribute, and also hardcoded the ISO path for now - it's defined as a constant on the "IsoContainerPlaybackPlugin" class.

Hopefully this is more along the lines of what you needed, but again, let me know what else I can do and I'll do my best to get it done! 😄

  • Like 1
Posted
5 hours ago, Peckmore said:

Hi @Luke

Apologies for getting the wrong end of the stick with my original implementation - I'd interpreted your comment as though you'd just need a stream wrapper around all of the files representing a video on an ISO, to then feed into ffmpeg. I realise now what you asked for was effectively a "virtual file system"-type wrapper to allow access into an ISO, which I guess you can then effectively just use the BluRay and DVD folder plugins/code on top of? 😁

I've redone the plugin based on your feedback, and pushed it all to the repo. The plugin now exposes 2 API endpoints - one to get a list of the contents from a folder within an ISO, and another to get a stream to any file within an ISO based on it's full path (within the ISO). The stream is a wrapped stream that, when disposed, will also dispose of the underlying streams, so hopefully there should be no leaks.

As per your suggestion, I've added the [Unauthenticated] attribute, and also hardcoded the ISO path for now - it's defined as a constant on the "IsoContainerPlaybackPlugin" class.

Hopefully this is more along the lines of what you needed, but again, let me know what else I can do and I'll do my best to get it done! 😄

OK that was quick and you’ve verified  that these both work by testing in the browser?

  • Like 1
Posted (edited)
8 hours ago, Luke said:

OK that was quick and you’ve verified  that these both work by testing in the browser?

Hi Luke,

My apologies, I'd made a small mistake and placed the [Unauthenticated] attribute in the wrong place, but I've fixed this now, and also tweaked a couple of other bits (including merging the services into a single service).

With an ISO in the expected hard-coded location, the API is accessible from within a browser, as shown in the screenshots below.

GetDirectory.png.7a8e9fc22b201b34a4a46808315c8a25.png

GetFile.png.b68db0b350ee00af2ff72a8e04f16823.png

Swagger.png.2396d3e99120c448e8bd2c0d693ec1a0.png

At the moment, the GetFile method on the service just returns the Stream object directly, which (I believe) results in it being written to the response stream. Is this sufficient, or is there anything else required when returning a Stream object? I'm not making use of ResultFactory at the moment as I wasn't sure whether that would be needed?

Cheers! 😊

Edited by Peckmore
  • Thanks 1
Posted

And is it able to get the contents of a subfolder, such as bdmv/backup?

Posted
9 hours ago, Luke said:

And is it able to get the contents of a subfolder, such as bdmv/backup?

Yep, no problem! 😁

BluRay

/

bluray1.png.87f11d151dfbc26e13488366e36e738f.png

 

/BDMV

bluray2.png.2f7c59551e34abfc0c6e91e7679d1b0f.png

 

/BDMV/STREAM

bluray3.png.60e14b68aeb1c36b71872073b5425d82.png

 

/BDMV/index.bdmv

bluray4.png.009ab4dc8e661e23492a61a1a12972e5.png

 

DVD

/

dvd1.png.425b358235d5f1947c4b0347a1146c63.png

 

/VIDEO_TS

dvd2.png.8575385319aee984e39eff62df9c7378.png

 

/VIDEO_TS/VIDEO_TS.IFO

dvd3.png.f6765ecd8aa91cb6323c900710513280.png

  • Thanks 2
Posted

OK where is the source for this? I can help take it a little further. Thanks.

  • Like 1

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