Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (82)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

  • 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 ;

Sur d’autres sites (7112)

  • Speeding up videocomposing in pymovie

    10 février 2024, par rawlung

    I'm trying to resize videos similarly to what this api provides
https://creatomate.com/docs/json/quick-start/blur-video-background
I accomplished the result more or less but the problem is it takes ages to render out.
I'm a total beginner when it comes to video processing and for the life of me i can't figure out how to speed it up. When the rendering is running python only uses CPU at about 20% utilization.

    


    from moviepy.editor import VideoFileClip, concatenate_videoclips,CompositeVideoClipimport datetimefrom skimage.filters import gaussian

def _blur(image):
  return gaussian(image.astype(float), sigma=25,preserve_range=True,channel_axis=-1)

def blurVideos(filenames):
  clips = [VideoFileClip(c) for c in filenames]
  overlay_clips = [VideoFileClip((c), has_mask=True) for c in filenames]
  overlay = concatenate_videoclips(overlay_clips,"chain")
  output = concatenate_videoclips(clips, method="chain")
  print("Bluring video")
  blured_output = output.fl_image( _blur )
  print("Done")
  print("Resizing video")
  resized_output = blured_output.resize((1920,1080))
  print("Done")
  composited_output = CompositeVideoClip([resized_output.without_audio(),overlay.set_position("center","center")])
  composited_output.write_videofile(f"output/out_{datetime.datetime.today().strftime('%Y-%m-%d')}.mp4",fps=20,threads=16,codec="h264_nvenc",preset="fast")


    


    I've tried to use GPU accelerated codecs like h264_nvenc, I've tried to modify ffmpeg arguments under the hood of moviepy to use cuda also no succses
What can i do to speed this up ?

    


  • pyav / ffmpeg / libav receiving too many keyframe

    26 mai 2021, par user1315621

    I am streaming from an rtsp source. It looks like half of the frames received are key frames. Is there a way to reduce this percentage and have an higher number of P-frames and B-frames ? If possible, I would like to increase the number of P-frames (not the one of B-frames).
I am using pyav which is a Python wrapper for libav (ffmpeg)

    


    Code :

    


    container = av.open(
    url, 'r',
    options={
        'rtsp_transport': 'tcp',
        'stimeout': '5000000',
        'max_delay': '5000000',
    }
)
stream = container.streams.video[0]
codec_context = stream.codec_context
codec_context.export_mvs = True
codec_context.gop_size = 25  

for packet in self.container.demux(video=0):
    for video_frame in packet.decode():
        print(video_frame.is_key_frame)


    


    Output :

    


    True
False
True
False
...


    


    Note 1 : I can't edit the source. I can just edit the code used to stream the video.

    


    Note 2 : same solution should apply to pyav, libavi and ffmpeg.

    


    Edit : it seems that B-frames are disabled : codec_context.has_b_frames is False

    


  • How can I parse ffprobe output and run ffmpeg depending on the result ?

    14 septembre 2019, par Eli Greenberg

    I have had incredible trouble building a binary of ffmpeg for Mac that works correctly for all of my needs. I have an older build that works great remuxing h264 video without problems but lacks a library I need, namely libspeex. I built a newer build based on ffmpeg’s git that includes libspeex but crashes when trying to remux h264 from .flv files with bad timecodes (live dumps from rtmpdump). So I have two ffmpeg binaries that each do half of what I need. This is what I have as my current .command file :

    for f in ~/Desktop/Uploads/*.flv
    do
    /usr/local/bin/ffmpeg -i "$f" -vcodec copy -acodec libfaac -ab 128k -ar 48000 -async 1 "${f%.*}".mp4 && rmtrash "$f" || rmtrash "${f%.*}".mp4
    done

    This ffmpeg binary has libspeex included so it can decode speex audio in the .flv input files. What I’m looking to do is something like this pseudocode :

    for f in ~/Desktop/Uploads/*.flv
    do
    ffprobe input.flv
       if Stream #0:1 contains speex
           ffmpeg-speex -i input.flv -acodec copy -async 1 output.m4a
       fi
    ffmpeg-h264 -i input.flv -vcodec copy output.mp4
    MP4Box -add output.mp4 -add output.m4a finaloutput.mp4
    done

    Is something like this possible ? Are there any alternatives ?