Proprietary codecs on Linux. What is legal? - ffmpeg

So, assuming we got a distribution without proprietary codecs installed.
Let's take Linux Mint for example. I want to store and playback wav and ogg format sounds, either by using my own software, or by using another developer's software. So far so good right?
Imagine now that we have the following scenario. For some reason, I wanna playback a file that is either an mp4 or mp3 or mpeg or any other format, made by proprietary codecs. Instantly, I will need a codec for these formats.
I read somewhere that Fluendo sells solutions for "legal codec usage" for linux distros.
URL of fluendo: http://www.fluendo.com/en/
So here comes the questions:
Using VLC and ffmpeg is enough for me to convert a file to an ogg or ogv so I can playback a song or a video using an open format. You can also playback playback files made by proprietary formats. But are VLC and ffmpeg legal to use, to playback such files made by proprietary codecs? For example, ss VLC codecs okay to be used without paying anyone for mp4 playback? Is it okay to convert a file from mp4 to ogv?
If not, are there any legal and open source and free (as in freedom) codecs around that can solve the issue, or does someone have to pay a product, to be ethically correct, to the developers of the proprietaty codecs?
Note that I do not ask for Windows, since codec licenses are included to the price of the operating system. I ask exclusively for a free linux distribution.

Since #LordNeckbeard pointed me to the FAQ of FFmpeg, that I really can't believe I missed, it became clear to me that there is a problem in using proprietary codecs, thus there are some file formats that could be avoided to keep ourselves safe. Otherwise if someone can afford a license to use them too, that would be perfectly fine.
So mp3, mp4, mpeg and some more patented formats are to be avoided, if not licensed.
ffmpeg can be built so it can exclude support for such formats and if you need to use sound or video to your software ogg and ogv are nice and efficient formats as we all know.
Digging a little deeper Ι found that too.
https://www.fsf.org/resources/playogg_radiostation.pdf

Related

Is it possible to retrieve the "profile" of one file, and use it to convert another file?

So we have an ancient compiled program that has been converting AVI files to MPEG for television broadcast. The program is pure sorcery, as the original programmer is long gone, but it has created 10's of thousands of MPEG files of a very particular format that our (also ancient) broadcast server uses.
So...the question is whether or not, we can use FFMPEG to initially "get the details" of one of those MPEG files, and use THAT to convert future MP4 files to that legacy MPEG format?
In short, we don't know all the intricacies of everything that the program is or may be doing, and want to replace it with FFMPEG, being confident that we're getting exactly the same output that works without a hitch in the fussy broadcast server.
FFmpeg cannot automatically retrieve and store all information from an existing file which is salient to reproducing those features in a new instance.
ffprobe or ffmpeg will show you basic stream and metadata information but that information has to be parsed outside of ffmpeg and then a conversion command manually crafted to reproduce those properties. However, this is only a start. There may be many aspects, like those related to flags, headers and packetization that ffprobe won't show, and which a fussy consumer expects in a certain way.
FFmpeg should be able to produce a standard vanilla file. You mention 'MPEG' but that could refer to MPEG-1/2 Program Stream (ISO 11172) or Transport Stream (ISO 13818). The latter is still widely produced & used and you should be able to find multiple software, FLOSS or otherwise, that produce it.
You can use ffprobe to get information about any AV media file and retain this information for later use:
https://www.ffmpeg.org/ffprobe.html
https://trac.ffmpeg.org/wiki/FFprobeTips
If you have ffmpeg installed on your system than ffprobe should already be installed ...

OpenCV videos across platform

I am writing a video using OpenCV on Linux machine. I want to read the same video using OpenCV on a Windows machine. I am not able to do this using the standard codecs provided in openCV.
Can anybody suggest how I can read/write videos across the two platforms?
The OpenCV Wiki directly addresses this issue. See http://opencv.willowgarage.com/wiki/VideoCodecs and specifically the heading "Compatibility list."
Unfortunately the only codecs supported on all three platforms (Linux, Windows & OSX) are 'DIB' 'I420' and 'IYUV' which are all uncompressed video codecs and thus make for really huge file sizes.
The wiki also lists some codecs to try that may work on any two platforms but not on all three.
If you decide to use uncompressed video files, you can convert them to something with a smaller filesize once they are on your windows machine using a program like VirtualDub.
Edit: FYI, On Windows I have OpenCV output in Motion-JPEG and then I use VirtualDub in directstream copy mode to resave the file which corrects a bug with the movie's index. These M-JPEG video files then play by default on Mac and Windows.
If I am trying to read video into OpenCV, I often will first convert my video to Cinepak, (using virtual dub, quicktime etc.) and then feed it into OpenCV. I use Cinepak because for some reason Cinepak encoders seem more prevalentthan MJPEG encoders.
I don't think the problem is with OpenCV, I think it is with codecs, as you mentioned. I also don't think OpenCV comes with codecs... double check that you have the proper codecs installed under Windows.
Did you look at the documentation on video codecs?

