{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6416","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6416/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6416/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6416/events","html_url":"https://github.com/matplotlib/matplotlib/issues/6416","id":154688022,"number":6416,"title":" animation with 'ffmpeg' backend and 'savefig.bbox = tight' garbles video","user":{"login":"chipmuenk","id":4620020,"avatar_url":"https://avatars.githubusercontent.com/u/4620020?v=3","gravatar_id":"","url":"https://api.github.com/users/chipmuenk","html_url":"https://github.com/chipmuenk","followers_url":"https://api.github.com/users/chipmuenk/followers","following_url":"https://api.github.com/users/chipmuenk/following{/other_user}","gists_url":"https://api.github.com/users/chipmuenk/gists{/gist_id}","starred_url":"https://api.github.com/users/chipmuenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chipmuenk/subscriptions","organizations_url":"https://api.github.com/users/chipmuenk/orgs","repos_url":"https://api.github.com/users/chipmuenk/repos","events_url":"https://api.github.com/users/chipmuenk/events{/privacy}","received_events_url":"https://api.github.com/users/chipmuenk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/needs_review","name":"needs_review","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"dopplershift","id":221526,"avatar_url":"https://avatars.githubusercontent.com/u/221526?v=3","gravatar_id":"","url":"https://api.github.com/users/dopplershift","html_url":"https://github.com/dopplershift","followers_url":"https://api.github.com/users/dopplershift/followers","following_url":"https://api.github.com/users/dopplershift/following{/other_user}","gists_url":"https://api.github.com/users/dopplershift/gists{/gist_id}","starred_url":"https://api.github.com/users/dopplershift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dopplershift/subscriptions","organizations_url":"https://api.github.com/users/dopplershift/orgs","repos_url":"https://api.github.com/users/dopplershift/repos","events_url":"https://api.github.com/users/dopplershift/events{/privacy}","received_events_url":"https://api.github.com/users/dopplershift/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/22","html_url":"https://github.com/matplotlib/matplotlib/milestones/1.5.2%20(Critical%20bug%20fix%20release)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/22/labels","id":1495785,"number":22,"title":"1.5.2 (Critical bug fix release)","description":"Speculative milestone is case we need to do a 1.5.2 release. ","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":131,"state":"open","created_at":"2016-01-10T22:41:29Z","updated_at":"2016-05-16T16:32:30Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-05-13T11:09:09Z","updated_at":"2016-05-16T17:15:37Z","closed_at":null,"body":"Using\r\n\r\n- Matplotlib 1.5.0rc3 with Python 2.7.10 and Win 7 64 Bit (WinPython 2.7.10.3) or\r\n- Matplotlib 1.5.1 with Python 3.4.4 and Win 7 64 Bit (WinPython 3.4.4.1)\r\n- ffmpeg  20160512-git-cd244fa \r\n\r\n#2483 seems to be back (or still there): \r\n\r\nSetting `savefig.bbox = tight` either in matplotlibrc or as an rcParam garbles an mp4 video written by ffmpeg. Even starting the script with --verbose-debug gives no warning or message that something might be wrong.\r\n\r\nI also cannot change the frame rate - neither `interval` nor `fps` has any effect, I always get 5 fps (this is consistent with the options passed to ffmpeg which always says '-r 5').\r\n\r\nExample (slightly modded) taken from\r\nhttps://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/ :\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.animation as animation\r\n\r\nplt.rcParams['animation.ffmpeg_path'] = 'D:/Programme/ffmpeg/bin/ffmpeg.exe'\r\nplt.rcParams['savefig.bbox'] = 'tight'     # tight garbles the video!!!\r\n\r\nmovie_file = 'D:/Daten/basic_animation.mp4'\r\nmywriter = animation.FFMpegWriter()\r\n\r\nfig = plt.figure()\r\nfig.set_size_inches(4, 5, True)\r\nax = plt.axes(xlim=(0, 2), ylim=(-2, 2))\r\nline, = ax.plot([], [], lw=2)\r\n\r\ndef init():\r\n    line.set_data([], [])\r\n    return line,\r\n\r\ndef animate(i):\r\n    x = np.linspace(0, 2, 1000)\r\n    y = np.sin(2 * np.pi * (x - 0.01 * i))\r\n    line.set_data(x, y)\r\n    return line,\r\n\r\nanim = animation.FuncAnimation(fig, animate, init_func=init,\r\n                               interval = 1000, frames = 20, blit=True)\r\n\r\nanim.save(movie_file, dpi=100, fps = 30, writer=mywriter, \r\n          extra_args=['-vcodec', 'libx264'])\r\n\r\nplt.show()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/219485239","html_url":"https://github.com/matplotlib/matplotlib/issues/6416#issuecomment-219485239","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6416","id":219485239,"user":{"login":"dopplershift","id":221526,"avatar_url":"https://avatars.githubusercontent.com/u/221526?v=3","gravatar_id":"","url":"https://api.github.com/users/dopplershift","html_url":"https://github.com/dopplershift","followers_url":"https://api.github.com/users/dopplershift/followers","following_url":"https://api.github.com/users/dopplershift/following{/other_user}","gists_url":"https://api.github.com/users/dopplershift/gists{/gist_id}","starred_url":"https://api.github.com/users/dopplershift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dopplershift/subscriptions","organizations_url":"https://api.github.com/users/dopplershift/orgs","repos_url":"https://api.github.com/users/dopplershift/repos","events_url":"https://api.github.com/users/dopplershift/events{/privacy}","received_events_url":"https://api.github.com/users/dopplershift/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T17:15:37Z","updated_at":"2016-05-16T17:15:37Z","body":"`raise` works for me too. One point: raising the error could break code that \"works\". I think this is fine (since existing code can't be working as intended)...but how do we feel about that for matplotlib?"}}