Talk:FFmpeg integration

From Audacity Wiki
Jump to: navigation, search

Gale: 31 Aug 08 07:06 UTC: I think we want to copy across the GSoC user docs written by the students to the Manual for re-use/editing there, but am not sure about LRN's point about archiving. Isn't there a case for keeping the user docs archived in the project progress pages as a summary of what was achieved during the course of the project (and as a record of the documentation the student produced)?

James: For all the students the scope of the feature is very clear. Therefore I think moving the text to the manual (with a note that it's preliminary and refers to betas only) and leaving a link here is the right way to go.

Gale: OK, if you are sure. For someone outside GSoC, the "user docs" do I think make it much easier to see what was produced. But in the link in the GSoC page to the Manual page, I think we will have to make clear that the features might be modified subsequently, so that if someone clicked the link one year hence to visit the manual, the features there described might not be exactly what the student produced.


Q&A discussion moved from page

Questions and Answers

  • James: The Windows build of FFmpeg is (and can only be) built using MinGW/Gcc. Audacity is built using MSVC. Is there an issue with loading a MinGW/Gcc DLL from a MSVC program? Do we know of other programs that already do that?
    • LRN: As far as i know - no issues, though i can't name a program that does such loading. For me it always been self-evident that ld produces normal C dlls capable of exporting functions in conventional way. wxDynamicLibrary (wxEquivalent to LoadLibrary()/GetProcAddress()), should load anything. Issues may arise with C++ function decorations, but they are not used in FFmpeg at all.
  • James: My understanding is that, as with Mpeg, because of possible patent issues we won't be distributing the FFmpeg dlls. Which sites would be appropriate to direct people to for downloading (a) Windows (b) Linux dynamic link libraries? Does the legal status depend only on the physical location of the server, and where are these servers located?
    • LRN: FFmpeg with AMR support is illegal anywhere, we can't officially distribute such builds. Builds without AMR - depends on country (such FFmpeg builds are legal in software-patents-free countries). Linux binaries could be obtained from repositories (Medibuntu comes in mind). Windows binaries built with dlls are rare (usually they contain only ffmpeg.exe), so far the only site i know of that hosts dll version of FFmpeg is Ramiro's site. Yes, i think legal status depends on location only (it may be illegal for people from US to download FFmpeg from anywhere, but hosting FFmpeg builds somewhere in Europe should be legal). If you want guarantees, contact your lawyer. No, i don't know anything about the location of any servers i mentioned. My own server is located in Moscow, Russia.
  • Gale: How does the distinction between the GPL and LGPL licenses of the individual codecs in FFmpeg fit in with the Audacity licence? For example is your user-friendly single static dll distributed with the alpha Windows builds LGPL, not only the GPL'ed formats?
    • LRN: Yes. Nothing prohibits you from distributing LGPL'ed and GPL'ed binaries (and code) together - they all become GPL'ed. So, when i say "LGPL libavformat", I mean "libavformat with only LGPL'ed codecs/formats", but "GPL libavformat" means "libavformat with both GPL'ed and LGPL'ed codecs/formats".
  • How do I enable / use FFmpeg support on Windows?
    • Gale: Step 1: Uncomment the "USE_FFMPEG" line in win/configwin.h and delete the "#undef USE_FFMPEG" line in the same file, or change it to "#define USE_FFMPEG". Step 2: Rebuild Audacity. Step 3: Extract avformat.dll from avformat-06.10.2008.zip and place it with the other widgets dll's for your build of Audacity. Step 4: Import a Windows Media Video (WMV) file and listen to its audio.
  • What is the situation on Mac?
    • Leland: Works quite well on the Mac. I haven't hit any multi-stream files, but plain old WMV and the like import just fine. It did require that I built my own versions of the libraries. The reason is that the libavformat and brethren MUST be built as a "bundle" due to the way wxWidgets works on the Mac. The wxDynamicLibrary class will not load normal dynamic libraries (.dylib). I do not know if there are prebuilt OS X binaries that satisfy this requirement, so we may need to provide them ourselves...if the legal department say that's okay.
  • How do I enable / use FFmpeg support on Linux (and other platforms) using the configure script?
    • Richard: Step 1: Install a recent (post-January 2008) copy of FFmpeg on your system, including the development packages if your distribution uses them). Step 2: configure a recent CVS check-out of audacity using the --enable-ffmpeg option (or omit it altogether for auto-detection). Step 3: Import a file of a type that only ffmpeg supports, and ignore the broken progress indicator.