Topic: Problem Flinging from Desktop (Windows)


I have a Vizio TV with the Web Videos application.  I've been trying to use the Python script you guys have posted on GitHub (with some modification, I had to remove the "dave" part from the fling URL in the script).  I've been able to successfully fling a local file from my computer to the demo webpage using the script and view the content there, and I've also been able to fling from a website to the TV using the browser interface.  But I haven't been able to fling a local file from my computer to the TV using the script.  The flung video will appear in the queue, but when selected for playing the video never starts playing.  The script indicates that it was flung and there's a request when the I attempt to play the video.

I've check to make sure (as best as I can) that Handbrake is encoding the file correctly.  I've also verified using Wireshark that there's communication between the computer and the TV.  On the computer's network interface there's some TCP handshaking then a stream of what appears to be data to the TV, which ends with a series of TCP Window Full and TCP Zero Window error packets.

Any ideas what's going wrong?  I've tried just about everything I can think of.




Re: Problem Flinging from Desktop (Windows)

I just flung local content from my laptop PC to my desktop PC that's got the flingo demo webpage up...everything worked perfectly.  This leads me to think, through process of elimination, that the problem is on the TV end.  Either I'm not getting the encoding right or something isn't quite right with the Web Videos application.

As a side note, that's amazing that I can fling a video from a laptop that lacks the codecs to play the video to the desktop PC and it plays just fine.


Re: Problem Flinging from Desktop (Windows)

Oops.  Sorry about the dave.flingo...  in the source code. My bad.

This does look like an encoding issue.   Can you post the video file somewhere so I can try to fling it to our TVs?  Maybe just put it in your dropbox.



Re: Problem Flinging from Desktop (Windows)

I apologize if the link below is no good...I was trying to find a "free" file upload site, but as you know nothing is free.


This is a very short video that was encoded using the standard/normal preset in Handbrake.

Thanks for looking into this!


Re: Problem Flinging from Desktop (Windows)

Will give it a try.

BTW I thought a great feature would be to have the flingo desktop automatically (as a configuration option) move downloads to my dropbox (see dropbox.com).  This way I could download something on my PC and it would still play even when I turn my desktop off or if I move to a new network.  dropbox has limited size, but it is big enough (2GB free) to store and serve a few recent downloads.


Re: Problem Flinging from Desktop (Windows)

Confirmed that the video doesn't play on our TVs.  I tried reencoding with some knob tweaks in Handbrake, but still wouldn't play.  I was able to play some other videos using command-line flingo that were encoded as H.264.  I am no longer in the lab so I don't have a TV with me to test. I'll try this again tomorrow.

Fixed the dave.flingo.tv path in github.

The desktop app could really do with some on-the-fly transcoding to a supported format.   I know of no TVs that support a wide-range of formats like we find on the web.



Re: Problem Flinging from Desktop (Windows)

Interestingly this video plays on the 22" Vizio.

I handed this task off to Alvir to look into.  Maybe he can publish a better encoding description.

--Dave Harrison


Re: Problem Flinging from Desktop (Windows)

Thanks again for looking into this. 

I came across some general guides to the encoding: http://developer.yahoo.com/connectedtv/faq/index.html

I'm going to do some trial and error with the encoding and hopefully I'll eventually get it right.  I'll let you know.


Re: Problem Flinging from Desktop (Windows)

Success!  I configured Handbrake along the lines discussed in the FAQ that I linked to above, but what really seemed to make the difference is checking the "Web Optimized" option.  I read something earlier and I think this has to do with the location of the metadata within the video file.


Re: Problem Flinging from Desktop (Windows)


I looked around for a description of "web optimized" for handbrake.   This http://diveintohtml5.org/video.html noted that "web optimized" rearranges the file to move metadata from the front.  I'll have to play with this some more and update the FAQ.  This is really valuable information.  Thanks.

Could you post the exact specs that worked?  And if possible confirm that using the default "Handbrake" settings plus clicking "web optimized" works on your TV? 

What model do you have?  We test on a Vizio SV422XVT and a Vizio M220NV.

--Dave Harrison


Re: Problem Flinging from Desktop (Windows)

I've tried encoding a larger file (about 21 minutes) and have *not* been able to reproduce the success above.  With this particular file I'm using, I'm having trouble getting Handbrake to set the picture size to 720x480 (or fake a 1.5 aspect ratio).  I'm going to try out other sizes and/or aspect ratios, but I haven't had the time (especially since each encoding takes about 10 minutes).

I'm using a SV472XVT.


Re: Problem Flinging from Desktop (Windows)

Are you interested in hooking an open-source transcoder to the flingo desktop app so it will on-the-fly transcode?


Re: Problem Flinging from Desktop (Windows)

My hope was that eventually I'll be able to automate the whole process from torrent download -> encoding -> serving it up to the TV.  My time is pretty limited between work and family life so this is something I just peck at a few minutes every other day just since last week.

I've tried a few different encodings based on reading of what other people have had to do for other TV brands (such as Samsung) but no luck yet with the larger/longer videos.

Update:  I've tried a few more (several more even) encodings without any luck.  However, I'm sure that it's not the location of the MOOV atom.  It really seems to be tied to the size of the file though.  I took a file that wasn't playing at 21 minutes long and cut it down to about 4 minutes long.  The 4 minute long video played just fine.  I'm not sure where the threshold is but at somewhere between the two size files it appears to break.

Update 2:  I've finally got the full 21 minute video to play on the TV, but I had to reduce the video file's size to about 65 MB...yes, the thing looks awful.  This would indicate that either one of the options to increase quality is incompatible or that it's strictly a size issue.  I'm inclined to think we can rule out an incompatible quality related setting because the other sorter videos played just fine with increased quality settings.  Still, I think the next step to troubleshooting this would be to slowly add in options to increase quality to either identify the size breaking point or the incompatible setting.

Last edited by AMansfield (2010-11-10 21:12:24)


Re: Problem Flinging from Desktop (Windows)

I like where you are going with this.

If you want github commit access, just give me your github account name.


Re: Problem Flinging from Desktop (Windows)

