Jalle19 / xbmc-video-server

Web interface for streaming or downloading media from a Kodi/XBMC library
GNU General Public License v3.0
191 stars 39 forks source link

Web based player #39

Closed alexcroox closed 10 years ago

alexcroox commented 11 years ago

I believe free media players such as Flowplayer allow playback streaming of m3u files, so is it possible to embed a web based player into the web interface?

http://flash.flowplayer.org/plugins/javascript/ipad.html

alexcroox commented 11 years ago

Sorry looking at other issues it seems this doesn't trasncode the video just servers it up to play in VLC, so I'm guessing it wouldn't work for this, or mobile devices.

Jalle19 commented 11 years ago

This along with transcoding support is the top feature requests I've received. Sadly it is quite complicated to implement (I'm not sure I'm able to do it reliably) so I'm closing this for now.

selif00 commented 10 years ago

Jplayer seem to handle all format im currently testing it on the software and seem to be working just fine only chrome that dont seek but on other browser the player work just fine.

image

Jalle19 commented 10 years ago

@selif00 do you have this code available anywhere?

selif00 commented 10 years ago

i dont know how to commit to here never done it before. it also can be improved since i was not very familiar with zen framework or the css framework you had here it was hard for me as it to find where to put the js file and i had to hard code them into the main.php but it does work just fine if you want we can talk on skype or msg sence28@hotmail.com. thanks. the site is also up if you want to look at it.

selif00 commented 10 years ago

what i did was parsing the download link into the jplayer and the cover and it worked.

Jalle19 commented 10 years ago

Easiest way to publicize your changes is to fork the project on here on Github, make your changes, commit them and then push them to Github. After that a button will appear which when clicked will create a so called pull request to this repository.

selif00 commented 10 years ago

but let me fix this right can you tell me where i can insert java script js files

selif00 commented 10 years ago

so i have to fork again and do the changes again and them pull request hmm first time i try this.

Jalle19 commented 10 years ago

Place your JavaScript in the "js" folder, then you can load it from anywhere by running Yii::app()->registerScriptFile(). Look in the Yii tutorial on their website for more information.

I'll look into this myself after New Year's Eve so if you're uncomfortable with git you don't have to bother pushing your changes anywhere.

selif00 commented 10 years ago

let me know when you get back as i find out more interesting stuff i was able to pull all trailers youtube id and added the youtube video embed now all movies show trailer

also i was looking into popcorn.js and it have the ability to add SRT subtitles into the

also added Turn off the light js.

and im looking to add much more but my limitation on the Yii framework prevent me from doing much since is a framework i never worked before. i actually work more on Laravel 4 but the more i look into Yii the more i learn.

sorry for my gramma im spanish :dancer:

Jalle19 commented 10 years ago

My main gripe with a web-based player is that it won't be able to play everything, only videos that happen to be in a format that HTML5 supports.

selif00 commented 10 years ago

At least most of all my movies are on mp4 anyway i wanted to use xbmc to only run a web media no to use as media server player ect. i still use it for that but all the movie i have i make sure is on mp4 format.

also you can mention on the movie details page if the movie dont play on the player give the option to download ect. wish is not bad.

i finished added the option on the player if in the movie folder have a .srt or .vtt it add the into the

Jalle19 commented 10 years ago

Great job on the subtitles part! You seem to have done a decent amount of work, perhaps it would be best if you could push your changes back to Github so I can take a look? You can look at these two guides:

https://help.github.com/articles/using-pull-requests https://help.github.com/articles/creating-a-pull-request

selif00 commented 10 years ago

I will take a look

selif00 commented 10 years ago

i did quite a bit of change including changes on the design and template i guess for me to pull all these changes i have to start over again with the default repository here is a demo

http://glaisa.asosgaming.com user: demo pass: demo

selif00 commented 10 years ago

this is how i got the subtitles.

$it = new RecursiveDirectoryIterator(dirname($details->file));
$allowed=array("vtt","srt");

foreach(new RecursiveIteratorIterator($it) as $file) {

     if(in_array(substr($file, strrpos($file, '.') + 1),$allowed)) {
         echo "<track src='$file' kind='captions' srclang='en_US' label='English' /> \n";
    }else
        {
        echo "";
    }

}

this code can be improved.

Jalle19 commented 10 years ago

I take it that only works when XBMC is running on localhost? AFAIK the API unfortunately doesn't expose subtitle files.

selif00 commented 10 years ago

yes and yes the limitation on the API wont allow to get the subtitle files only option i see was the Player stuff that mean the on software player. so yes most likely for this code to work it need to work on localhost another solution would be to store movie metadata on the database and ability to upload subtitle and just call the subtitle base on movie ID and display them but i think this is just to much work to make but could be an improvement. but since im running the XBMC and the site in the same machine i dont have this problem.

selif00 commented 10 years ago

but now another thing i can think off the Subtitle Add-on that you install on the XBMC i see on the API that you can call all the params on the add-on because what i see when you search for a sub it actually store the srt and vtt in the same folder where the movie file is.

Jalle19 commented 10 years ago

Yeah it could even be possible to fetch the .SRT file through the Files.PrepareDownload API method if you resort to guessing the filename (which like you said is usually the same as the main movie file).

selif00 commented 10 years ago

ok this works i tested.


$filename = $details->file;
function replace_extension($filename, $new_extension) {
    $info = pathinfo($filename);
    return $info['dirname'] 
        . DIRECTORY_SEPARATOR 
        . $info['filename'] 
        . '.' 
        . $new_extension;
}

echo  'http://username:password@hostname.com:port',replace_extension($filename, 'srt');

where the http://username:password@hostname.com:port use the function of the XBMC.php not quite sure how to call it on the details.php but you get the idea

assuming that all srt have the same file name as the mp4 or movie file.

Jalle19 commented 10 years ago

@selif00 any progress on getting your changes pushed to Github?

selif00 commented 10 years ago

oh i did heavy modification to the software and did not wanted to start over gain o did create a new repo for it.

https://github.com/selif00/Xbmc-frontend

selif00 commented 10 years ago

i was reading over the api on plex but is even worst than xbmc.

selif00 commented 10 years ago

also learned a great deal of yii and im hopping to port your software into bootstrap 3 there are many big changes on bootstrap 3 including the popover position that i would like to use now that i was able to pull all the data from movieid into the movie index i wanted to do a popover to show the movie info in a nice popover window.

selif00 commented 10 years ago

also if you do composer update it upload alot of core files and break the whole website.

faceleg commented 10 years ago

@selif00 yes please let us know!

faceleg commented 10 years ago

Deleted his account?

selif00 commented 10 years ago

what?

selif00 commented 10 years ago

ah something is wrong with github i send a ticket already about it say that im a robot LAWL

bauruine commented 10 years ago

@faceleg yes. he wrote "im not longer using this software i build my own" and deleted his account. I have a backup of his code at https://github.com/bauruine/xbmc-video-server/commits/jsplayer if you are interested.

selif00 commented 10 years ago

i have not deleted my account btw is github that is doing something wierd and yes i moved on into another solution but i will help in much i can from time to time here.

Jalle19 commented 10 years ago

In my opinion a web-based player is not worth adding unless transcoding is possible. I've reopened an old issue (https://github.com/Jalle19/xbmc-video-server/issues/33) and added some pointers (mainly so I won't forget them myself) for this.

Jalle19 commented 10 years ago

Closing this in favor of #33. The transcoding branch has a simple video.js based media player for those who want to experiment.

Galixte commented 10 years ago

Could you make in sort to test under Windows Server and not only Linux ?

Jalle19 commented 10 years ago

Theoretically it should work on Windows if you install ffmpeg/avconv and make sure avconv is in your PATH.

Galixte commented 10 years ago

The PATH of XBMC Video Server on my server is : C:\xampp\htdocs\xbmc-video-server

For Windows i found FFmpeg (http://ffmpeg.zeranoe.com/builds/) but ffmpeg and avconv are the same program or i have to install two programs ?

How the folder of ffmpeg has to be named and where i have to put it ?

bauruine commented 10 years ago

avconv is a fork of ffmpeg you can download it from here http://win32.libav.org/releases/

http://lmgtfy.com/?q=windows+path

Galixte commented 10 years ago

Thanks it's OK but unfortunately i don't have one movie in WebM format :/

I will make a test soon.

Jalle19 commented 10 years ago

Your sources can be in any format you like, you can only transcode to WebM for now.

Galixte commented 10 years ago

I don't understand, why you say : "Your sources can be in any format you like" if only the sources in WebM format can be transcoded,