Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need support for libav-tools/avconv as alternative to ffmpeg #32

Open
WebDrake opened this issue Feb 5, 2013 · 7 comments
Open

need support for libav-tools/avconv as alternative to ffmpeg #32

WebDrake opened this issue Feb 5, 2013 · 7 comments

Comments

@WebDrake
Copy link

WebDrake commented Feb 5, 2013

[Issue description edited to avoid accidentally spreading false information.]

Sadly, the ffmpeg project forked into avconv, and Ubuntu and Debian switched to avconv. (Here is a reasonably unbiased version of the history behind this.)

So, for a 1.0 release ly2video should probably support avconv in addition to ffmpeg. Perhaps the best way to do this would be for ly2video to look for avconv first and, if not found, look for ffmpeg.

@aspiers
Copy link
Owner

aspiers commented Feb 5, 2013

Thanks a lot for the info; however I'm rather puzzled, since I seem to have a newer ffmpeg than you and there is no deprecation:

ffmpeg version 1.0.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 20 2013 21:32:11 with gcc 4.7 (SUSE Linux)

Any ideas?

@WebDrake
Copy link
Author

WebDrake commented Feb 5, 2013

I looked into this in more depth, and it seems like it's one of those lovely fork wars that crop up from time to time. The reason for the Ubuntu deprecation message is because the ffmpeg in Ubuntu/Debian is an old version of ffmpeg included in the libav distribution for backwards compatibility: see,
http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/939863

So, it's a Debian/Ubuntu ffmpeg package issue rather than an ffmpeg issue in general, but it may be that up-to-date ffmpeg is not being offered on other distros either.

In light of that, it looks like there may be a need to support both converters if ly2video is to be successfully packaged across distros. Which one is preferred for use might be made to depend on ffmpeg version number and/or on a config setting (e.g. if ffmpeg > 0.8.5 or if avconv is not available, then use ffmpeg; else use avconv).

@aspiers
Copy link
Owner

aspiers commented Feb 5, 2013

Sounds good. I'd be delighted to accept a pull request adding support for avconv ;-) It should be easy for you to figure out the correct avconv invocation:

  • Run ly2video with the -k option
  • cd to the resulting ly2video.tmp/notes directory
  • Experiment with avconv until you have a command-line which can build a video out of all the .png files in that directory

Once we know the right invocation, adding the appropriate logic to ly2video to use it where needed should be trivial.

@WebDrake
Copy link
Author

WebDrake commented Feb 5, 2013

I'll see what I can do. Python isn't one of my languages but I guess this should not be too hard in and of itself.

@aspiers
Copy link
Owner

aspiers commented Feb 10, 2013

I've changed the issue title and description, because it seems that ffmpeg being deprecated is wholly untrue (thanks for the useful links above which explain this), and I don't want this project to help spread that notion.

@WebDrake
Copy link
Author

Yes, the deprecation is not of FFmpeg per se, but the fact that that package is no longer being supported in Debian (and hence, its derivatives). Fortunately the two programs, ffmpeg and avconv, seem to have identical APIs. As a temporary workaround, the following seems to suffice:

  • in the line in ly2video.py which reads, ffmpeg = options.winFfmpeg + "ffmpeg", replace this with ffmpeg = options.winFfmpeg + "avconv"
  • In the function callFfmpeg, there is a line that reads, "-i", wavPath,. Immediately after this, add another entry: "-c:a:1", "libmp3lame" (I think "-acodec", "libmp3lame" may also work).

The first of these ensures that ly2video calls avconv and not ffmpeg, and the second ensures that it is using the correct audio codec. "-c", "copy" will also work, but will embed a WAV file into the video, with all the corresponding implications for size.

@Stemby
Copy link
Contributor

Stemby commented Jan 6, 2018

Debian switched to FFmpeg again in 2015, with Stretch (released in 2017).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants