video conversion performance

Posted on 2012-09-07
Last Modified: 2012-09-09
I have a 64-bit windows server that runs ffmpeg and mkvmerge to perform video file manipulation.

The app is a 64-bit c# console app that basically runs in a loop and waits for something to process.  It is monitoring a folder and when it sees a file in the folder it grabs the file and processes it then puts the processed file in to another folder.
It processes small videos by calling out and running ffmpeg and mkvmerge at the command line.
It creates asynchronous threads to process in parallel (at least I think it is doing that).
The videos are all well under 1 meg in size.

This is real-time processing and I could have as many as 1000 simultaneous requests so every millisecond counts.

I have tried to tune it as best I can, but I am looking for better performance.
The bottleneck is in the ffmpeg/mkvmerge processing.

Here are my thoughts on ways to improve performance.  I am looking for comments on which changes I can make to get biggest performance boost with least amount of $$.
And which changes are not going to make a big difference.

1 - more powerful CPU (add more cores).
2 - use solid state hard drives?
3 - cache more videos in RAM (since the videos are quite small I could in theory create a RAMdisk.
4 - link directly to ffmpeg and mkvmerge libraries instead of shelling out to command-line. (not sure if this would buy me much performance increase)
5 - switch to Linux?
6 - Any other ideas?

Thanks for your thoughts.

Question by:kevinvw1
    1 Comment
    LVL 9

    Accepted Solution

    The disk speed is going to be a big bottle neck here. SSD's IMO are probably the most cost effective upgrade (after RAM, depending on how much you have).

    Depending how much you are looking to spend, these have stupidly high IO, which is what you need: RevoDrive

    Depending on what quality is required, GPU conversion maybe the way to go, if you can find an appropriate program to do that for you.

    Linux install will not make a huge difference (spec dependent), but it's free so...

    I presume you have RAID arrays in there for maximum IO, try to get this sort of flow as much as possible:
    -Read file into RAM
    -Write File to a different hard disk.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    You may or may not be familiar with Kodi ( the open source software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS, and Android.  Kodi which started off as X-Box Media Center (XBMC) many years…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Viewers will get an overview of how to make and use Drum Racks in Ableton Live. Load new Drum Rack into empty MIDI track: Fill rack with audio samples: Re-arrange sample slots as necessary: Adjust parameters of each slot to tailor each sound a…
    Viewers will learn the basics of creating custom device Racks in Ableton Live. Place instrument(s) and effects onto a track, and select them all by holding the Shift key and clicking on the device title bars: Group them by typing Command-G (Ctrl-G…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now