Selecting a Video Encoder for Windows - video-encoding

My software encodes videos using the standard Windows AVIFile functionality. That means, it can use all the DirectShow Codecs that are installed.
I recommend my users to download the XVid Codec themselves, but that's inconvenient.
I cannot bundle XVid since my software is not GPL. Is there any good direct-show-compatible video codec that can be redistributed with a commercial application? Requirement: The videos must look great on YouTube.
If not, I could switch from AViFile to another library (e.g. FFMpeg). But I'd like to avoid that if possible.
Thanks! :-)
Edit: The videos are computer animation with very sharp details (explosions and sparks). The video should be high-bitrate.

Theora is an excellent open source codec with very good DirectShow support. You also might consider google's newer WebM codecs. You dont say what kind of video you are distributing (from a camcorder, animation/computer rendered graphics, etc), so some of the choice of codec may depend on the exact nature of your video.

Related

DirectShow video compressors enumeration issue

I am trying to find available DirectShow video encoders, using following code:
ICreateDevEnumPtr pEnm(CLSID_SystemDeviceEnum,NULL,CLSCTX_INPROC_SERVER);
// Video Compressor
if(pEnm!= NULL)
{
IEnumMonikerPtr pEnumMoniker;
hr = pEnm->CreateClassEnumerator(CLSID_VideoCompressorCategory,&pEnumMoniker,0);
//......
}
However, some video compressors installed in the system (Windows 10 x64) have different category.
For example "Microsoft MPEG-2 Encoder" and "VisioForge H264 Encoder" have category {083863F1-70DE-11d0-BD40-00A0C911CE86} - CLSID_LegacyAmFilterCategory
If I use CLSID_LegacyAmFilterCategory instead of CLSID_VideoCompressorCategory in my code, I get a lot of irrelevant objects.
Can you suggest the proper way to enumerate the DirectShow video compressors installed in the system ?
There is no better way and most likely you don't need any other way. You need this enumeration to eventually check availability of specific codec of interest and instantiate it. It is hard to imagine that you are building an application capable to pick some arbitrary installed codec and be able to use it, you normally deal with compression codecs you are well familiar with, esp. H.264 video compression codecs which have certain specific configuration methods etc. For the codecs you are familiar with you would want to have codec specific instantiation and configuration ways, one might need a discovery through enumeration, another would be available for instantiation via CLSID directly.

Will there be any trace if I encode video with my laptop?

As the title says
I want to know if there are anything that will help someone to trace the laptop or machine used for encoding the video?
Also is there any trace in image file too? Like I watermark with ffmpeg and my machine code is added into metadata of that image?
With ffmpeg, no. Add -bitexact to be sure.
Depending on the applicatzion you are using, container and codec you are encoding to, this is possible.
For ffmpeg i am not aware that it puts any machine related stuff into any format or codec.
Even when you are using external encoders instead of built-in ones like AMD or NVIDIA stuff, currently the codecs do not allow to put such data into the stream.
Sure, future audio/video codecs might allow such metadata in order to find out if the encoder is licensed correctly, but as by now i am not aware of such stuff.
What cameras do for example to overcome the lack of codecs and formats support for storage of this information is to just write some xml along to the media file where they store serial number and such.
If there was such information contained, analyzer tools like "mediainfo" would show this info. I am not yet affiliated with mediainfo Sarl.

Available encoder to IIS smooth streaming

I am trying to make a web site with IIS smooth streaming but all the tutorials and examples that I found use Microsoft Expression Encoder 4 pro. According to them only the pro version is capable of using H.264 compression. But the problem is Microsoft Expression Encoder 4 pro is discontinued and the available free version dose not support H.264 compression. So I want to know whether there any other encoders(commercial or freeware) that I can use with IIS 7. Please help me
I have used Sorenson Squeeze with relative success for on-demand video encoding. It does not do live video but can successfully encode plan video files into many different formats. This is the "cheap" encoder I recommend for everyday light use. It does most of what Expression Encoder used to do.
For professional-quality encoding needs, you will want to look towards products from Harmonic, Envivio and similar vendors. Together with high quality and broad feature set you will, of course, also be faced with a significant pricetag.
There are also Wowza and Unified Streaming Platform which offer such services for relatively low cost, though my personal opinion of them is not very high - they seem more marketing than functionality oriented businesses.

Library for samplerate conversion of audio data?

What is a good Delphi library for samplerate conversion of audio data? I don't mind paying for something.
I need to upsample and download sample audio in realtime. I understand the theory but don't want to write my own routines.
EDIT: Bonus points for something with Mac support.
You can check the unit "DAV_DspUpDownsampling.pas" in the Delphi Asio Vst Project. Although I've never used it I'm sure it would fill your needs.
Use SoX - the Swiss Army knife of sound processing. Very easy to use.
It is a command line tool not a Delphi library so to use from Delphi you need to execute a shell command and get the result with in your code. I have used it with PHP.
SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.
SoX is very mature project! Here is the link:
http://sox.sourceforge.net/
Dew Research's DSP Master could be an option for you.
Maybe Mitov software has components you can use
I use newAc in quite a few projects. It can do sample rate conversion.
The best news: It is free (also for commercial use)
Yes, you can use AudioLab from Mitov Software for that. It appears that nobody actually posted the link ;-), so here it is - http://www.mitov.com/products/audiolab.
Enjoy!
I use Bass Audio Library.
You can use Bass_Encode and a Bass_Mixer to samplerate conversion.
http://www.un4seen.com/bass.html
The Mitov components do this easily. I've made a short screen recording that shows the steps.
http://tinyurl.com/mitovaudio
The Mitov video and other components are equally powerful. We've used the Mitov libraries on major real-time video and audio processing projects with excellent results. Their support is excellent.
AFAIK, the components are free to evaluate and for non-commercial projects.
PS I believe he's a FireMonkey guy, so I'd guess that we can expect Mac support now or in the future.
You may want to take a look at Secret Rabbit Code (aka libsamplerate); it's a C library, but it should be quite easy to create a wrapper. The API is simple, and supports a wide range of operating systems and platforms (even embedded!).
It has a mature and very good quality code base, and it's extremely efficient. Support is also awesome, Erik is very responsive. Plus it has a huge user base.
Another option is libsoxr (which seems to produce better output, but is not so popular...).

Video encoding libraries for iOS

I really stucked with that problem, because I haven't seen enough information in the internet regarding video encoding in iOS, however we can observe plenty of apps that deal with the problem of video streaming successfully (skype, qik, justin.tv, etc.)
I'm going to develop an application, that should send video frames obtained from camera and encoded in h.263 (h.264 or MPEG-4 it is under decision) to a web-server. For this, I need some video encoding library. Obviously, ffmpeg can deal with that task, but it is under LGPL license, which could probably lead to some problems in submitting the app in the AppStore. On the other hand, there are some applications, which are seemed to use ffmpeg library, but only Timelapser clearly states this fact in app description. Does this mean, that other apps are not using ffmpeg or just hiding this information?
Please, share your thoughts and experience in this topic. I'm open for dicsussion.
After googling and making some research in this area, I found this one library http://www.foxitsolutions.com/iphone_h264_sdk.html. They really use hardware encoding. I've examined demo example with instruments, and they showed me that while encoding, ~12% cpu is used and syscall read() constantly called. From that I can conclude, that their library uses standard AVFoundation's AVAssetWriter to write into the temporary file, and (most probably) concurrent thread is used to read this temp file for retrieving encoded frames.
Also, take a look at http://www.videolan.org/developers/x264.html. It is under GPL, but still can be useful.

Resources