The problem is somewhere around the 125 MB range.  I took a baseline very low quality encoding (I'll just refer to this as the baseline settings) that worked for a 21 minute video and tweaked it by adding in this and that feature to increase quality.  No matter what I did that increased the file size (even by a few MB), the video would not play.  I also used the baseline settings to encode a ~40 minute video, which also would not play.

I've also identified some other limitations with the script and/or the TV app.  You can't pause/fast forward/rewind.  If you try, the video will be "frozen" (what ever image/frame was displayed when you attempted it will be stuck on the screen).  I suspect this is because the script doesn't handle the back and forth communications that would be necessary to seek to different parts of the video.

Is the Flingo team aware of these limitations?  Are there other limitations or issues that have been identified already?  A list or description of the state that the desktop component would be helpful (and identified limitations and problem reports).


Re: Problem Flinging from Desktop (Windows)

Argg.. The python SimpleHTTPServer class does not support range requests.  This would account for the inability to seek.   I didn't realize this limitation.  It is a legitimate issue so I added a ticket to the github issue tracker. 

This problem doesn't occur with the desktop client because it uses Twisted.  I removed Twisted from the command-line client to eliminate external dependencies to keep the command-line client as simple as possible.

If seek fails with the desktop-version of the flingo client then it would be due to something else.

I don't quite understand the 125 MB problem.  We have successfully encoded and streamed much larger files to the TV.   Can you please post some files somewhere and include a description of the settings you are using?



Re: Problem Flinging from Desktop (Windows)

About that desktop client...I've tried to get that thing installed (or generate the executable), but I keep running into issues with its dependencies.  I've installed py2exe, twisted, qt, etc. but I can't seem to get the thing to work.  Any help on which packages need to be installed would be appreciated.  If I can get the video files served up with the client app, I'll drop trying to use the commandline version for now.



Re: Problem Flinging from Desktop (Windows)

After a few hours messing around with it, I finally got the desktop client through the build process.  It won't start though, I'm getting the following error in flingo.exe.log:
Traceback (most recent call last):
  File "flingo.py", line 13, in <module>
  File "netifaces.pyc", line 7, in <module>
  File "netifaces.pyc", line 4, in __bootstrap__
  File "pkg_resources.pyc", line 882, in resource_filename
  File "pkg_resources.pyc", line 1344, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip

Last edited by AMansfield (2010-11-13 17:56:34)


Re: Problem Flinging from Desktop (Windows)

In OS X, all I did was
  sudo easy_install netifaces

I'll give it a try in a Windows virtual machine.


Re: Problem Flinging from Desktop (Windows)

I set up a virtual machine.  I was able to get Flingo to compile using py2exe.  Follow the py2exe instructions to get the apporpriate DLLs.  You'll also need twisted.   As of now twisted is only available for up through Python 2.6 so I had to downgrade my python install.

Omar wrote up a simple NSIS installer script and built a windows installer.   The windows download is now available.


Re: Problem Flinging from Desktop (Windows)

I just got the latest branch from github and it built successfully without any errors.  I'm not sure what was wrong before, but it works now.  Not only that, but I was also able to fling a video with fairly high quality that was about 21 minutes long.  Tested seeking forward, backwards and pausing all worked fine too.

I tried stripping down the code from the desktop client and forming a more complex commandline version without any luck though.  Now that I have a working desktop client, I can use that as a test bed for some modifications.

Maybe soon I'll post some Handbrake configuration settings that work (including Handbreak CLI).

Dave:  By the way, the news post you made today... the title is "A windows Beta build is not available."  Shouldn't that be "now"? wink

Last edited by AMansfield (2010-11-22 17:24:47)


Re: Problem Flinging from Desktop (Windows)


"Windows Beta build is not available" --> "Windows Beta build is now available."



Re: Problem Flinging from Desktop (Windows)

I was having trouble flinging videos from my desktop to my Vizio TV and realized after trying to browse to http:\\localhost:8080 (from my desktop of course) that I was only given a directory listing for the C: drive on my desktop.  I keep all of my videos on a 2nd drive on my desktop and prefer to not keep them saved on C: or move them when I want to watch them.  Instead, I used the mklink command in Windows 7 to create a junction (symlinks won't work) from D:\movies to C:\movies.  It is now working perfectly.

I can stream video as long as it is an mp4 file.  Any mkv files I have won't play.  I realize mkv is just a container, but they're all encoded with h.264 codecs.  Seeing as there is currently no way to transcode video on the fly with Flingo, and doing so each time I want to watch something isn't ideal, is there any way to "trick" the TV into thinking the file is an mp4?  Is there a way to modify the metadata in some way?

Last edited by mniswonger (2010-11-30 08:45:33)


Re: Problem Flinging from Desktop (Windows)

mniswonger wrote:

...I was only given a directory listing for the C: drive on my desktop...

This is clearly a bug.   I don't want your entire c:\ drive to be served on port 8080.  Ouch! 

Flingo should serve files that have been flung regardless of where they reside, and it should serve ONLY those files that have been flung.  I will look at the code.



Re: Problem Flinging from Desktop (Windows)

I get the following error message when trying to fling from desktop to Vizio TV:
Traceback (most recent call last):
  File "flingo.py", line 129, in <module>
  File "twisted\internet\posixbase.pyc", line 355, in listenTCP
  File "twisted\internet\tcp.pyc", line 855, in startListening
twisted.internet.error.CannotListenError: Couldn't listen on any:8080: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted.

Flingo does recognize my Vizio internet TV, but generates above error message.