Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (51)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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, par

    MediaSPIP 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 (3581)

  • Révision 17405 : Petit changement dans l’appel des 2 fonctions infos_plugin et infos_paquet charg...

    14 mars 2011, par esj@rezo.net

    Par exemple pour avoir le tableau des arbres des syntaxe abstraites de tous les plugins d’un dépot, faire : $ar = file_get_contents(’archives.xml’) ; preg_match_all(’@&lt ;plugin&gt ;.* ?&lt ;/plugin&gt ;@s’, $ar, $m) ; $f = charger_fonction(’infos_plugin’, ’plugins’) ; $m = $m[0] ; (...)

  • add thumbnail and metadata to mp3 file on converting using youtube-dl by python script

    18 septembre 2015, par arun pal

    I want to add metadata as well as thumbnail image to my mp3 file. How to do that , can anybody help me ?

    from __future__ import unicode_literals
    import youtube_dl

    n="cwHzy7ftLyI"

    ydl_opts = {
       'format': 'bestaudio/best',

       'verbose':True,

       'postprocessors': [{
           'key': 'FFmpegExtractAudio',
           'preferredcodec': 'mp3',
           'preferredquality': '192',
           }],
           'addmetadata':True,
           'embedthumbnail':True,
           'writethumbnail':True,
       }
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
       ydl.add_default_info_extractors()
       ydl.download(['http://www.youtube.com/watch?v='+n])
  • FFMPEG/tensorflow warping .mp4's with no observable pattern of correlation

    25 mai 2018, par ThePeskyWabbit

    The function that performs the processing is here :

    def ffwd_video(path_in, path_out, checkpoint_dir, device_t='/gpu:0', batch_size=4):
    video_clip = VideoFileClip(path_in, audio=False)
    video_writer = ffmpeg_writer.FFMPEG_VideoWriter(path_out, video_clip.size, video_clip.fps, codec="libx264",
                                                   preset="slow", bitrate="3000k",
                                                   audiofile=path_in, def ffwd_video(path_in, path_out, checkpoint_dir, device_t='/gpu:0', batch_size=2):threads=None,
                                                   ffmpeg_params=None)

    g = tf.Graph()
    soft_config = tf.ConfigProto(allow_soft_placement=True)
    soft_config.gpu_options.allow_growth = True
    with g.as_default(), g.device(device_t), \
           tf.Session(config=soft_config) as sess:

       batch_shape = (batch_size, video_clip.size[1], video_clip.size[0], 3)
       print(batch_shape)
       img_placeholder = tf.placeholder(tf.float32, shape=batch_shape,
                                        name='img_placeholder')

       preds = transform.net(img_placeholder)
       print(preds)
       saver = tf.train.Saver()
       if os.path.isdir(checkpoint_dir):
           ckpt = tf.train.get_checkpoint_state(checkpoint_dir)
           if ckpt and ckpt.model_checkpoint_path:
               saver.restore(sess, ckpt.model_checkpoint_path)
           else:
               raise Exception("No checkpoint found...")
       else:
           saver.restore(sess, checkpoint_dir)

       X = np.zeros(batch_shape, dtype=np.float32)

       def style_and_write(count):
           for i in range(count, batch_size):
               X[i] = X[count]  # Use last frame to fill X
           _preds = sess.run(preds, feed_dict={img_placeholder: X})
           for i in range(0, count):
               video_writer.write_frame(np.clip(_preds[i], 0, 255).astype(np.uint8))

       frame_count = 0  # The frame count that written to X
       for frame in video_clip.iter_frames():
           X[frame_count] = frame
           frame_count += 1
           if frame_count == batch_size:
               style_and_write(frame_count)
               frame_count = 0

       if frame_count != 0:
           style_and_write(frame_count)

       video_writer.close()

    I do not expect this to be a repeatable sample as it requires gigabytes of models/checkpoints/etc. to do so.

    Anyways, I am converting .gif’s to .mp4’s using this line of code :

    os.system('echo "y"| ffmpeg -i temp.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" temp.mp4')

    and when I run a subsequent .mp4 through the video rendering function, this will sometimes happen :

    original : https://i.imgur.com/WrBa6yw.gifv

    result : https://giphy.com/gifs/dream-bot-BzqB8XILJuVTJcgJnn

    It will happen on certain .mp4’s 100% of the time and on others, 0% of the time. It either happens to a clip or it does not happen to that clip. It is not a case of a single clip sometimes having this problem. If it is good, it is always good but if it’s bad, that clip will never work.

    After this output data from when the clips are processed :

    good gifs
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 728x728, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    frame=  450 fps= 78 q=-1.0 Lsize=    7570kB time=00:00:14.93 bitrate=4152.6kbits/s

    Stream #0:0: Video: gif, bgra, 800x450, 25 fps, 25 tbr, 100 tbn, 100 tbc
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 728x408, q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc
    frame=  360 fps=198 q=-1.0 Lsize=    2568kB time=00:00:14.93 bitrate=1408.8kbits/s

    Stream #0:0: Video: gif, bgra, 728x408, 23.92 fps, 23.98 tbr, 100 tbn, 100 tbc
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 728x408, q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc
    frame=  360 fps=198 q=-1.0 Lsize=    2568kB time=00:00:14.93 bitrate=1408.8kbits/s

    bad gifs
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 800x450, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    frame=  150 fps= 87 q=-1.0 Lsize=    1840kB time=00:00:05.92 bitrate=2545.8kbits/s

    Stream #0:0: Video: gif, bgra, 378x275, 25 fps, 25 tbr, 100 tbn, 100 tbc
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 378x274, q=-1--1, 25 fps, 12800 tbn, 25 tbc
    frame=  115 fps=0.0 q=-1.0 Lsize=     253kB time=00:00:04.52 bitrate= 459.4kbits/s

    I have noticed that the frame= value is exactly 15x larger than the .gif fps value while for the bad .gifs, it is not. I believe this is the cause but do not know how to change these values. does anybody know how I can process/convert the gif to .mp4 so that the frame= value is 15x the gif fps ?