WHS --> Android tablet transcoding optimization

Need help? Post your questions here.

Moderator: moderators

WHS --> Android tablet transcoding optimization

Postby slow1234 » Fri Nov 18, 2011 7:43 pm

Hi,

I have done a few searches within the Subsonic forums, but have become overwhelmed with the potential options to try. I was hoping that someone might have some good tips that would preclude me having to learn too much about transcoding options!

Problem Description: I am having what I think are transcoding issues (i.e., pausing/buffering every 5 seconds or so) when trying to view videos streamed from my Windows Home Server over the internet to my Motorola Xoom Android tablet (using the default settings from Subsonic/ffmpeg and the Android app). The issue occurs with various file types including avi, mp4, mpg, etc, containing various encodes including h264, divx, etc. The Windows Home Server machine is connected to the internet by wire (i.e., not WiFi), while my Xoom is accessing everything via WiFi - both at home and away.

Troubleshooting Steps: The problem also occurs when streaming over my home LAN WiFi, but is less frequent (i.e., the pausing/buffering still occurs, but every 30 seconds or so). The default stream speed appears to be 500Kbps in JWplayer, but the pausing/buffering still occurs if I bump it down to 200Kbps (which appears to be the lowest I can select within JWPlayer).

However, if I try to play the original video (i.e., without transcoding) at home using another Android video player on my Xoom (e.g. RockPlayer or MoboPlayer), the files stream beautifully with very few artifacts.

Based on these two observations, I think that my home LAN WiFi connection speed is not limiting things, but my ISP connection to the internet is PARTLY contributing to the issue. I say partly because the pausing/buffering issues still occur at home where the connection speed is not limited. Based on some speedtests, my ISP upload speed limit is pretty consistently around 500KBps (as expected based on my plan).

I think that this indicates that my WHS is also not able to keep up with the transcoding.

Playback Application and version: Subsonic Android app v3.2 which opens the video in the the JWplayer within the stock Android Honeycomb 3.1 Browser.

Subsonic Version: Version 4.5 (build 2385) - August 11, 2011

Server Version: jetty-6.1.x, java 1.6.0_18, Windows 2003 (38.1 MB / 70.1 MB)

Hardware Platform: Windows Home Server 1.0 SP2 running on an Intel Atom 230 @1.6 GHz and 2GB RAM.

Java Memory Limit: 100 MB

Within subsonic, all of the video transcoding strings are as follows:

Code: Select all
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -


This is the string that was in place upon installation of Subsonic. The subsonic log associated with playing one of my DVD backup files using this default subsonic transcoding string can be found below. It is a 720p DivX AC3 file.

Note that I have also tried the following string, as per the recommendation at http://subsonic.org/pages/transcoding.jsp:

Code: Select all
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -


However, this string leads to JW Player loading in my browser on the tablet, but instead of the video playing, I just see a bunch of numbers and letters in the video box.

Does anyone have any suggestions about how I might optimize this string (or try something else for that matter) to get my WHS based videos streaming to my Xoom when I am away from home, considering my ISP upload speed limit and my WHS hardware capabilities? When I'm at home, I don't use subsonic, I just view the files directly without transcoding!

Any assistance would be greatly appreciated.

Thanks,
Chris

EDIT: edited to add that I have tried another ffmpeg string, with no success (and no knowledge of what the different string is trying to do relative to the default one)

SUBSONIC LOG OUTPUT FROM PLAYING A DIVX AC3 720p FILE:
Code: Select all
[11/17/11 8:51:23 PM PST] INFO PlaylistInputStream cjl listening to "Las.Fallas.Valencia.avi"
[11/17/11 8:51:23 PM PST] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-ss] [0] [-i] [\\rayloweacer\videos\Fantastic Festivals DVD rip\Las.Fallas.Valencia.avi] [-async] [1] [-b] [2147483647k] [-s] [428x240] [-ar] [44100] [-ac] [2] [-v] [0] [-f] [flv] [-] 
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) ffmpeg version N-31653-gfaa3381, Copyright (c) 2000-2011 the FFmpeg developers
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) built on Jul 28 2011 01:57:12 with gcc 4.6.1
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavutil 51. 11. 0 / 51. 11. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavcodec 53. 9. 0 / 53. 9. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavformat 53. 6. 0 / 53. 6. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavdevice 53. 2. 0 / 53. 2. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavfilter 2. 27. 3 / 2. 27. 3
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libswscale 2. 0. 0 / 2. 0. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libpostproc 51. 2. 0 / 51. 2. 0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [mpeg4 @ 003DBE20] Invalid and inefficient vfw-avi packed B frames detected
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) 
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Input #0, avi, from '\\rayloweacer\videos\Fantastic Festivals DVD rip\Las.Fallas.Valencia.avi':
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) encoder : VirtualDubMod 1.5.10.2 (build 2540/release)
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Duration: 00:48:00.94, start: 0.000000, bitrate: 3115 kb/s
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [buffer @ 021D2E20] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [scale @ 021F1C40] w:1280 h:720 fmt:yuv420p -> w:428 h:240 fmt:yuv420p flags:0x4
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [NULL @ 021C0520] Value 2147483647000.000000 for parameter 'b' out of range
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [NULL @ 021C0520] Error setting option b to value 2147483647k.
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Output #0, flv, to 'pipe:':
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Video: flv, yuv420p, 428x240 [PAR 1:1 DAR 107:60], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 64 kb/s
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream mapping:
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0 -> #0.0
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1 -> #0.1
[11/17/11 8:51:24 PM PST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
slow1234
 
Posts: 3
Joined: Fri Nov 18, 2011 7:34 pm

Re: WHS --> Android tablet transcoding optimization

Postby BKKKPewsey » Fri Nov 18, 2011 8:20 pm

I cannot help too much as the only videos I have in SS are music ones.
However I have similiar hardware to you and the poor little atom is bit underpowered when it comes to transcoding.
I cannot even get videos to stream without buffering on my local lan via SS IF they require transcoding.
The only suggestion I can give is convert to flv (or mp4). I use Squeeze on my WHS with watch folders.
Just drop the files in and pick up the converted files later.

Depending on the size of your library you might want to up your memory limit - check in the control panel whilst SS is busy.
:mrgreen:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: WHS --> Android tablet transcoding optimization

Postby slow1234 » Fri Nov 18, 2011 10:04 pm

Thanks for the insight regarding your experience with similar WHS hardware and transcoding challenges! Maybe the hardware is just not good enough to transcode. I'm not too keen on converting all of the rips of my DVD collection that I've done already though - they took long enough (albeit I used default settings since I really didn't spend the time to figure out ripping options). Perhaps in the future I'll have to reconsider my final output format.

The other option I do have is to first download the videos to my tablet via the WHSPhone android app, and then watch them using MoboPlayer. This isn't streaming though!
slow1234
 
Posts: 3
Joined: Fri Nov 18, 2011 7:34 pm

Re: WHS --> Android tablet transcoding optimization

Postby GJ51 » Sun Nov 20, 2011 8:12 pm

Transcoding is very CPU intensive. I've written extensively on the topic here in the forums. The best solution for those who have lower powered CPU's is to preformat their videos into mp4 or flv format so that JW can playback directly without any need to transcode. Then the limiting factor becomes bandwidth/connection speed and the playback capabilities of the recieving device.
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

Re: WHS --> Android tablet transcoding optimization

Postby slow1234 » Mon Nov 21, 2011 7:54 pm

Thanks Gary,

So, my wimpy machine is likely the culprit then! In future I will be more aware of this and when I backup my DVD's I will convert them with this in mind.

Cheers,
Chris
slow1234
 
Posts: 3
Joined: Fri Nov 18, 2011 7:34 pm

Re: WHS --> Android tablet transcoding optimization

Postby BKKKPewsey » Mon Nov 21, 2011 11:47 pm

Don't forget you can still use SS and external player (with playlist) and let vlc or whatever do the transcoding.
If the client machine has more "horse-power" then let that do the hard work.
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom


Return to Help

Who is online

Users browsing this forum: No registered users and 22 guests