jonathanasdf

Serious Dabbler

Foobar2000 Theme: Monolite Plus Blue Mod

leave a comment »

This is a mod for the blue version of Monolite Plus created by Junior-Spirit and Sparanoid which is a mod for Monolite created by fanco86.

After updating Foobar2000 past version 1.1, it will prompt you to move all your components to an user folder (%appdata%/foobar2000). Of course this is also how it works by default if you download a recent version of Foobar2000 and start installing components. Unfortunately, this breaks the Monolite Plus skin and there’s a lot of “Aw, Crashed” messages. I really liked this skin so I went over the code and fixed it. This mod also has a bunch of small changes I’ve made to the skin over the past few years that honestly I don’t remember any more.

I removed pretty much all the Last.fm stuff from it though, since I don’t use Last.fm and I had thought they might have been causing the crashes (they weren’t).

Download: https://dl.dropboxusercontent.com/u/4910378/Monolite%20Plus%20Blue%20Mod.zip

Written by jonathanasdf

February 23, 2014 at 12:35 AM

Posted in Misc

Tagged with ,

UCOSP – Freeseer Wrap Up

with one comment

Another term has come to an end and with it comes the completion of our project work on Freeseer. The project was a joint project with Mike Chong of the University of Waterloo. In this post I will summarize what we had intended to do, the various problems, solutions, and lessons learned, and what we had ultimately accomplished. I will also comment a bit on the UCOSP experience.

The original design of our 10 week project consisted of 3 parts:

1) Set up Freeseer to output a working RTMP stream.
2) Set up the GUI required to configure the output plugin.
3) Integrate with Youtube Live Events for one-step live-streaming from Freeseer.

Based on the initial schedule and breakdown it seemed like a manageable project. Unfortunately, like always, the actual time required was much longer due to a variety of unforeseen issues, that, in hindsight, should have been weighted more highly when creating the plan.

What ended up happening is that Mike mostly worked on the gstreamer pipeline in pygst in the freeseer plugin to output rtmp, and I mostly worked on porting the gstreamer rtmp plugin to Windows (see here). I’m sure Mike has faced his share of problems, but here are the main ones I had encountered (mostly regarding the scheduling in the project proposal).

First of all, I should have done more research into cross-platform compatibility of the technologies we were planning on using. It completely slipped my mind to check whether the rtmp plugin was available on Windows until Thanh commented, and thus the time needed to actually get the plugin ported to Windows was not part of my calculations.

Secondly, I should stop trying to use Cygwin for everything. Unfortunately, it seems like Cygwin is a setup that is not suited for developments of medium to large sized projects with many dependencies – almost surely some dependency package for Linux will fail to install, and interfacing with Windows dlls and exes from Cygwin is not such a great thing (I have wpython and python corresponding to the windows version of python and the linux version of python, for example). Trying to get things set up on Cygwin only ended up wasting a lot of time and getting nowhere.

Thirdly, I did not consider the time required to set up a test server for the rtmp streaming. I had assumed that it should be easy to set up an rtmp server that just relays the stream (and it should be!) but that ended up being a very wrong assumption. I spent easily 2 weeks struggling with Flash Media Server before finally Mike got a Red5 server running for us. Well, it didn’t help that because I was working with a plugin that I ported myself, I was not able to easily tell whether it was the plugin that had a bug or if FMS really was not working well for us.

I guess the main takeaway is, always plan for the unexpected. Other than that, I believe our project was successful. We were able to output a working stream from freeseer, through the server Mike set up, and finally receive the stream locally through VLC. Thus, we had fulfilled the first two of the three goals, and I am very satisfied with the result.

Future work is to optimize the streaming to reduce latency and improve quality, to test out the stream with Youtube Live Events, and to create an integrated UI for interacting with Youtube.

On the UCOSP experience itself, since it was not my first time working on a software project or using git, I did not find it much different, except for the fact that everyone lived very far from each other. I definitely enjoyed the freedom I had in this project, freed from the confines and requirements of a structured software engineering project, and able to work on a real world application with real world technologies. Most of all, I enjoyed the lack of having to attend lectures two to three times a week! I would highly recommend everyone to try out UCOSP.

I’m undecided if I want to continue working on Freeseer afterwards, because I seem to have a lot planned next term, so we’ll see.

Written by jonathanasdf

November 30, 2012 at 7:15 PM

Posted in Programming, School

Tagged with ,

UCOSP – Freeseer Mid-Term Blog Post

with one comment

