Video Streaming

Need help? Post your questions here.

Moderator: moderators

Video Streaming

Postby GJ51 » Fri Nov 12, 2010 10:25 am

I've been able to adapt SS to play just about any video I throw at it in JW Player. The only problem I'm having is getting the player to start the first video consistently. I usually have to switch players a few times to get the first video to play. Once the player starts playnig, it will play other selected videos just fine.

The only issue I have is getting the player to start up to play the first video, once it goes, successive videos will play without a problem.

Anyone have any ideas?
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby GJ51 » Mon Nov 15, 2010 12:38 am

Bump - Anybody else working on video streaming????
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby GJ51 » Mon Nov 15, 2010 3:53 am

I have the video working!

Here is what I did to enable video:

Subsonic 4.1 Video setup instructions for Windows

Step 1: Download and install version 4.1 of Subsonic to “c:/subsonic/ (this is usually the default location)

Step 2: Open “C:/subsonic/jetty/1802/webapp/WEB-INF/jsp/playlist.jsp” using a text editor like notepad or wordpad.

Step 3: Search for:

"340" and that's the line you're looking for. Replace the "24" after it with a larger number, 255 gives you a nice player size with a 4:3 aspect ratio. You can tweak the player size to your liking.

Step 4: Search for:

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

Just above this:

Replace:

if (song.format == "aac" || song.format == "m4a") {
list[0].provider = "video";
}

with:


if(song.format=="mpg" || song.format=="mpeg" || song.format=="avi" || song.format=="mp4" || song.format=="mkv" || song.format=="ogm" || song.format=="flv" || song.format == "aac" || song.format == "m4a"){
list[0]["type"]="video";
}

Step 5: Open your browser and login to your subsonic server by pointing your browser to http://localhost (http://locahost:portno if you changed the port for subsonic)

Step 6:Go to Settings > General, and replace the content of “Music Mask” with this:

.mp3 .ogg .aac .flac .m4a .wav .wma .mpg .mpeg .avi .mkv .ogm .mp4 .divx

STEP 7: "Name" "Convert from" and "Convert to" are the same as given in the example.

You can configure multiple conversion configuration for each file type - just be sure to give them different names and make sure only one is default (otherwise it will always go with the first). Then you can chose which encoding configurations to use in the Players tab. Then select the player you want to use based upon which device/data you are using.

Example Step 7:

Go to Settings > Transcoding, and add new transcoders one at a time, corresponding to .mpg, .avi, .mkv, .mp4, and .mpeg. Example for avi to flv is given below:

avi > flv | avi | flv | ffmpeg -re -y -i %s -ar 44100 -sameq -deinterlace -f flv -

Here is the encoding "Step 1" I use for use on 3G:
ffmpeg -i %s -f flv -y -s 640x480 -ar 44100 -b 200kb -ab 32kb -ac 1 -

Note that this can be changed to suit your needs:

-s is the frame size. For widescreen, use 800x450. If you will be watching mostly on a computer, pick a size appropriate for the videos you will be watching.

-ar is the audio sampling rate in Hz. This is probably a good number.

-b is the your video bitrate. This is where the tradeoff between bandwidth and quality takes place. You'll find 200kbps is pretty crappy, but it consistently works on 3G for me. You may be able to get 300-400 to work. Going to be watching on WiFi or that sweet, sweet 4G? Crank it up!
-ab is your audio bitrate. Want better sound quality? Turn it up?

Step 8: Now go to Settings > Players, and make sure your default player for your chosen current player is set to “Web Player”, and that all your new transcoders are checked in (scroll down to bottom of page to ensure this).

Step 9: Now go to Settings > Music Folders, and add your folder containing videos.

Step 10: Open C:/subsonic/jetty/1130/webapp/WEB-INF/jsp/index.jsp. Change
frameset rows="70%,30%"
to
frameset rows="50%,50%"

50/50 can be replaced with whatever looks best to you.

Use the browsing system, and try to play a video with the default Player. After a few seconds the sound should start playing. Right Click on the JWPlayer, and select “Toggle Fullscreen” to start video in full screen mode.
Now you should be able to stream video using Subsonic.

Subsonic offers unmatched flexibility for streaming multimedia, and allows you to access your music and video collection from remote locations.

PS: People with low upload bandwidth might need to tweak their ffmpeg settings a bit.
Last edited by GJ51 on Wed Nov 17, 2010 4:13 pm, edited 4 times in total.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby amels802 » Mon Nov 15, 2010 11:19 pm

Wow... thanks alot for the details! This does work for me in Chrome better than IE
amels802
 
Posts: 13
Joined: Sun Jun 13, 2010 5:18 am

Postby GJ51 » Tue Nov 16, 2010 2:04 am

Glad to see you have it working. Any trouble getting the player to start? I tried Chrome, and I still have to switch the player at least once to get the video to run.

This isn't a big hassle for me, but I'd like to set video up for guest accounts, which only have a single player. Not being able to switch, they can't get the video running.

So close...
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby HellSassa69 » Tue Nov 16, 2010 11:32 pm

ty for your great tutorial!

Unfortunatelly it doesnt quite work for me!

I am useing Subsonic "4.1 (build 1802) – September 10, 2010" and the Server runs on a WHS with a 64bit intel dual core cpu.

I think that I followed all your steps. My Videos also show up in SS but if I play them jwplayer first shows this circular for about 2 secs, then the jwplayer logo in the lower left corner and then simply stays black :(

ffmpeg is extraxted in the "transcode" sub folder.
My guess is that I have done something wrong in the

settings -> transcoding screen! I have set up one rulesfor testing (my vid I want to play is a avi) and it looks like this:

NAME:
avi > flv
CONVERT FROM:
avi
CONVERT TO:
flv
STEP1:
ffmpeg -i %s -f flv -y -s 800x450 -ar 44100 -b 200kb -ab 32kb -ac 1 -

could this be the error? Should I change something?

Just checked the transcoding option WAV > mp3 and this method is working like a charm. Do I have to install some codecs on the server or is ffmpeg alone enough?
HellSassa69
 
Posts: 2
Joined: Tue Nov 16, 2010 11:21 pm

Postby GJ51 » Tue Nov 16, 2010 11:58 pm

Try

avi > flv | avi | flv | ffmpeg -re -y -i %s -ar 44100 -sameq -deinterlace -f flv

If the player fails to start, refresh the browser and try again. It can take 2-3 tries to get the player started.
Last edited by GJ51 on Thu Nov 18, 2010 11:01 am, edited 1 time in total.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby GJ51 » Wed Nov 17, 2010 4:06 pm

I found the problem with the player not starting up every time. It has now been fixed. The post above with the instructions has been edited to reflect the changes.

If you haven't tried this before, i suggest reading the entire post and do a walk through of where the files are and what needs to be changed before you make any changes. It's not that hard, but it can be confusing.

I've been working on this for quite a while now, like we're talking months, but then again at my age I'm not to fast anymore. I guess you could say I'm half-fast.

I was working on various posts that had different instructions for different versions of SS. This post is the only complete guide I know of for implementing video in version 4.1

I intend to use one site for music and other audio so that the player doesn't interfere with the playlist, and then set up a second site for home video, movies, and recorded TV.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby HellSassa69 » Wed Nov 17, 2010 9:29 pm

thx for the fast reply! Unfortunately i have still no luck!

As you suggested I added "ffmpeg -re -y -i %s -ar 44100 -sameq -deinterlace -f flv" for avi to flv and I added "ffmpeg -i %s -f flv -y -s 640x480 -ar 44100 -b 200kb -ab 32kb -ac 1 -" which is simply what is written in the first post (read it already twice yesterday!

I also created this 3 vid players and enabled web player and the transcoding rules for each player but I ve still no luch even with mp4 files...

When the video player shows up like it does for me the error should be solved drom within subsonic, right?
I dont thinik that I messed up somethingwhile editing the text files.
HellSassa69
 
Posts: 2
Joined: Tue Nov 16, 2010 11:21 pm

Postby GJ51 » Wed Nov 17, 2010 11:04 pm

Read the post above. I have been testing all day and it plays everything I throw at it on the first try, including h.264.

There are some good screen shots of the transcoding table here:

http://forum.subsonic.org/forum/viewtop ... c&start=45

Also be sure that the defined players have the enabled check boxes selected for the new settings. That's how you assign different transcoding parameters for different players.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby GJ51 » Thu Nov 18, 2010 9:12 am

After almost a full day of testing, with rock solid results, I'm starting to see an occssional failure to start the player again.

A refresh of the browser page seems to fix it.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby GJ51 » Sat Nov 20, 2010 7:36 pm

I recently installed the latest version of IE9 and started having problems again. Going into system settings and resetting the virtual memory to "System managed size, rather than a predefined size, has cleared up the problems I was having.

Videos are now starting in the player every time.

One other issue - on my son's computer he has a menu button on the player that gives him options to embed the video in a webpage. My system has no such menu on the player. I'm guessing it's due to a browser option setting, but I haven't figured it out yet.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Troubles with video driving to wits end

Postby rambler » Mon Nov 22, 2010 10:26 pm

GJ51, thank you for the tutorial on integrating video playback, it is the closest I have gotten to a working player.

I still have the issue that my video files can not be selected or played once I navigate to the video folder and the sub folder that contains the video file.

The JW player plugin is present,and seems to work, but I just can't seem to get the video file to be visible in subsonic.

Has anyone come across this before? Or know what my issue is?

Thank you all very much.
User avatar
rambler
 
Posts: 4
Joined: Mon Nov 22, 2010 10:18 pm

Postby GJ51 » Mon Nov 22, 2010 11:02 pm

There are still a few glitches for sure. I have found that you sometimes need to refresh the browser and attempt to replay the selected video several times to get the player going.

I've found Chrome to work pretty well. IE8 also works OK. IE9 can cause all kind of problems.

I'm not sure what you mean by not being able to select the video.

I often just hit the "Play All" link, just because it's easier than hitting the > Play arrow.

Play, refresh, Play, refresh, ... until the first video goes. Once you get the first video to play, subsequent videos should play without problems during the current session. If you have more than one player available switching players usually gets the video to play.

I'm not sure what causes the player not to start consistently. I've been reading through a lot of code, but so far nothing stands out. If I find a fix, I'll post it here.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby rambler » Wed Nov 24, 2010 8:15 pm

Thank you for the quick reply.

The problem is that when i expand the folder where the video is saved, Subsonic does not see the file or recognize that it is a video file. All i can see is the containing folder, not any of the contents.

Sorry to be so ignorant, but I have gone through multiple installations and tries at integrating video and this is closest I have gotten. I am bout to uninstall again and start over, as it has at least allowed to make a little headway each time.
User avatar
rambler
 
Posts: 4
Joined: Mon Nov 22, 2010 10:18 pm

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 14 guests