
Recherche avancée
Autres articles (34)
-
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (3536)
-
Anomalie #4513 (Fermé) : Undefined au post d’un message de forum public
6 juillet 2021, par cedric - -
using ffmpeg to convert a mkv or mp4 suitable for a DVD player that supports MPEG-4 / DivX [closed]
17 juillet 2022, par Neil TelfordI got a DVD Player with USB support. It is a recent player (DVD-225), but the documentation is sparse, but it does claim MPEG-4 and DivX support.


Now, I have got certain AVI files to play via USB, but everything else fails. I looked at the metadata of an AVI file that worked via ffprobe, and got the following :


Metadata:
 encoder : Lavf58.17.101 Duration: 00:58:30.94, start: 0.000000, bitrate: 1336 kb/s
 Stream #0:0: Video: mpeg4 (Simple Profile) (xvid / 0x64697678), yuv420p, 640x290 [SAR 1:1 DAR 64:29], 1196 kb/s, 23.98 fps, 23.98 tbr,
23.98 tbn, 23.98 tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s



Now, I figured that if I can replicate the above, I can convert most things to play via USB, even if it isn't the most up to date codecs.


I've tried various combinations, but they all fail. The closest I got was by using the following shell script :


for i in *.avi; do ffmpeg -i "$i" -c:v mpeg4 -vtag divx -qscale:v 3 -c:a libmp3lame -qscale:a 4 "_${i%.*}.avi"; done



This has a strange result that it will play the audio track, but not the video track. The metadata I got from this was :


Metadata:
 encoder : Lavf58.45.100
 Duration: 00:58:07.99, start: 0.000000, bitrate: 3026 kb/s
 Stream #0:0: Video: mpeg4 (Simple Profile) (divx / 0x78766964), yuv420p, 1280x720 [SAR 3:4 DAR 4:3], 2901 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
 Metadata:
 title : ******************
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 109 kb/s
 Metadata:
 title : ******************



Does anyone know where I am going wrong with this ? I've converted AVI, MKV and MP4 files, and while they work on my computer, the DVD player seems to be very picky.


Any suggestions ?


Thanks
Neil


-
matplotlib.animate saves only one still frame
22 août 2015, par dim_volyEDIT
Changed the presented code so that another person can take it away and reproduce the error. The data for the below code can be found here, including the code and the animation produced.
import os
import numpy as np
import matplotlib as mpl
mpl.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as animation
if __name__ == '__main__':
print "Plotting Clevis LVDT Displacements"
os.chdir(r"F:\BrokenAnimation")
animation_data = np.loadtxt("animation_data.csv", delimiter=",")
time = animation_data[:,0]
L10 = animation_data[:,1]
L11 = animation_data[:,2]
L12 = animation_data[:,3]
def data_gen():
t = data_gen.t
cnt = 0
L10_iter = data_gen.L10_iter
L11_iter = data_gen.L11_iter
L12_iter = data_gen.L12_iter
while cnt < 35000:
cnt+=1
t += 10.0
yield [-10.25, L10_iter.next()], [10.1875, L11_iter.next()],
[L12_iter.next(), -9.0]
data_gen.t = 0
data_gen.L10_iter = iter(np.array(L10))
data_gen.L11_iter = iter(np.array(L11))
data_gen.L12_iter = iter(np.array(L12))
fig, ax = plt.subplots()
scat = ax.scatter([0.0, 0.0, 0.0], [0.0, 0.0, 0.0])
ax.set_xlim(-15, 15)
ax.set_ylim(-10.0, 0.5)
ax.set_ylim(-0.5, 0.5)
ax.grid()
def run(data):
# update the data
x, y, z = data
scat.set_offsets([x, y, z])
return scat,
ani = animation.FuncAnimation(fig, run, data_gen,
blit=True, interval=40, # 40msec? implying 25fps?
)
# This works
plt.show()
# Doesn't really save what I see in plt.show()
ani.save('South_Clevis.mp4') # 435kb file 4 sec long, 25 fps 800x600 887KbpsI’m trying to plot a time history of the displacements of the dots below :
The dots at y = 0.0 are the original positions and the animation moves the dots up and down. For context, the dots represent LVDT displacements over a time history of 35,000 sec with a sample rate of 1 per second. So each "second" the plot should be updated.
Bitrate does not appear to be a keyword that actually does anything. I have ffmpeg installed and it is on the Windows path. Using the basic writer example (but without the line
matplotlib.use("Agg")
, because python complained) works fine and produces an animation that can be played back.