Recherche avancée

Médias (91)

Autres articles (60)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (3632)

  • FFmpeg does not save the mp4 clips to file

    31 janvier 2021, par oo92

    I'm using the FFmpeg Python library to save 60-second mp4 clips to a .mp4 file from Twitch live streams using its API. This is my code :

    


    current_dir = os.getcwd()

client = TwitchClient(client_id='')
streams_now = client.streams.get_live_streams(limit=100, offset=900)
epoch = str(math.ceil(time.time()))

if not os.path.exists(current_dir + '/twitch_videos/'):
    os.mkdir(current_dir + '/twitch_videos/')

for i in range(0, 100):
    try:
        username = streams_now[i]['channel']['name']
        id = streams_now[i]['id']
        game = streams_now[i]['game']
        game = game.translate(str.maketrans({':': '-', ' ': '-', "'": '', '!': '', '&': '_', '.': '', '+': '_'}))
        streaming = streamlink.streams('http://twitch.tv/' + username)
        stream = streaming["best"].url

        twitch_stream = ffmpeg.input(stream)

        twitch_stream = ffmpeg.filter(twitch_stream,
                                      'fps',
                                      fps=1,
                                      round='up')

        twitch_stream = ffmpeg.output(twitch_stream,
                                      current_dir + '/twitch_videos/' + '%d_' + username + '_' + epoch + '.mp4',
                                      sc_threshold='0',
                                      g='60',
                                      f='segment',
                                      segment_time='600',
                                      segment_format_options='movflags=+faststart',
                                      reset_timestamps='1')frl3dqgn21bbpp6tajjvg5pdevczac
        ffmpeg.run(twitch_stream)


    except:
        pass


    


    I am concatenating the path it should go to the name of the file but the folder is empty after I take a look. The reason why its in the try-catch block is because some streams do not have the best tag so I want to skip those.

    


    Update

    


    I put a bunch of print statements inside the try block and none of them get printed. I put similar if statements inside the except block and they are all printed. This means that there is something wrong with my code inside the try block. This tells me that the code inside the try block never gets executed.

    


  • Python ffmpeg does not save the mp4 clips to file

    30 janvier 2021, par oo92

    I'm using the ffmpeg Python library to save 60 second mp4 clips to file from Twitch livestreams using its API. This is my code :

    


    current_dir = os.getcwd()

client = TwitchClient(client_id='')
streams_now = client.streams.get_live_streams(limit=100, offset=900)
epoch = str(math.ceil(time.time()))

if not os.path.exists(current_dir + '/twitch_videos/'):
    os.mkdir(current_dir + '/twitch_videos/')

for i in range(0, 1):
    try:
        username = streams_now[i]['channel']['name']
        id = streams_now[i]['id']
        game = streams_now[i]['game']
        game = game.translate(str.maketrans({':': '-', ' ': '-', "'": '', '!': '', '&': '_', '.': '', '+': '_'}))
        streaming = streamlink.streams('http://twitch.tv/' + username)
        stream = streaming["best"].url

        twitch_stream = ffmpeg.input(stream)

        twitch_stream = ffmpeg.filter(twitch_stream,
                                      'fps',
                                      fps=1,
                                      round='up')

        twitch_stream = ffmpeg.output(twitch_stream,
                                      current_dir + '/twitch_videos/' + '%d_' + username + '_' + epoch + '.mp4',
                                      sc_threshold='0',
                                      g='60',
                                      f='segment',
                                      segment_time='600',
                                      segment_format_options='movflags=+faststart',
                                      reset_timestamps='1')frl3dqgn21bbpp6tajjvg5pdevczac
        ffmpeg.run(twitch_stream)


    except:
        pass


    


    I am concatenating the path it should go to, to the name of the file. But the folder is empty after I take a look.

    


  • Best way to go about video playback for WebAssembly, Linux, Windows, and Android

    13 janvier 2021, par Michael Macha

    I'm currently working on a game as a passtime during quarantine. It currently builds, via a Makefile, for WASM, Linux, and Windows ; and is eventually planned to be ported to Android through NDK. The API used is (primarily) SDL, with SDL Image and SDL Mixer, and all graphics go through OpenGL.

    


    As of the moment, all graphics, sound, and control is running perfectly ; but I would like to add video cut scenes and I'm uncertain of how to do this with WASM. I recognize that maybe half of the system resources are available in a browser, and am willing to drop fidelity in the web version to compensate. Currently, all code is in C and GLSL ; but if I need to I can add C++, or a little extra JavaScript.

    


    My compilers, for each platform, are gcc, emcc, and mingw32. They're all called through Maketools. As of the moment, it looks like I can just use FFMPEG for gcc & mingw ; but what's best for emcc, which does not have an FFMPEG port available ? Will I need to call something else, or use some specific browser function ? What is the simplest way to go about this, and does anyone have a basic tutorial for in-browser video with WebAssembly ?

    


    For a little further data, I'm debuting my project on Itch.io. For a launched-in-browser game, they require a zip file with an HTML file called index.html, and any support files, within it. (Total file size is effectively limited to 1 GB.) I'm expecting a minimum of 640x480 resolution, but would prefer higher. I'm currently digging through online examples but haven't yet found anything sufficiently basic. (This might change as I keep digging, and I'll update the question if I find anything.)