26 comments

[ 3.6 ms ] story [ 69.6 ms ] thread
Maybe it's just me, but I feel like I have a way better understanding of what Zencoder does after I read that article (we upload your videos ten times as fast as the old system you've been using) than I did from looking at Zencoder's homepage four times over the past month or so.
Thanks for the feedback, Kevin! If you don't mind sharing, what's your impression of Zencoder based on our homepage? What would better explain what we do to you?
I am curious : how is your service better than ffmpeg + some scripts ?
I guess like Dropbox is better than running rsync and some cron jobs.
That is a smug remark that misses the point. Dropbox is a service aimed at everyone and their grandma . Zencoder is a niche technology aimed at people transcoding videos. There is a whole community of us at videohelp and similar sites and we have been doing this for quite a while. We gripe moan and bitch , but we get ffmpeg , mencoder and others to work long enough to get the job done --- for the magical price of $0.0. We have several hundred manhours worth of scripts and hacks invested already. Hence my question , what do you do better than ffmpeg -- 'cause I would be willing to pay for that extra smooth encoding, streaming . This is a technical question. You should not have replied as you do not appear to know your head from your ass.
It's the several hundred man hours worth of scripts, and learning to use them and making them work(and consistently) and paying for the hardware to run them that makes it cost more than $0.0.

So I would say what they do better is remove the hassle of having to spend time and resources managing and running all of those services. Just like dropbox, and cloudkick, etc.

Exactly. I had a pretty solid encoder running. But it was slow and wouldn't scale well. Zencoder's pricing is right and I would rather build it into my pricing model than deal with the hassle of managing an encoding system. This frees us up to focus more on the other aspects of the app.
Why are you using mencoder if you have ffmpeg?
good question. We like to have them both in our toolbox along with other mpeg tools such as gopchop.
Wow, sorry if that came across as smug. But I thought it was the simplest way to express Zencoder's value proposition.

It's a shame you chose to ruin your perfectly good comment with such distasteful words. Please let's keep the discussion civil.

I have no internal knowledge of Zencoder, but. . .

Because Zencoder is running a service, they can have lots of boxes going at the same time. You might want to encode 50 things at once which would have to be queued up if you were doing it on one box, but can run simultaneously on Zencoder using their many boxes.

Likewise, Zencoder can fire up high CPU boxes that will get your videos encoded faster. The faster they turn around videos, the more capacity they have. If you're low (or bursty) volume, you can't justify that cost and you go with a small instance that's slow and queue things up if there are multiple jobs at once.

Plus, Zencoder is probably knows ffmpeg and the like better than you do. It's their whole company. Unless the focus of your work is video encoding, the likelihood that you will have any reason to be as knowledgeable is low.

I'm not saying that Zencoder is right for everything. They have certain economies of scale since they're encoding video for many people that kick in which mean that you can have 20 boxes encoding things for you at the same time for a few hours without having to pay for them all the time or going through the hassle of creating 20 encoding boxes and then getting rid of them so that you can use that capacity for an hour or so. That said, if you have a slow, steady flow that isn't too concerned with time or you're popular enough that you've hit those economies of scale yourself, Zencoder might not be right for you.

Oh, plus you might not want to deal with ffmpeg and such. Some people would rather it be abstracted away a bit.

Have you _tried_? It's not easy. Every container has audio/video unpleasant permutations. Mike Rowe should do a show on transcoding.

We're using Zencoder daily and ran into an issue where users uploaded WMVs and the output video and audio didn't sync. It's a little known Windows Media Video Screen codec. Zencoder fixed it for us and we're paying them $100/month. Personally, I think they got the raw end. :)

Transcoding, like cryptography, is best handled by those who know what they're doing. It's dark in there.

This is a fair question, and I have two answers.

1. Even if we were just using ffmpeg + simple scripts, we think there is value to using a service instead of our customers running video encoding on their own. We offer easy integration, automatic scalability, a well-designed API, and customer support. So theoretically Amazon S3 is just a file server, but it's still worth using S3. In other words, even simple technology has some benefits when packaged as a service as opposed to managing the technology yourself.

2. Beyond that, we're much more than just ffmpeg. ffmpeg is awesome, and we use ffmpeg as maybe 25%-30% of the work in our encoding chain. But video technology is really messy. There are hundreds of edge cases and non-standard files/formats/settings. The best tools take you 95% of the way there, but the remaining 5% is exceptionally painful, and a few tools plus (simple) scripts don't get you to 99%, let alone 100%. That takes thousands of hours of work, and it really makes sense to let a service handle that, instead of thousands of companies doing that work themselves.

