Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (38)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • 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 (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (3768)

  • Transcoding with custom commands using streamio-ffmpeg

    14 avril 2017, par ACIDSTEALTH

    I’m trying to transcode a video file using streamio-ffmpeg with some custom commands, but nothing I try seems to work. I want to transcode the video with the following options :

    ffmpeg -i input.mp4 -vf
       "format=yuv444p,
        drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,
        drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th,
        format=yuv420p"
    -c:v libx264 -c:a copy -movflags +faststart output.mp4

    I’ve tried the following code combinations without success :

    1. Tried removing the line breaks and converting the command string to an array, following the instructions in the docs.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(ffmpeg -i input.mp4 -vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p" -c:v libx264 -c:a copy -movflags +faststart output.mp4)
      video.transcode('output.mp4', opts)

      But this yields the error :

      [NULL @ 0x7f962100e200] Unable to find a suitable output format for 'ffmpeg'
      ffmpeg: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    2. Tried stripping out the input file name and output file name since the gem seems to handle that for you.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(-vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p")
      video.transcode('output.mp4', opts)

      Which returns this error :

      [NULL @ 0x7fd0a9008c00] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
      drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    3. Tried removing the -vf flag and just running everything within the quotation marks.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p)
      video.transcode('output.mp4', opts)

      This returns another error :

      [NULL @ 0x7fab8101fe00] Unable to find a suitable output format for 'format=yuv444p,'
      format=yuv444p,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    4. Tried removing the format arguments since ffmpeg is clearly complaining about those.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w("drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th")
      video.transcode('output.mp4', opts)

      Again another error :

      [NULL @ 0x7fc7f880a800] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
      drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    5. Tried building a hash from the command string and feeding that into the transcode method.

      video = FFMPEG::Movie.new('input.mp4')
      opts = {
         '-vf' => {
             format: 'yuv444p',
             drawbox: {
                 y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
             },
             drawtext: {
                 font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
             },
             format: 'yuv420p'
         }
      }
      video.transcode('output.mp4', opts)

      I also tried a variation without the -vf flag :

      video = FFMPEG::Movie.new('input.mp4')
      opts = {
         format: 'yuv444p',
         drawbox: {
             y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
         },
         drawtext: {
             font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
         },
         format: 'yuv420p'
      }
      video.transcode('output.mp4', opts)

    These both produced an output.mp4 video file but the output file was unchanged from the input. There was no text overlay.

    Nothing I try seems to work. What am I doing wrong here ?

  • MoviePy on EC2 Instance Super Slow

    27 janvier 2020, par connorvo

    No matter what size EC2 instance I use, MoviePy.write_videofile() takes forever.

    I ran it on a t2.micro, c5.large, and c4.2xlarge and they all projected to take the same amount of time ( 7 hours).

    I have a 720mb mp4 file that I am adding a 30mb mp4 file to the beginning of and then putting a text overlay on the entire video (just static text saying the company name in the bottom corner).

    final_video.write_videofile(
       f"{FINAL_VIDEO_FILENAME}.mp4",
       fps=60,
       codec='libx264',
       audio_codec='aac',
       temp_audiofile=f'{FINAL_VIDEO_FILENAME}_temp_audio.mp4',
       remove_temp=True,
       threads = 8, # this was for c4.2xlarge instance
    )
    def __get_intro_clip(self, title, size, fps):
           clip = ( VideoFileClip('ytbot/intro_video/intro_video.mp4')
               .subclip(0,9.5)
               .resize(size)
               .set_fps(fps)
           )

           # make bigger then resize() so stroke works properly
           text_clip1 = ( TextClip(f'{TEXTTEXT}',font='Helvetica-Narrow-Bold',fontsize=self.DEFAULT_TEXT_SIZE*self.TITLE_MULTIPLIER,color='white',stroke_color='black',stroke_width=self.DEFAULT_STROKE_SIZE*self.TITLE_MULTIPLIER).resize(self.DEFAULT_RESIZE_MULTIPLIER)
               .margin(bottom=175, opacity=0)
               .set_position('center')
               .set_duration(4)
               .set_start(1)
               .fadein(0.25)
               .fadeout(0.25)
           )
           text_clip2 = ( TextClip(f'presents',font='Helvetica-Narrow-Bold',fontsize=self.DEFAULT_TEXT_SIZE*self.TITLE_MULTIPLIER*0.7,color='white',stroke_color='black',stroke_width=self.DEFAULT_STROKE_SIZE*self.TITLE_MULTIPLIER).resize(self.DEFAULT_RESIZE_MULTIPLIER)
               .set_position('center')
               .set_duration(3.5)
               .set_start(1.5)
               .fadein(0.25)
               .fadeout(0.25)
           )
           text_clip3 = ( TextClip(title,font='Helvetica-Narrow-Bold',fontsize=self.DEFAULT_TEXT_SIZE*self.TITLE_MULTIPLIER,color='white',stroke_color='black',stroke_width=self.DEFAULT_STROKE_SIZE*self.TITLE_MULTIPLIER).resize(self.DEFAULT_RESIZE_MULTIPLIER)
               .margin(top=175, opacity=0)
               .set_position('center')
               .set_duration(3)
               .set_start(2)
               .fadein(0.25)
               .fadeout(0.25)
           )

           return CompositeVideoClip([clip, text_clip1, text_clip2, text_clip3]).fadein(0.5)

       def edit_yt_video(self, video_path, name):
           video_clips = []

           clip = VideoFileClip(video_path)

           video_clips.append(self.__get_intro_clip(name, clip.size, clip.fps))

           text_clip = ( TextClip('Company: {name}',font='Helvetica-Narrow-Bold',fontsize=self.DEFAULT_TEXT_SIZE,color='white',stroke_color='black',stroke_width=self.DEFAULT_STROKE_SIZE).resize(self.DEFAULT_RESIZE_MULTIPLIER)
               .margin(bottom=15, left=15, opacity=0)
               .set_position(('left', 'bottom'))
               .set_duration(clip.duration)
           )

           video_clips.append(CompositeVideoClip([clip, text_clip]).fadeout(0.5).crossfadein(0.5))

           return concatenate_videoclips(video_clips, padding=-1, method='compose')
  • Anomalie #3645 : Plusieurs bugs avec le bouton plein écran

    2 février 2016, par RastaPopoulos ♥

    En fait ce n’est pas que pour le Fullscreen : le bouton "Voir" de prévisualisation a aussi des bugs sur le même principe : les sélecteurs utilisés dans le JS ne font pas gaffe à ne travailler QUE à l’intérieur du champ en question, mais sur toute la page…