It has already been a full month, and only 3 weeks are left until our projects finish. Here is a brief summary of the progress on my project in the past month, which is a joint project with Mike Chong on implementing RTMP streaming and Youtube Live Events streaming.

  • A freeseer plugin has been developed that will stream to a given rtmp url. It currently does not work.
  • The rtmpsink plugin for gstreamer has been ported to Windows, and can connect and send data to a Flash Media Server (FMS) running locally.

Fixing the freeseer plugin probably won’t be an issue, and I’m sure Mike can handle it once he has figured out the current problem that’s bothering him – and me. The problem is even just trying to successfully broadcast a video+audio stream from gstreamer (using gst-launch) to an rtmp server, and then watching the live broadcast from a media player. It seems that Mike is having problems connecting to the server he has set up, because he isn’t hosting it locally, but instead of that I will talk about what problems I have been running into.

 

I can successfully connect to my local FMS from gstreamer, send data to, and receive data from it. However, the data that I send doesn’t match up with what I receive. In particular, the video appears distorted, and the audio is corrupted and neither VLC nor MPC can play it. For more technical information refer to the email titled “Weekly Update – RTMP Data Loss Problems” sent to the freeseer mailing list today.

I believe resolving this issue and getting the rtmp plugin for freeseer working to be of the utmost significance, but realistically speaking with only 3 weeks left there will not be time to work on Youtube integration.  The updated project proposal contains the information on the new schedule proposed.

Currently, I believe the possible sources of error could be:

  1. The rtmpsink element in gstreamer is broken and doesn’t send all the data to the server
    1a) or more likely, my port of the rtmpsink element to windows broke it
  2. The data is somehow dropped on the way to the server
  3. The server somehow loses the data somewhere
  4. The data is somehow dropped on the way from the server to the client
  5. rtmpdump is broken and is not saving all the data it receives

Of those, I believe 1a, 2, and 4 to be the most likely culprits. To debug these, I have two ideas in mind:

  • Use a protocol analyzer such as Wireshark to monitor the data sent to the server, and see if it matches the data in the file.
  • On the server side, save all of the data received into a file, and compare the two files

The first is a lot more complicated to set up than the second, and if the server does receive all of the correct data, then we can skip checking the first.  As such, in the next week or so, I will set up crtmpserver and implement the second idea.

Written by jonathanasdf

November 9, 2012 at 5:57 PM

Posted in Programming

Tagged with ,

Building rtmpsink plugin for gstreamer on Windows

with one comment

In this post I will guide you through how I built the rtmpsink plugin for gstreamer on Windows.

I built this off of OSSBuild r1012, librtmp 2.4, and zlib (lastest version should work, no changes are made to zlib).

First, from the OSSBuild source you want to add a new project for the rtmp plugin. This patch should put the source code in the right place, so what you want to do is just import ossbuild/Main/GStreamer/Windows/Build/Plugins/Bad/ext/rtmp.vcxproj.

The rtmp plugin relies on librtmp which relies on zlib, so you should add both of them as projects into the solution. For librtmp, some changes are needed to satisfy Visual Studio. In particular, whenever there’s a complaint that the POSIX name of some string function (strdup, vsnprintf, snprintf, stricmp, strnicmp) replace it with the suggested function.

There might be some small errors or path issues and stuff left. Remember to add gstbase, gstreamer and librtmp as references to gstrtmp, and zlib as a reference to librtmp. Hopefully everything should build without much hassle, and you can find the result as ossbuild/Build/Windows/Win32/Release/bin/plugins/libgstrtmp.dll. Drop the file into the OSSBuild/GStreamer/v0.10.7/lib/gstreamer-0.10 folder in your OSSBuild installation and you’re good to go!
Good luck.

Written by jonathanasdf

November 9, 2012 at 5:31 PM

Posted in Programming

Tagged with ,

UCOSP – Freeseer – Starting Out

leave a comment »

This term I enrolled in a rather unusual course – a course that consists of working with other undergraduates throughout Canada on open source projects, formally the Undergraduate Capstone Open Source Projects (UCOSP). Over the weekend of September 28th, 58 students from 16 different Canadian universities gathered in Kitchener, Ontario for a 3 day code sprint, where we got to know more about our projects and fellow team members. I am part of the Freeseer project, and in this post I’ll summarize the highlights of the code sprint, and what I will be working on for the remainder of this term.

The code sprint itself was a great experience, and was made possible through the generosity of Google, which we were lucky enough to visit their Waterloo office while there. There are a few posts about the general schedule of the code sprint on the UCOSP website so I will skip that, and instead focus on my experience trying to set up Freeseer for development on my laptop.