Does that make sense?

Kevin, thanks for the kind words. You're kinda right. A video site like YouTube has two stages to get your video up and running. First is the file upload. Second is the encoding, where the uploaded video is converted into the necessary formats for web and mobile playback. Zencoder covers the latter. They don't take part in the upload. So our upload remains the same...it's the step after upload that has been massively improved. I hope that makes sense.

Unless you are heavily involved in video, Zencoder won't apply to you. But they are still worth knowing about and a great example of a cutting edge cloud platform.

Hi Steve, That does make sense. I understand that I'm not the target audience, as well :-)
How large was your test video? 20 minutes to encode a 1 minute video feels like a really long time.

My only experience with video encoding is place-shifting DVDs to my PSP. On my home box it's usually about a 1:1 ratio for this task. I'm guessing you've got a source with a really high bit-rate that's making the encoding take so long?

(comment deleted)
Thanks for the writeup, Steve!

Takeoff is really well done. The UI is beautiful and really intuitive. Congrats on a great service!

tl;dr: zencoder.com was easy to integrate, works well, is cheaper than the competition, and was 10x faster than our home-brew transcoding junk.
Anyone have any recommended ffmpeg CLI examples for encoding to h.264 or links?
Theyre not too difficult to find. Good stuff on Doom9 and flowplayer forums. I realize that the appeal of zencoder is that you don't need to understand ffmpeg's elaborate settings, but its sorta fun to dig around and see what each one can do. Lots of technical algorithmic challenges in encoding.

For a good practical guide, I suggest reading this: http://www.amazon.com/H-264-MPEG-4-Video-Compression-Generat...

It'll give you an idea of where all the settings come from.

Hmmmm....

The Doom9 stuff seems to be more oriented toward ripping and encoding for personal use, not taking a source file and encoding several versions for streaming from a Wowza Media Server, Red5 server, or Flash Media Server...unless I am not looking in the appropriate place.

I haven't yet looked through the flowplayer forums. That seems like a good idea.

That book you linked to has a newer version, but it is over $100.

IF not CLI examples, would you have any recommended settings for encoding to stream for multiple devices and connection speeds (iDevices, Android phones, flash video)? What bitrates and resolutions from a 1280x720 60fps source file?

its really up to you in terms of what looks good in tradeoff for space and speed of encoding. zencoder had some settings that made its way to HN in a blog post not too long ago. theres also some settings on iocannon posts. just dig around, and they'll come up. i forget the exact formula that i use. i use presets where possible.
ffmpeg has presets for ipod ( which btw also work just as well for Blackberry ) and dvds. Go tweak and select a preset that works for you and go with you. My advise is to use existing ffpresets presets.

I think you will find preset in the ffmpeg source/ffpresets

Very important : once you get ffmpeg to work just the way you want, back up the source that you used to build your binary and backup all sources of libs . This is important as sometimes refreshing code from repositories breaks the features you depend on . And if you are extremely paranoid like me and your business had a critical dependency on video transcoding, create a Virtual box guest OS, build ffmpeg and tweek till it works and then save that image for emergencies. Its about a Days work in all.

I have a shell script that scans my "input folder"(an ftp dir) once it finds a file , it invokes ffmpeg process. On a quad core box, I max my cpu utilization at 8 ~10 concurrent instances of ffmpeg. Your mileage would depend on factors like bitrate etc.

Here's a decent example: ffmpeg -i "C:\input.mov" -fpre "presets\libx264-normal.ffpreset" -y -threads 0 -f mp4 -vcodec libx264 -b 1600k "C:\output.mp4"

By the way, this will give crappy audio quality due to ffmpeg's garbage aac encoder. What I did was shut off audio in ffmpeg (-an) then I used Nero AAC encoder to encode the audio. Then mp4box stitched them together.

"For example, a video of me demonstrating how to do doughnuts in an RX8 took 20 minutes to encode, and it was only a minute long!"

Whoa. I'm no video encoding expert, but I was able to find some pretty good settings using CRF of ffmpeg that encoded a video in near real-time. In fact you could even do live streaming off of it. CRF supposedly bloats the filesize, but I was able to get decent HD video at about 7-11mb/sec if I recall.