Hacker News new | comments | show | ask | jobs | submit login

All the stores have different requirements. One store requires 2500x2500 artwork, another requires FLAC audio, etc. So when users upload audio or video to DistroKid, everything gets converted to appease all the different stores.

Right now there's a cron that runs every few seconds, finds the next unprocessed file, and processes it via command line. If/when volume gets really high, I'll probably have to do this somewhat differently to make sure it scales.

DistroKid uses MediaInfo to figure out what the user uploaded:

http://mediaarea.net/en/MediaInfo

Then uses SOX for audio conversions:

http://sox.sourceforge.net/

And native Railo (the backend programming language I use) functions for image processing/resizing.

http://getrailo.com




Railo claims to be based on JavaEE, so you have lots of options for scaling this if needed (TimedTasks can be run on more than one server, JMS provides queuing when jobs are waiting, etc).


>Right now there's a cron that runs every few seconds, finds the next unprocessed file, and processes it via command line. If/when volume gets really high, I'll probably have to do this somewhat differently to make sure it scales.

Hah! Really cool. I wrote a very similar script/program to do that for huge video files using tons of different case/switch methods that carve up mplayer2.

Really awesome project, BTW.


thanks ! very interesting - I have never heard of any of the things that you mentioned .

could you talk about why you chose Railo, which looks to be a fairly esoteric stack. Is it something you chose specifically for its media capabilities ?


I love Railo. And I love the CFML language, which is what it uses. Railo is free (as opposed to Adobe ColdFusion - the other CFML platform), open source, has a great community, and does everything I need. I'm a speed demon in it. And the pages load super fast.


+1 for the simple & pragmatic solution w/ cron and not over-engineering this at the current stage!


How did you decide on using MediaInfo and SOX, rather than say eyeD3 and ffmpeg?


I forget why I didn't use ffmpeg. There was a reason. I evaluated both and decided SOX was better for me. It's working well so far.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: