[Matplotlib-users] errors when mp4 files played in browser

gml at garymlewis.com gml at garymlewis.com
Fri Apr 22 09:55:13 EDT 2016

Thanks Ryan. Very cool nbviewer link you sent me. I use a Jupyter 
notebook for pretty much all my python development. Very happy with it. 
... Anyway, to answer your question. Yes, the movie at the bottom of the 
notebook works fine for me. Does that imply my issue is not the browser? 
I see you set matplotlib.rcParams['animation.html'] = 'html5'. My 
default was set to 'none'. Changing it to 'html5' did not seem to change 
anything, however. When I open the animation mp4 in Firefox, it 
immediately says the file is corrupt.

I do have one additional item to add that I discovered almost by 
accident today. I recreated the animation (using a jupyter notebook, as 
always), but this time I had the linux terminal open where I had started 
the jupyter notebook. Nothing unusual until the animation completed and 
I used Firefox to open the mp4 file. Once I did this, I got the 
following error at the terminal:
[h264 ........] decode-slice-header-error and 'no frame!'

I am a video novice, but a little search on the error indicated that a 
keyframe might be missing. Again, this points to user error rather than 
browser error.

Any thoughts?


On 2016-04-22 00:45, Ryan May wrote:
>> My question then comes to this: does anyone on the matplotlib forum
>> have experience with viewing mp4 files in a browser? If so, do you
>> have any suggestions for a work-around? I've literally spent months
>> getting a few matplotlib animations to the point where they may be
>> useful to others. It never occurred to me that I'd have problems at
>> the very last link in the chain.
>> Thanks very much for your thoughts. Sorry this is so long.
> I've put some effort into making sure the animations will render in
> the Jupyter Notebook, so I'm curious: on the platforms where you're
> seeing problems, what do they do with the movie at the bottom of this
> notebook
> http://nbviewer.jupyter.org/gist/dopplershift/356f2e14832e9b676207 [1]
> ?
> Ryan
> --
> Ryan May
> Links:
> ------
> [1] http://nbviewer.jupyter.org/gist/dopplershift/356f2e14832e9b676207

More information about the Matplotlib-users mailing list