First a few words about what Freeseer is. Freeseer started out as a compact open source solution to recording talks given at conferences, but has grown in popularity with even academic institutions seeking to use it to record regular scheduled lectures. We (the UCOSP students collectively) will be working on a new version of Freeseer which is currently in the experimental branch in making it more stable, have more features, and cross-platform.

I’m pretty stubborn for trying to use Windows with cygwin instead of Linux or pure Windows, and as a result I often end up falling in the middle – unable to follow either Linux instructions or Windows instructions due to conflicts with each other. This was no exception, for following the Windows instructions would entail installing the Windows python environment and a lot of dependencies, which may potentially conflict with the Linux python environments I already have installed, and following the Linux instructions… well…

The problem boils down to that installing PyQt4 requires qmake, but the qmake.exe that came in the cygwin packages appears not to work or something. In the end I gave in and just installed the Windows way through the provided batch script. A few tips for anyone else in the same situation:

  • Don’t execute the script, go through it and run each line manually
  • After installing the Windows python, make a alias to it in your bashrc, for example wpython
  • It also makes sense to alias easy_install in Windows
  • You might not want to put the Windows python in your PATH variable.

In the end, I was able to run the Freeseer application, and also quickly implement a feature present in the linux version but missing in the windows version of the app and issue a pull request.

During the code sprint we also decided what to tackle during the term. Together with Mike Chong, I will be working towards eventually supporting streaming from Freeseer directly to Youtube Live Events. This is a fairly ambitious project and so as a first step we will be looking towards outputting streams from Freeseer according to the RTMP specifications and getting that to work with e.g. VLC, then as time permits working with the Youtube API to link output to input.

More details about our project can be found in the Project Proposal (currently a draft) and in future blog posts, as we investigate more the technologies involved and are able to make more detailed plans and schedules.

Written by jonathanasdf

October 8, 2012 at 6:18 PM

Posted in Programming, School

Tagged with ,

Global Game Jam 2012

leave a comment »

… This is a really late post, but, whatever.

I attended Global Game Jam this year for the first time ever. It was held at UBC, and there were over 180 participants! The theme was the a picture taken from the wikipedia page for ouroboros. Our team was amazing and awesome. It seemed like when every other team was working with a gloomy spirit and their heads hanging low in a fierce race against time, our team was the only one that filled the room with laughter; it almost seems as if we were the only team that had fun during the 48 hours.

But more importantly than that, this is probably the first time I’ve managed to actually finish a polished game in any team. I guess the time constraint really helped because the 4 or 5 other collabs I had done were without any kind of deadlines, and towards the middle interest just kinda fizzed away.

Here is our final product: http://globalgamejam.org/2012/reverse-rpg

It was created in GameMaker HTML5 Version, but when we exported it to the web it lagged too much, so we only exported an executable.

At first we had planned for the mechanic of losing abilities every few levels because the robot was running out of power, so it had to get rid of some parts, but those parts are picked up by another robot who in the end appears before you as the boss. This was our interpretation of the theme. However, near the 24 hour mark we realized that this was going to be impossible to finish so we cut it out… But don’t worry! You see the markings on the doors? That’s actually a snake eating its own tail! So …. we did follow the theme (ok, it’s a very bad excuse :( but what can we do)

Still, I personally think it is very fun, so definitely give it a try!

Written by jonathanasdf

February 22, 2012 at 5:26 PM

Posted in Games

Tagged with

Ludum Dare 22 is Over

leave a comment »

You can find my submission here.

It was quite a bit of fun working on this, but looking forward a lot more to GGJ where I won’t feel so lonely because I won’t be working by myself.

I think I’ll try to finish this one up if I can find time to. Until something more interesting happens and I forget about this :(

But it was definitely worth it, because at least I managed to learn the Box2D system, which will probably help me in the future.

And no, the reason I ran out of time was not because I spent too much time on useless stuff this time. The Dialog class was surprisingly very simple and quick to implement, and I spent maybe an hour or two total working on it and debugging it, so less than 5-10% of my time.

One notable submission I’d like to point out is Minicraft by notch (the guy who made Minecraft; go figure). It’s got an amazing amount of detail and polish for something done in 48 hours. Hopefully I’ll be able to achieve that level of efficiency some day.

Written by jonathanasdf

December 18, 2011 at 8:24 PM

Posted in AS3, Games, Reviews

Tagged with , ,