Getting JW Player to work in Subsonic 4.0.1

Need help? Post your questions here.

Moderator: moderators

Getting JW Player to work in Subsonic 4.0.1

Postby akhliber » Wed Aug 11, 2010 6:19 pm

Hey guys, another question... I've been trying to get the JW Player to work to stream videos on my subsonic site, and the only tutorial I can find is for Subsonic v. 3.8

When I try to follow the instructions for v.3.8, some of the fields of code the tutorial says to replace are different than they were at the time of the tutorial.

for instance, the tutorial calls for opening a file in directory “C:/subsonic/jetty/1130/webapp/WEB-INF/jsp/playlist.jsp"

but in version 4.0.1, there is no subsonic/jetty/1130...
only subsonic/jetty/1529

there is a playlist.jsp file in the subsonic/jetty/1529/webapp/web-inf/jsp folder but the lines of code told to change are somewhat different.

anyone have any suggestions?
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby lemay86 » Wed Aug 11, 2010 7:26 pm

Using that playlist.jsp file you found (in the 1529 dir).

The line starting like this:
Code: Select all
swfobject.embedSWF("<c:url value="/flash/jw-player


Should look like this:
Code: Select all
swfobject.embedSWF("<c:url value="/flash/jw-player-5.0.swf"/>", "placeholder", "340", "25", "9.0.0", false, flashvars, params, attributes); 


Also the code in the function skip should look like this once you have changed it:

Code: Select all
function skip(index) {
        if (index < 0 || index >= songs.length) {
            return;
        }

        var song = songs[index];
        currentStreamUrl = song.streamUrl;
        updateCurrentImage();
        var list = new Array();
        list[0] = {
            file:song.streamUrl,
            title:song.title,
            provider:"sound"
        };

        if (song.duration != null) {
            list[0].duration = song.duration;
        }
        if (song.format == "aac" || song.format == "m4a" || song.format == "mp4" || song.format == "m4v" || song.format == "flv") {
            list[0].provider = "video";
        }

        player.sendEvent("LOAD", list);
        player.sendEvent("PLAY");
    }


That will get h264/aac encoded flv's and mp4's to work. If you want to encode on the fly because you have say mkv's for example, then you need to setup the transcoding parameters shown in that forum thread.
lemay86
 
Posts: 22
Joined: Sat May 09, 2009 8:24 am

Postby akhliber » Wed Aug 11, 2010 8:02 pm

Okay, I've updated the code and set up transcoding and added my videos folder to my site.

I'm running JW Player 5.2, so I changed the code line accordingly.

The videos show up now, but when i click one to play it, nothing happens, and I don't see any "jw player" icon or link on the page...

any further assistance would be appreciated! thanks so much for your patience, I'm still quite new at this!
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby akhliber » Wed Aug 11, 2010 8:11 pm

Update: I changed the code back to jw player 5.0 instead of 5.2, as using 5.2 made the player disappear entirely.

So, at this point, my file should be written just as you listed above...
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby lemay86 » Wed Aug 11, 2010 8:37 pm

Yes,and with 5.0 is it working?
lemay86
 
Posts: 22
Joined: Sat May 09, 2009 8:24 am

Postby akhliber » Wed Aug 11, 2010 10:49 pm

no, still no video. the video files show up in the library but trying to play one of them just does nothing.
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby Kirk » Wed Aug 11, 2010 11:18 pm

akhliber wrote:no, still no video. the video files show up in the library but trying to play one of them just does nothing.


Could you post the relevant excerpts from your Subsonic log please?

I'd also be interested in an easy tutorial for video on the latest Subsonic.

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby akhliber » Wed Aug 11, 2010 11:38 pm

Here is what I think would be the relevant part of the Subsonic log... hope this helps :)
Thanks again!

INFO PlaylistInputStream admin listening to "01 Battlestar Galactica - Mini Series\Battlestar Galactica 1.0.avi"
[8/11/10 7:32:33 PM EDT] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-i] [E:\Videos\Battlestar Galactica\01 Battlestar Galactica - Mini Series\Battlestar Galactica 1.0.avi] [-f] [flv] [-y]
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) FFmpeg version SVN-r21231-Sherpya, Copyright (c) 2000-2010 Fabrice Bellard, et al.
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) built on Jan 16 2010 05:42:31 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavutil 50. 7. 0 / 50. 7. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavcodec 52.47. 0 / 52.47. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavformat 52.47. 0 / 52.47. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavdevice 52. 2. 0 / 52. 2. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavfilter 1.15. 0 / 1.15. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libswscale 0. 8. 0 / 0. 8. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libpostproc 51. 2. 0 / 51. 2. 0
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [NULL @ 01298260]Invalid and inefficient vfw-avi packed B frames detected
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Input #0, avi, from 'E:\Videos\Battlestar Galactica\01 Battlestar Galactica - Mini Series\Battlestar Galactica 1.0.avi':
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Duration: 01:34:04.76, start: 0.000000, bitrate: 1767 kb/s
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Video: mpeg4, yuv420p, 704x384 [PAR 1:1 DAR 11:6], 25 tbr, 25 tbn, 25 tbc
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
[8/11/10 7:32:33 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) At least one output file must be specified
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby Kirk » Thu Aug 12, 2010 7:24 pm

I haven't had enough time to play with the video playback on Subsonic, but I'd like to think I'm skilled in the art of troubleshooting.

It looks like you're playing back an AVI file, and this might be a simple transcoder issue.

Can you please attempt to play a normal FLV file? If you don't have one, you should be able to pull one off any YouTube video using a video downloader such as YouTube Downloader HD (just google it if you need it).

If the FLV works but your AVIs don't, then you've got an issue with your transcoding...

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby lemay86 » Sat Aug 14, 2010 12:57 am

I agree this seems as though this may be a transcoding issue. Play a flv file if you can, and if that plays fine then please post you transcoding rules from your setup.
lemay86
 
Posts: 22
Joined: Sat May 09, 2009 8:24 am

Postby akhliber » Sat Aug 14, 2010 11:46 pm

hmm, downloaded an FLV file, tried to play it, and same result. just no response from the player.
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm

Postby akhliber » Mon Aug 16, 2010 10:48 am

Okay, so I think I may know what the problem is... I believe I entered the transcoding fields correctly, but I did not put in parameters for the video (resolution, audio, etc), as I wasn't sure what would be good parameters to put in, and was assuming it would default if nothing was entered in.

Maybe I was wrong about that? Maybe without stated parameters it just can't play, which would make me a bit silly hehe.

Anyway, if this is possibly the case, could someone please let me know and maybe humor me but suggesting some parameters that would be ideal for someone with a standard cable internet connection?
akhliber
 
Posts: 25
Joined: Wed Jun 30, 2010 1:01 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 20 guests