
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (42)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (2639)
-
Introducing the Matomo Connector for Looker Studio (Formerly Google Data Studio)
26 janvier 2024, par Erin — Community -
Python-FFMPEG Corruption Problems
11 juillet 2023, par Gabriel Ruben GuzmanI'm repurposing some python code to generate gifs/mp4s showcasing nba player movements dot form. (With the 'frames' used in the gifs being generated by matplotlib).


The repo comes with two different functions for generating the gifs, watch_play and animate_play. Both of which use python command line functionalities to run ffmpeg and generate the mp4s.
I've been able to use the watch_play succesfully, bot every time I try using animate_play, which according to the documention is meant to be significantly faster than watch play, I run into the error showcased here.(I printed the cmd string being passed into the pipe, in the hopes it would make debugging easier)


I've tried generating gifs/mp4s of various size and added a decent bit of code to lessen the volume of data being processed. (I'm essentially repurposing the code just to generate clips, so I've been able to remove a lot of the pbp/tracking data logs to speed up the run time) But no matter what I've done, gotten some variation of the screenshotted error.


pipe: : corrupt input packet in stream 0
[rawvideo @ 0x55ccc0e2bb80] Invalid buffer size, packet size 691200 < expected frame_size 921600
Error while decoding stream #0:0 : Invalid argument


The code for animate_play


def animate_play(self, game_time=None, length=None, highlight_player=None,
 commentary=True, show_spacing=None):
 """
 Method for animating plays in game.
 Outputs video file of play in {cwd}/temp.
 Individual frames are streamed directly to ffmpeg without writing them
 to the disk, which is a great speed improvement over watch_play

 Args:
 game_time (int): time in game to start video
 (seconds into the game).
 Currently game_time can also be an tuple of length two
 with (starting_frame, ending_frame)if you want to
 watch a play using frames instead of game time.
 length (int): length of play to watch (seconds)
 highlight_player (str): If not None, video will highlight
 the circle of the inputed player for easy tracking.
 commentary (bool): Whether to include play-by-play commentary in
 the animation
 show_spacing (str) in ['home', 'away']: show convex hull
 spacing of home or away team.
 If None, does not show spacing.

 Returns: an instance of self, and outputs video file of play
 """
 if type(game_time) == tuple:
 starting_frame = game_time[0]
 ending_frame = game_time[1]
 else:
 game_time= self.start +(self.quarter*720)
 end_time= self.end +(self.quarter*720)
 length = end_time-game_time
 # Get starting and ending frame from requested 
 # game_time and length
 print('hit')
 print(len(self.moments))
 print(game_time)
 print(end_time)
 print(length)
 print(game_time+length)
 
 print(self.moments.game_time.min())
 print(self.moments.game_time.max())

 sys.exit()
 starting_frame = self.moments[self.moments.game_time.round() ==
 game_time].index.values[0]
 ending_frame = self.moments[self.moments.game_time.round() ==
 game_time + length].index.values[0]

 # Make video of each frame
 filename = "./temp/{game_time}.mp4".format(game_time=game_time)
 if commentary:
 size = (960, 960)
 else:
 size = (480, 480)
 cmdstring = ('ffmpeg',
 '-y', '-r', '20', # fps
 '-s', '%dx%d' % size, # size of image string
 '-pix_fmt', 'argb', # Stream argb data from matplotlib
 '-f', 'rawvideo','-i', '-',
 '-vcodec', 'libx264', filename)
 #print(pipe)
 #print(cmdstring)
 
 

 # Stream plots to pipe
 pipe = Popen(cmdstring, stdin=PIPE)
 print(cmdstring)
 for frame in range(starting_frame, ending_frame):
 print(frame)
 self.plot_frame(frame, highlight_player=highlight_player,
 commentary=commentary, show_spacing=show_spacing,
 pipe=pipe)
 print(cmdstring)
 pipe.stdin.close()
 pipe.wait()
 return self



The code for watch play


def watch_play(self, game_time=None, length=None, highlight_player=None,
 commentary=True, show_spacing=None):

 """
 DEPRECIATED. See animate_play() for similar (fastere) method

 Method for viewing plays in game.
 Outputs video file of play in {cwd}/temp

 Args:
 game_time (int): time in game to start video
 (seconds into the game).
 Currently game_time can also be an tuple of length
 two with (starting_frame, ending_frame) if you want
 to watch a play using frames instead of game time.
 length (int): length of play to watch (seconds)
 highlight_player (str): If not None, video will highlight
 the circle of the inputed player for easy tracking.
 commentary (bool): Whether to include play-by-play
 commentary underneath video
 show_spacing (str in ['home', 'away']): show convex hull
 of home or away team.
 if None, does not display any convex hull

 Returns: an instance of self, and outputs video file of play
 """
 print('hit this point ')
 warnings.warn(("watch_play is extremely slow. "
 "Use animate_play for similar functionality, "
 "but greater efficiency"))

 if type(game_time) == tuple:
 starting_frame = game_time[0]
 ending_frame = game_time[1]
 else:
 # Get starting and ending frame from requested game_time and length
 game_time= self.start +(self.quarter*720)
 end_time= self.end +(self.quarter*720)
 length = end_time-game_time


 starting_frame = self.moments[self.moments.game_time.round() ==
 game_time].index.values[0]
 ending_frame = self.moments[self.moments.game_time.round() ==
 game_time + length].index.values[0]
 #print(self.moments.head(2))
 #print(starting_frame)
 #print(ending_frame)
 print(len(self.moments))
 # Make video of each frame
 title = str(starting_frame)+'-'+str(ending_frame)
 for frame in range(starting_frame, ending_frame):
 print(frame)
 self.plot_frame(frame, highlight_player=highlight_player,
 commentary=commentary, show_spacing=show_spacing)
 command = ('ffmpeg -framerate 20 -start_number {starting_frame} '
 '-i %d.png -c:v libx264 -r 30 -pix_fmt yuv420p -vf '
 '"scale=trunc(iw/2)*2:trunc(ih/2)*2" {title}'
 '.mp4').format(starting_frame=starting_frame,title=title)
 os.chdir('temp')
 os.system(command)
 os.chdir('..')

 # Delete images
 for file in os.listdir('./temp'):
 if os.path.splitext(file)[1] == '.png':
 os.remove('./temp/{file}'.format(file=file))

 return self'



-
Anomalie #2381 : Corriger le niveau d’intertitre
9 juin 2018, par b bIl y a des H2 dans la dist, qui introduisent des listes d’articles, de résultats, ou des blocs (forum), je pense qu’ils peuvent rester comme ça.
Si le bloc de forum sous le texte de l’article reste en h2, il va se retrouver "au même niveau" qu’un intertitre en h2 donc, c’est pas top non ?