Part 3 - Python Multimedia

Python Multimedia


Then, I want to embed this .avi animation into a beamer presentation, but the file will just not play. Other avi files play, but the ones produced by the python code do not. I suspect the encoding is wrong, but I am by far not an expert in these matters. Any input is appreciated.

MWE Python:

import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure ax = plt.axes(xlim=(0, 2), ylim=(-2, 2)) line, = ax.plot(, , lw=2) def init: line.set_data(, ) return line, # animation function. This is called sequentially def animate(i): x = np.linspace(0, 2, 1000) y = np.sin(2 * np.pi * (x - 0.01 * i)) line.set_data(x, y) return line, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=200, interval=20, blit=True) anim.save('basic_animation.avi', fps=30, extra_args=['-vcodec', 'libx264'])

MWE Tex Beamer. The pdf has to be opened with Adobe Acrobat, or any reader that supports videos/animations.



Share this article





Related Posts



Latest Posts
Python Multimedia
Python Multimedia
Then, I want to embed this .avi animation…
Multimedia Speaker Systems
Multimedia Speaker…
Samson s Meteor M2 Multimedia Speaker…
MP4 Multimedia Player instructions
MP4 Multimedia…
There are many digital video formats…
Multimedia Logos
Multimedia Logos
A digital video and multimedia company…
Creative Inspire T6160 5.1 Multimedia Speakers System
Creative Inspire…
The Creative Inspire T6160 is a simple…
Search
Featured posts
  • Can t get multimedia messages?
  • What are multimedia messages?
  • Does multimedia Messaging use data
  • New multimedia message
  • Multimedia Messaging Service
  • Multimedia text messages
  • Why cant I send multimedia messages?
  • How to open multimedia messages?
  • MMS stands for multimedia message Service
Copyright © 2026 l multimedia-technology.com. All rights reserved.