8000 Defaults: change animation codec to h264 by efiring · Pull Request #7208 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
8000

Conversation

@efiring
Copy link
Member
@efiring efiring commented Oct 1, 2016

No description provided.

@efiring efiring added this to the 2.0 (style change major release) milestone Oct 1, 2016
@efiring
Copy link
Member Author
efiring commented Oct 1, 2016

This was discussed in http://matplotlib.1069221.n5.nabble.com/Matplotlib-devel-switch-default-to-h264-td47382.html. Looking back at that I see that I had forgotten the reason I didn't do it right away, which is that a check for an odd number of pixels is needed with h264 regardless of whether it is the default.

@efiring efiring changed the title Defaults: change animation codec to h264 WIP: Defaults: change animation codec to h264 Oct 1, 2016
@efiring
Copy link
Member Author
efiring commented Oct 1, 2016

What a mess! As far as I can see, mencoder doesn't handle h264 at all. It isn't among the listed labavcodecs in the current documentation, and those are the only ones available in my homebrew mencoder. @dopplershift, is there any reason to support mencoder at all? Does it have any advantages? Any platforms where it is readily available and neither ffmpeg nor avconv is?
The even number of pixels requirement for h264 can be handled in ffmpeg via either cropping or scaling.

@NelleV
Copy link
Member
NelleV commented Oct 1, 2016

And it seemed so simple :)

@dopplershift
Copy link
Contributor

I think years ago mencoder might have had a comparable install base. Personally, I'm fine with ffmpeg only since that's the only one with conda-forge packages--though I'd like to hear some more voices on this.

@tacaswell
Copy link
Member

I am 👍 on this change.

Maybe we should add a check in the save animation step to verify if the encoder / encoding combination is valid? Probably push this back down into the Writer classes with a support_encoding method (does such a thing already exist?).

I would just chop a pixel off bottom / right to patch up the even/odd issues.

@efiring efiring changed the title WIP: Defaults: change animation codec to h264 Defaults: change animation codec to h264 Oct 23, 2016
@efiring
Copy link
Member Author
efiring commented Oct 23, 2016

The docs build initially fails with this:

Warning, treated as error:

/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/matplotlib-2.0.0b4+224.gaad576f-py2.7-linux-x86_64.egg/matplotlib/animation.py:docstring of matplotlib.animation.MencoderFileWriter:5: WARNING: Explicit markup ends without a blank line; unexpected unindent.

It looks to me like it might be a problem related to this part of the deprecated decorator in cbook:

        if not old_doc:
            # This is to prevent a spurious 'unexected unindent' warning from
            # docutils when the original docstring was blank.
            new_doc += r'\ '

I'm trying to work around it by adding docstrings.

@efiring
Copy link
Member Author
efiring commented Oct 23, 2016

Trying again: I now think the problem is that the message argument to the deprecated decorator must be a single line.

@efiring efiring changed the title Defaults: change animation codec to h264 [MRG] Defaults: change animation codec to h264 Oct 23, 2016
Copy link
Contributor
@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for cleaning up some of my mess @efiring

efiring added a commit to efiring/matplotlib that referenced this pull request Nov 23, 2016
efiring added a commit that referenced this pull request Nov 23, 2016
BUG: fix animation error introduced in #7208
@QuLogic QuLogic changed the title [MRG] Defaults: change animation codec to h264 Defaults: change animation codec to h264 Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0