Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (104)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6920)

  • Adding C64 SID Music

    1er novembre 2012, par Multimedia Mike — General

    I have been working on adding support for SID files — the music format for the Commodore 64 — to the game music website for awhile. I feel a bit out of my element since I’m not that familiar with the C64. But why should I let that slow me down ? Allow me to go through the steps I have previously outlined in order to make this happen.



    I need to know what picture should represent the system in the search results page. The foregoing picture should be fine, but I’m getting way ahead of myself.

    Phase 1 is finding adequate player software. The most venerable contender in this arena is libsidplay, or so I first thought. It turns out that there’s libsidplay (originally hosted at Geocities, apparently, and no longer on the net) and also libsidplay2. Both are kind of old (libsidplay2 was last updated in 2004). I tried to compile libsidplay2 and the C++ didn’t agree with current version of g++.

    However, a recent effort named libsidplayfp is carrying on the SID emulation tradition. It works rather well, notwithstanding the fact that compiling the entire library has a habit of apparently hanging the Linux VM where I develop this stuff.

    Phase 2 is to develop a testbench app around the playback library. With the help of the libsidplayfp library maintainers, I accomplished this. The testbench app consistently requires about 15% of a single core of a fairly powerful Core i7. So I look forward to recommendations that I port that playback library to pure JavaScript.

    Phase 3 is plug into the web player. I haven’t worked on this yet. I’m confident that this will work since phase 2 worked (plus, I have a plan to combine phases 2 and 3).

    One interesting issue that has arisen is that proper operation of libsidplayfp requires that 3 C64 ROM files be present (the, ahem, KERNAL, BASIC interpreter, and character generator). While these are copyrighted ROMs, they are easily obtainable on the internet. The goal of my project is to eliminate as much friction as possible for enjoying these old tunes. To that end, I will just bake the ROM files directly into the player.

    Phase 4 is collecting a SID song corpus. This is the simplest part of the whole process thanks to the remarkable curation efforts of the High Voltage SID Collection (HVSC). Anyone can download a giant archive of every known SID file. So that’s a done deal.

    Or is it ? One small issue is that I was hoping that the first iteration of my game music website would focus on, well, game music. There is a lot of music in the HVSC that are original compositions or come from demos. The way that the archive is organized makes it difficult to automatically discern whether a particular SID file comes from a game or not.

    Phase 5 is munging the metadata. The good news here is that the files have the metadata built in. The not-so-great news is that there isn’t quite as much as I might like. Each file is tagged with title, author, and publisher/copyright. If there is more than one song in a file, they all have the same metadata. Fortunately, if I can import them all into my game music database, there is an opportunity to add a lot more metadata.

    Further, there is no play length metadata for these files. This means I will need to set each to a default length like 2 minutes and do something like I did before in order to automatically determine if any songs terminate sooner.

    Oddly, the issue I’m most concerned about is character encoding. This is the first project for which I’m making certain that I understand character encoding since I can’t reasonably get away with assuming that everything is ASCII. So far, based on the random sampling of SID files I have checked, there is a good chance of encountering metadata strings with characters that are not in the lower ASCII set. From what I have observed, these characters map to Unicode code points. So I finally get to learn about manipulating strings in such a way that it preserves the character encoding. At the very least, I need Python to rip the strings out of the binary SID files and make sure the Unicode remains intact while being inserted into an SQLite3 database.

  • Python-FFMPEG Corruption Problems

    11 juillet 2023, par Gabriel Ruben Guzman

    I'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) Error FFMPEG

    


    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&#xA;[rawvideo @ 0x55ccc0e2bb80] Invalid buffer size, packet size 691200 < expected frame_size 921600&#xA;Error while decoding stream #0:0 : Invalid argument

    &#xA;

    The code for animate_play

    &#xA;

    def animate_play(self, game_time=None, length=None, highlight_player=None,&#xA;                 commentary=True, show_spacing=None):&#xA;    """&#xA;    Method for animating plays in game.&#xA;    Outputs video file of play in {cwd}/temp.&#xA;    Individual frames are streamed directly to ffmpeg without writing them&#xA;    to the disk, which is a great speed improvement over watch_play&#xA;&#xA;    Args:&#xA;        game_time (int): time in game to start video&#xA;            (seconds into the game).&#xA;            Currently game_time can also be an tuple of length two&#xA;            with (starting_frame, ending_frame)if you want to&#xA;            watch a play using frames instead of game time.&#xA;        length (int): length of play to watch (seconds)&#xA;        highlight_player (str): If not None, video will highlight&#xA;            the circle of the inputed player for easy tracking.&#xA;        commentary (bool): Whether to include play-by-play commentary in&#xA;            the animation&#xA;        show_spacing (str) in [&#x27;home&#x27;, &#x27;away&#x27;]: show convex hull&#xA;            spacing of home or away team.&#xA;            If None, does not show spacing.&#xA;&#xA;    Returns: an instance of self, and outputs video file of play&#xA;    """&#xA;    if type(game_time) == tuple:&#xA;        starting_frame = game_time[0]&#xA;        ending_frame = game_time[1]&#xA;    else:&#xA;        game_time= self.start &#x2B;(self.quarter*720)&#xA;        end_time= self.end &#x2B;(self.quarter*720)&#xA;        length = end_time-game_time&#xA;        # Get starting and ending frame from requested &#xA;        # game_time and length&#xA;        print(&#x27;hit&#x27;)&#xA;        print(len(self.moments))&#xA;        print(game_time)&#xA;        print(end_time)&#xA;        print(length)&#xA;        print(game_time&#x2B;length)&#xA;        &#xA;        print(self.moments.game_time.min())&#xA;        print(self.moments.game_time.max())&#xA;&#xA;        sys.exit()&#xA;        starting_frame = self.moments[self.moments.game_time.round() ==&#xA;                                      game_time].index.values[0]&#xA;        ending_frame = self.moments[self.moments.game_time.round() ==&#xA;                                    game_time &#x2B; length].index.values[0]&#xA;&#xA;    # Make video of each frame&#xA;    filename = "./temp/{game_time}.mp4".format(game_time=game_time)&#xA;    if commentary:&#xA;        size = (960, 960)&#xA;    else:&#xA;        size = (480, 480)&#xA;    cmdstring = (&#x27;ffmpeg&#x27;,&#xA;                 &#x27;-y&#x27;, &#x27;-r&#x27;, &#x27;20&#x27;,  # fps&#xA;                 &#x27;-s&#x27;, &#x27;%dx%d&#x27; % size,  # size of image string&#xA;                 &#x27;-pix_fmt&#x27;, &#x27;argb&#x27;,  # Stream argb data from matplotlib&#xA;                 &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#x27;-i&#x27;, &#x27;-&#x27;,&#xA;                 &#x27;-vcodec&#x27;, &#x27;libx264&#x27;, filename)&#xA;    #print(pipe)&#xA;    #print(cmdstring)&#xA;    &#xA;    &#xA;&#xA;    # Stream plots to pipe&#xA;    pipe = Popen(cmdstring, stdin=PIPE)&#xA;    print(cmdstring)&#xA;    for frame in range(starting_frame, ending_frame):&#xA;        print(frame)&#xA;        self.plot_frame(frame, highlight_player=highlight_player,&#xA;                        commentary=commentary, show_spacing=show_spacing,&#xA;                        pipe=pipe)&#xA;    print(cmdstring)&#xA;    pipe.stdin.close()&#xA;    pipe.wait()&#xA;    return self&#xA;

    &#xA;

    The code for watch play

    &#xA;

    def watch_play(self, game_time=None, length=None, highlight_player=None,&#xA;               commentary=True, show_spacing=None):&#xA;&#xA;    """&#xA;    DEPRECIATED.  See animate_play() for similar (fastere) method&#xA;&#xA;    Method for viewing plays in game.&#xA;    Outputs video file of play in {cwd}/temp&#xA;&#xA;    Args:&#xA;        game_time (int): time in game to start video&#xA;            (seconds into the game).&#xA;            Currently game_time can also be an tuple of length&#xA;            two with (starting_frame, ending_frame) if you want&#xA;            to watch a play using frames instead of game time.&#xA;        length (int): length of play to watch (seconds)&#xA;        highlight_player (str): If not None, video will highlight&#xA;            the circle of the inputed player for easy tracking.&#xA;        commentary (bool): Whether to include play-by-play&#xA;            commentary underneath video&#xA;        show_spacing (str in [&#x27;home&#x27;, &#x27;away&#x27;]): show convex hull&#xA;            of home or away team.&#xA;            if None, does not display any convex hull&#xA;&#xA;    Returns: an instance of self, and outputs video file of play&#xA;    """&#xA;    print(&#x27;hit this point &#x27;)&#xA;    warnings.warn(("watch_play is extremely slow. "&#xA;                   "Use animate_play for similar functionality, "&#xA;                   "but greater efficiency"))&#xA;&#xA;    if type(game_time) == tuple:&#xA;        starting_frame = game_time[0]&#xA;        ending_frame = game_time[1]&#xA;    else:&#xA;        # Get starting and ending frame from requested game_time and length&#xA;        game_time= self.start &#x2B;(self.quarter*720)&#xA;        end_time= self.end &#x2B;(self.quarter*720)&#xA;        length = end_time-game_time&#xA;&#xA;&#xA;        starting_frame = self.moments[self.moments.game_time.round() ==&#xA;                                      game_time].index.values[0]&#xA;        ending_frame = self.moments[self.moments.game_time.round() ==&#xA;                                    game_time &#x2B; length].index.values[0]&#xA;    #print(self.moments.head(2))&#xA;    #print(starting_frame)&#xA;    #print(ending_frame)&#xA;    print(len(self.moments))&#xA;    # Make video of each frame&#xA;    title = str(starting_frame)&#x2B;&#x27;-&#x27;&#x2B;str(ending_frame)&#xA;    for frame in range(starting_frame, ending_frame):&#xA;        print(frame)&#xA;        self.plot_frame(frame, highlight_player=highlight_player,&#xA;                        commentary=commentary, show_spacing=show_spacing)&#xA;    command = (&#x27;ffmpeg -framerate 20 -start_number {starting_frame} &#x27;&#xA;               &#x27;-i %d.png -c:v libx264 -r 30 -pix_fmt yuv420p -vf &#x27;&#xA;               &#x27;"scale=trunc(iw/2)*2:trunc(ih/2)*2" {title}&#x27;&#xA;               &#x27;.mp4&#x27;).format(starting_frame=starting_frame,title=title)&#xA;    os.chdir(&#x27;temp&#x27;)&#xA;    os.system(command)&#xA;    os.chdir(&#x27;..&#x27;)&#xA;&#xA;    # Delete images&#xA;    for file in os.listdir(&#x27;./temp&#x27;):&#xA;        if os.path.splitext(file)[1] == &#x27;.png&#x27;:&#xA;            os.remove(&#x27;./temp/{file}&#x27;.format(file=file))&#xA;&#xA;    return self&#x27;&#xA;

    &#xA;

  • Curator of the Samples Archive

    13 mai 2011, par Multimedia Mike — General

    Remember how I mirrored the world-famous MPlayerHQ samples archive a few months ago ? Due to a series of events, the original archive is no longer online. However, me and the people who control the mplayerhq.hu domain figured out how to make samples.mplayerhq.hu point to samples.multimedia.cx.

    That means... I’m the current owner and curator of our central multimedia samples repository. Such power ! This should probably be the fulfillment of a decade-long dream for me, having managed swaths of the archive, most notably the game formats section.

    How This Came To Be

    If you pay any attention to the open source multimedia scene, you might have noticed that there has been a smidge of turmoil. Heated words were exchanged, authority was questioned, some people probably said some things they didn’t mean, and the upshot is that, where once there was one project (FFmpeg), there are now 2 projects (also Libav). And to everyone who has wanted me to mention it on my blog— there, I finally broke my silence and formally acknowledged the schism.

    For my part, I was just determined to ensure that the samples archive remained online, preferably at the original samples.mplayerhq.hu address. There are 10 years worth of web links out there pointing into the original repository.

    Better Solution

    I concede that it’s not entirely optimal to host the repository here at multimedia.cx. While I can offer a crazy amount of monthly bandwidth, I can’t offer rsync (invaluable for keeping mirrors in sync), nor can the server provide anonymous FTP or allow me to offer accounts to other admins who can manage the repository.

    The samples archive is also mirrored at samples.libav.org/samples. I understand that service is provided by VideoLAN. Right now, both repositories are known to be static. I’m open to brainstorms about how to improve the situation.