YouTube and transcoding video with vixy.net
I hate all those low quality videos from YouTube. You know there is that trick to concenate &fmt=18 to YouTube-URLs to have it access the new servers with higher quality videos and better bandwidth performance, but still that does not makes me happy.
Having FLV is ok for me, although I dislike non-standard container formats. But the point is copying those FLVs for friends often ends up by them complaining not beeing able to play the files on their Windows or Mac. The same problem persists on the iPod or my mobile phone that just understands 3GP in the moment.
So i end up having to convert the files… or transcoding them.
Conversion vs. Transcoding
Converting usally means decoding the video to a full video-picture – probably with or without any post-processing– and loosing the visual information that was artifically added again by encoding. Also, most of the bitstream-information on the decoded stream is also lost, because you only see a the picture and not what abstract data is behind.
That is the place where transcoding comes into play: It transcodes the data be going deep into the input stream directly translating it the the output stream. The “visual step“ between encoding and deocoding is skipped, because not necessary. In the end we have not only faster conversion process, but have also retained all possible quality.
Ok, if input and output en/decoding algorithms differ too much or you wanna resize the video you still have to convert the videos. Point is that the algorithms used in input and output stream have to be similar to each other (beeing often MPEG4 on nowadays video material).
I discovered vixy (which is based on ffmpeg) und does a nice job on transcoding. On windows and Mac you have a GUI limited to YouTube. The Online-Converter itself seems to be always overloaded. So, time to compile our FLV 2 MPEG4 Tool ourselves (for Ubuntu/Debian):
$ apt-get build-dep ffmpeg
$ mkdir flv2mpeg4
$ cd flv2mpeg4
$ svn co https://vixynet.svn.sourceforge.net/svnroot/vixynet/trunk/flv2mpeg4/ .
$ cd src
$ gcc -O3 -o flv2mpeg4 avformat_writer.c dcprediction.c flv2mpeg4.c fetch.c flvdecoder.c m4vencode.c mp3header.c -lavformat -lavcodec -lavutil -I/usr/include/ffmpeg -L/usr/lib
$ cp flv2mpeg4 /usr/bin
A last word to YouTube. I don’t suggest uploading to it in no way!
- They manipulate view counters on videos with strong political content (e.g. 200 views and 300 comments?)
- Everything you upload, belongs to them! Read the terms!
- Quality still sucks (it’s for the american market; but we have broadband here in germany!)
- Servers are often damn slow, espacially at 23:00 CEST+1 when all americans go on the site