DivX Decoder libraries?

I saw, in an application from a major software vendor a dll called "DivXDecoder.dll" - which intrigued me as (a) it implies the existence of an easy to use divx library, and (b) I'd rather like to play divx compressed movies in a product I work on.
The DivX project itself seems to concentrate on making Codecs and tools for end users. Are there any C/C++ friendly projects that make playback of divx content in Win32 or Cocoa apps possible?
Look at mplayer sources - it uses the ffmpeg library that handles decoding from a number of formats.
DivX is a compressor that conforms to MPEG-4 Part 2. XviD and some versions of Windows Media are also implementations of the standard. So anything that can decompress MPEG-4 Part 2 should be able to handle things compressed with DivX.
As for actual decompression libraries, I'd recommend libavcodec. It's widely-used (= good support), cross-platform, and open-source (LGPL, so can be used in commercial apps). It's also fairly easy to use from it's C binding. It can open and play many different codecs (and with libavformat, handle many different wrappers i.e. avi, mkv, etc.).
If it's Windows-only, using the OS-provided Video For Windows might be a better option if you just want to play MPEG since you wouldn't need to ship it with your app and you avoid potential license issues. Be warned, though, that this requires the user to have certain codecs installed. On Win7 (and Vista I think) the MPEG codecs required to play DivX/XviD are installed by default, however they're not on XP...
Don't waste your time trying to implement DivX playback in a Cocoa application. Use QTKit. If someone wants to playback DivX content in your app they will install a DivX QuickTime plug-in.

Which video and audio format/codec should I use?

Environment: Windows XP/Vista, VS2008, C#/.NET 2.0, VideoGrabber.
Hi All,
I'm writing an app which captures cameras input and encodes them into a movie file (including sound).
My client suggests I encode the movie using the DivX codec. But it's not installed by default and it's not redistributable: Users would have to download, install and configure it themselves.
Is there a Codec available in default Windows (XP+) installations that I could use to encode video and sound? It must support compression. Ideally, I should be able to programmatically set basic configuration.
Note: I read this question but it doesn't actually address my needs.
TIA,
Is there a Codec available in default Windows (XP+) installations that I could use to encode video and sound?
About the best you can hope for is WMV2 (WMV v8). You may be able to encode it using qasf.dll.
The codecs you get for AVI in XP are all woeful efforts from the early days of ‘Multimedia PCs’: things like Cinepak and RLE, which are of zero use for modern full colour/resolution video, and Intel 4:2:0, which is only chroma subsampling, not really actual video compression.
If you need better than that you'll have to start embedding your own codecs, eg. from ffmpeg.
But it's not installed by default and it's not redistributable: Users would have to download, install and configure it themselves.
That's best anyway. Silently installing codecs onto a system is rather antisocial as there are often clashes between them and you could end up messing up other DirectShow applications. For example there are (at least) three different common DirectShow codecs that can handle “DivX” (which is really nothing more than MPEG-4 Advanced Simple Profile video plus MP3 audio in an AVI container): DivX, Xvid and ffdshow. Having more than one installed can be a recipe for bugs.
Not sure how useful this is to you, but I was trying to answer that very question just recently. This article suggests DIB, I420, or IYUV are supported on all platforms... at least in OpenCV. I had the least trouble with I420.

Converting WAV files to MP3 using VB6?

I need help converting WAV files to MP3 format in VB6. I did already find source code in C#, but I can't use that
Here is a code example from the greatest programmer on Earth (Google):
VB6 Lame MP3 Encoder
Don't let the word "lame" fool you - it stands for "LAme Mp3 Encoder", I think.
AFAIK, MP3 compression is under a patent, you can do that legally only by buying a license.
Or, like many other softwares, use the Lame DLL without distributing it but asking to download it in a site not under the same laws...
Somehow, that's how Opera does with GPL software: they don't provide spelling correction out of the box but they instruct to download and install aspell...
Note you can use free alternatives, like Ogg Vobis, it depends on your purpose.

Resources