Video Transcoding....

Need help? Post your questions here.

Moderator: moderators

Video Transcoding....

Postby firebovine » Fri Mar 15, 2013 3:00 am

Hello all,

A certain streaming service wanted me to pay for the privilege of listening to advertisements. So, I set up a subsonic server. Just because there was mention of streaming video with subsonic, I decided to check out the video streaming deal that subsonic has to offer. This post is largely informational, with some questions interleaved.

Scenario: I've built the war for subsonic from maven and I've added JWPlayer6.x (and libraries), as well as replacing the jsp/rest/videoPlayer.jsp and jsp/videoPlayer.jsp files in order to support using JWPlayer6.0. I run the war with tomcat, and in front of tomcat, I have Apache doing proxy and SSL duties. So, now my subsonic video streaming deal is 100% HTML5. (Bai flash!)

So, I've added this transcoding option:

(from) avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts
(to) webm
(transcoder) ffmpeg -ss %o -t %d -i %s -async 1 -vf lutyuv=y=val*1.3 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f webm -vcodec libvpx -preset superfast -acodec libvorbis -threads 0 -

As you can see, that spits out wonderful .webm files that can be played in chrome, firefox, and my android phone (SGS3). I, uhh, dislike flash, so an HTML5 only solution is the one I'm going for.

Now, I wouldn't enable this transcode for my android phone because my android phone can handle the native mp4s. And jwplayer6 can "stream" mp4s.

The question: You can't "stream" the output of ffmpeg encoding an mp4. That is, you can't encode files (.flv/.avi/etc) into MP4, and stream it. However, jwplayer can pseudo-stream mp4s just fine. How can I have subsonic transcode an ENTIRE file into mp4 (in a temporary directory, or in memory), and then serve it to jwplayer like it would serve an mp4 file?

As an alternative, I'm going to:
1. For firefox/chrome, transcode/recontain everything (including .flv/.avi/.mkv) into .webm # since firefox doesn't support html5+mp4
2. For android, don't touch current mp4s, and transcode everything else (flv/avi/mkv) into .webm # since android supports html5+mp4 and html5+webm, but not .flv
3. For iOS -- this is the sucky part. iOS clients will only be able to watch movies which are stored in mp4 format. iOS only supports html5+mp4. This could be solved if I just routinely transcode everything to mp4 "offline".

Also, I'm curious -- what do other people do to acquire robust video streaming solutions with subsonic?

Thanks in advance. Here's some references:

# supported media types
http://www.longtailvideo.com/support/jw ... at-support
# upgrade to jwplayer6
viewtopic.php?t=11254
# this comment has a file to replace in /rest/, allows the android client to use html5...changes to transcode optional
viewtopic.php?t=11254#p51794


-- firebovine
firebovine
 
Posts: 1
Joined: Fri Mar 15, 2013 2:36 am

Re: Video Transcoding....

Postby DamageCase » Tue Apr 30, 2013 5:12 pm

So you say you were able to get Webm playing on your phone? How did you do that? I have webm transcoding, the video files show avi>webm on the app but when I go to play the video it opens in the browser and still trys to play in the flash player. Could you give me any direction into why this might be happening? Ive changed the player settings, everything and it still wont work!
DamageCase
 
Posts: 2
Joined: Tue Apr 30, 2013 5:08 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 31 guests