Recherche avancée

Médias (0)

Mot : - Tags -/images

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

Autres articles (33)

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

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5292)

  • ffmpeg "Option preset not found."

    2 février 2015, par PiTheNumber

    I am trying to convert a .mpg to .flv with ffmpeg. On other servers I got it working but here with the ffmpeg clone (avconv) it just does not do it.

    Originally I was working with libfaac and preset fastfirstpass but thats not available in this build so I switched to the experimental acc and preset libx264-fast_firstpass :

    $ /usr/bin/ffmpeg -i /data/upload/videos/original/150128_Test_731_9d5b83.mpg
     -strict experimental -acodec aac -ab 128k -ar 44100 -vcodec libx264 -pass 1
     -pre libx264-fast_firstpass -b 512k -s 360x204
     -f flv /data/upload/videos/encoded/150129_Test_731_54f06a.flv

    avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
     built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
    [mpeg @ 0xc87de0] max_analyze_duration reached
    Guessed Channel Layout for  Input Stream #0.1 : stereo
    Input #0, mpeg, from '/data/upload/videos/original/150128_Test_731_9d5b83.mpg':
     Duration: 00:01:00.12, start: 0.989978, bitrate: 4814 kb/s
       Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x406 [PAR 406:405 DAR 16:9], 104857 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
       Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
    [libx264 @ 0xc8b4c0] using SAR=136/135
    [libx264 @ 0xc8b4c0] MB rate (26910000) > level limit (2073600)
    [libx264 @ 0xc8b4c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 0xc8b4c0] profile Main, level 5.2
    [libx264 @ 0xc8b4c0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
    Option preset not found.

    What does the error in the last line mean ?

    I already made sure the preset libx264-fast_firstpass.avpreset exists in /usr/share/avconv/ and if I change it to invalid ffmpeg complains with Preset invalid specified for stream 0:0, but could not be opened., so the preset is correct.

    Google does provide two results for this error. This chatlog and it’s pastebin about live streaming with the solution to add -f flv and some russian page. Nothing helped.

    Any advice ?

  • Superimposing two videos onto a static image ?

    15 décembre 2014, par Archagon

    I have two videos that I’d like to combine into a single video, in which both videos would sit on top of a static background image. (Think something like this.) My requirements are that the software I use is free, that it runs on OSX, and that I don’t have to re-encode my videos an excessive number of times. I’d also like to be able to perform this operation from the command line or via script, since I’ll be doing it a lot. (But this isn’t strictly necessary.)

    I tried fiddling with ffmpeg for a couple of hours, but it just doesn’t seem very well suited for post-processing. I could potentially hack something together via the overlay feature, but so far I haven’t figured out how to do it, aside from pain-stakingly converting the image to a video (which takes 2x as long as the length of my videos !) and then superimposing the two videos onto it in another rendering step.

    Any tips ? Thank you !


    Update :

    Thanks to LordNeckbeard’s help, I was able to achieve my desired result with a single ffmpeg call ! Unfortunately, encoding is quite slow, taking 6 seconds to encode 1 second of video. I believe this is caused by the background image. Any tips on speeding up encoding ? Here’s the ffmpeg log :

    MacBook-Pro:Video archagon$ ffmpeg -loop 1 -i underlay.png -i test-slide-video-short.flv -i test-speaker-video-short.flv -filter_complex "[1:0]scale=400:-1[a];[2:0]scale=320:-1[b];[0:0][a]overlay=0:0[c];[c][b]overlay=0:0" -shortest -t 5 -an output.mp4
    ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
     built on Nov 14 2012 16:18:58 with Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
     configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
     libavutil      51. 73.101 / 51. 73.101
     libavcodec     54. 59.100 / 54. 59.100
     libavformat    54. 29.104 / 54. 29.104
     libavdevice    54.  2.101 / 54.  2.101
     libavfilter     3. 17.100 /  3. 17.100
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 15.100 /  0. 15.100
     libpostproc    52.  0.100 / 52.  0.100
    Input #0, image2, from 'underlay.png':
     Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: png, rgb24, 1024x768, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Input #1, flv, from 'test-slide-video-short.flv':
     Metadata:
       author          :
       copyright       :
       description     :
       keywords        :
       rating          :
       title           :
       presetname      : Custom
       videodevice     : VGA2USB Pro V3U30343
       videokeyframe_frequency: 5
       canSeekToEnd    : false
       createdby       : FMS 3.5
       creationdate    : Mon Aug 16 16:35:34 2010
       encoder         : Lavf54.29.104
     Duration: 00:50:32.75, start: 0.000000, bitrate: 90 kb/s
       Stream #1:0: Video: vp6f, yuv420p, 640x480, 153 kb/s, 8 tbr, 1k tbn, 1k tbc
    Input #2, flv, from 'test-speaker-video-short.flv':
     Metadata:
       author          :
       copyright       :
       description     :
       keywords        :
       rating          :
       title           :
       presetname      : Custom
       videodevice     : Microsoft DV Camera and VCR
       videokeyframe_frequency: 5
       audiodevice     : Microsoft DV Camera and VCR
       audiochannels   : 1
       audioinputvolume: 75
       canSeekToEnd    : false
       createdby       : FMS 3.5
       creationdate    : Mon Aug 16 16:35:34 2010
       encoder         : Lavf54.29.104
     Duration: 00:50:38.05, start: 0.000000, bitrate: 238 kb/s
       Stream #2:0: Video: vp6f, yuv420p, 320x240, 204 kb/s, 25 tbr, 1k tbn, 1k tbc
       Stream #2:1: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s
    File 'output.mp4' already exists. Overwrite ? [y/N] y
    using cpu capabilities: none!
    [libx264 @ 0x7fa84c02f200] profile High, level 3.1
    [libx264 @ 0x7fa84c02f200] 264 - core 119 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'output.mp4':
     Metadata:
       encoder         : Lavf54.29.104
       Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1024x768, q=-1--1, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 (png) -> overlay:main
     Stream #1:0 (vp6f) -> scale
     Stream #2:0 (vp6f) -> scale
     overlay -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help

    Update 2 :

    It works ! One important tweak was to move the underlay.png input to the end of the input list. This increased performance substantially. Here’s my final ffmpeg call. (The maps at the end aren’t required for this particular arrangement, but I sometimes have a few extra audio inputs that I want to map to my output.)

    ffmpeg
       -i VideoOne.flv
       -i VideoTwo.flv
       -loop 1 -i Underlay.png
       -filter_complex "[2:0] [0:0] overlay=20:main_h/2-overlay_h/2 [overlay];[overlay] [1:0] overlay=main_w-overlay_w-20:main_h/2-overlay_h/2 [output]"
       -map [output]:v
       -map 0:a
       OutputVideo.m4v
  • FFMPEG - Why can't i record a video for more than 10 seconds ?

    12 février 2020, par gabriel

    I’m developing a screen recorder for windows with python but for some reason i can’t record the video for more than 10 seconds.However i can record the audio for more than 10 seconds.
    Also i’m using :

    FFMPEG - to record the video with mp4 extension

    PYAUDIO - to record the sound

    TKINTER - to design the GUI

    Since the problem is with the video recording i will leave the code that i used with ffmpeg :

    """
    cmdGen.py generates ffmpeg commands to record your screen

    """
    import os

    class cmdGen:
       def __init__(self):
           self.fps = 60
           self.source = "desktop"
           self.encoder = 'mpeg4'
           self.hwaccel = None
           self.drawMouse = 1
           self.enableWebcam = False
           self.audList = 0
       def config(self,
                   fps=None,source=None,encoder=None,
                   hwaccel='unchanged',drawMouse=None,
                   webcam=None,audList=None):
           if fps: self.fps = fps
           if source: self.source = source
           if encoder: self.encoder = encoder
           if hwaccel != 'unchanged': self.hwaccel = hwaccel
           if drawMouse: self.drawMouse = 0 if not self.drawMouse else 1
           if webcam: self.enableWebcam = bool(webcam)
           if audList: self.audList = audList
       def setSource(self,isWindow,windowName=""):
           if not isWindow:
               self.source = "desktop"
           else:
               self.source = "title="+windowName
       def setFps(self,fps):
           self.fps = fps
       def setEncode(self,encoder):
           self.encoder = encoder
       def getCmd(self,filename):
           print("ACK")
           finalCmd = ["ffmpeg.exe","-f","gdigrab"]
           finalCmd.extend(['-i',self.source])
           finalCmd.extend(['-framerate',str(self.fps)])
           finalCmd.extend(['-c:v',self.encoder])
           if self.encoder == 'mpeg4':
               finalCmd.extend(['-q:v','7'])
           if self.hwaccel:
               finalCmd.extend(['-hwaccel',self.hwaccel])
           finalCmd.extend(['-draw_mouse',str(self.drawMouse)])
           finalCmd.extend(["-y", filename])
           print(finalCmd)
           return finalCmd
       def getCvtCmd(self,filename):
               # if self.rcchecked.get():
               #     self.mergeProcess = subprocess.Popen(args= ["ffmpeg","-i",'tmp/tmp.mkv','-i','tmp/tmp.wav','-i','tmp/webcamtmp.mkv','-filter_complex','[2:v] scale=640:-1 [inner]; [0:0][inner] overlay=0:0 [out]',"-shortest",'-map','[out]','-y',"ScreenCaptures/"+self.filename])
               # else:
               #     self.mergeProcess = subprocess.Popen(args= ["ffmpeg","-i",'tmp/tmp.mkv','-i','tmp/tmp.wav',"-shortest",'-y',"ScreenCaptures/"+self.filename], startupinfo=startupinfo)
           print("ACK")
           finalCmd = ["ffmpeg.exe"]
           finalCmd.extend(['-i','tmp/tmp.mkv'])
           for i in range(len(self.audList)):
               finalCmd.extend(['-i','tmp/tmp_'+str(i)+'.wav'])
           if len(self.audList) > 0:
               finalCmd.extend(['-filter_complex','amerge=inputs='+str(len(self.audList)),'-ac',str(len(self.audList))])
           # finalCmd.extend(['-c:v',self.encoder])
           if self.enableWebcam:
               finalCmd.extend(['-i','tmp/webcamtmp.mkv','-filter_complex','[2:v] scale=640:-1 [inner]; [0:0][inner] '
                                                                           'overlay=0:0 [out]','-map','[out]'])

           #finalCmd.extend(['-shortest'])
           finalCmd.extend(["-y", filename])
           print(finalCmd)
           return finalCmd

    if __name__ == "__main__":
       cg = cmdGen()
       cg.setEncode("h264_nvenc")
       cg.setFps(60)
       cg.setSource(False)
       print(cg.getCmd("tmp"))

    Thanks guys

    Full log trying to record 1 minute :

    C:\Users\FabianoFreitas\AppData\Local\Programs\Python\Python37\python.exe C:/Users/FabianoFreitas/Desktop/PowerShare-v2.0/screenRecorder.py
    ACK
    ['ffmpeg.exe', '-f', 'gdigrab', '-i', 'desktop', '-framerate', '60', '-c:v', 'mpeg4', '-q:v', '7', '-draw_mouse', '1', '-y', 'tmp/tmp.mkv']
    * recording
    ACK
    ['ffmpeg.exe', '-i', 'tmp/tmp.mkv', '-i', 'tmp/tmp_0.wav', '-filter_complex', 'amerge=inputs=1', '-ac', '1', '-y', 'Videos/ScreenCapture24.mp4']
    * done recording
    ffmpeg version git-2020-02-05-e6891d1 Copyright (c) 2000-2020 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20200122
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 39.100 / 56. 39.100
     libavcodec     58. 67.101 / 58. 67.101
     libavformat    58. 37.100 / 58. 37.100
     libavdevice    58.  9.103 / 58.  9.103
     libavfilter     7. 74.100 /  7. 74.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Input #0, matroska,webm, from 'tmp/tmp.mkv':
     Metadata:
       ENCODER         : Lavf58.37.100
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 2560x1080 [SAR 1:1 DAR 64:27], 29.97 fps, 29.97 tbr, 1k tbn, 30k tbc (default)
       Metadata:
         ENCODER         : Lavc58.67.101 mpeg4
    Guessed Channel Layout for Input Stream #1.0 : stereo
    Input #1, wav, from 'tmp/tmp_0.wav':
     Duration: 00:01:09.08, bitrate: 1411 kb/s
       Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Stream mapping:
     Stream #1:0 (pcm_s16le) -> amerge (graph 0)
     amerge (graph 0) -> Stream #0:0 (aac)
     Stream #0:0 -> #0:1 (mpeg4 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [Parsed_amerge_0 @ 00000218cb4c1640] No channel layout for input 1
    [libx264 @ 00000218cb4acdc0] using SAR=1/1
    [libx264 @ 00000218cb4acdc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 00000218cb4acdc0] profile High, level 5.0, 4:2:0, 8-bit
    [libx264 @ 00000218cb4acdc0] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'Videos/ScreenCapture24.mp4':
     Metadata:
       encoder         : Lavf58.37.100
       Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s
       Metadata:
         encoder         : Lavc58.67.101 aac
       Stream #0:1: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 2560x1080 [SAR 1:1 DAR 64:27], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
       Metadata:
         encoder         : Lavc58.67.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    [matroska,webm @ 00000218cb44af00] File ended prematurely
    frame=  297 fps=113 q=-1.0 Lsize=    2325kB time=00:01:09.07 bitrate= 275.8kbits/s dup=22 drop=0 speed=26.2x    
    video:1713kB audio:591kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.900237%
    [aac @ 00000218cb4ab780] Qavg: 24995.135
    [libx264 @ 00000218cb4acdc0] frame I:4     Avg QP:15.13  size:199596
    [libx264 @ 00000218cb4acdc0] frame P:85    Avg QP:21.15  size:  9466
    [libx264 @ 00000218cb4acdc0] frame B:208   Avg QP:24.93  size:   725
    [libx264 @ 00000218cb4acdc0] consecutive B-frames:  5.1%  2.7%  6.1% 86.2%
    [libx264 @ 00000218cb4acdc0] mb I  I16..4: 48.0% 45.3%  6.7%
    [libx264 @ 00000218cb4acdc0] mb P  I16..4:  1.6%  1.9%  0.8%  P16..4:  1.4%  0.4%  0.3%  0.0%  0.0%    skip:93.7%
    [libx264 @ 00000218cb4acdc0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8:  3.0%  0.1%  0.0%  direct: 0.0%  skip:96.6%  L0:51.2% L1:48.3% BI: 0.6%
    [libx264 @ 00000218cb4acdc0] 8x8 transform intra:44.4% inter:69.1%
    [libx264 @ 00000218cb4acdc0] coded y,uvDC,uvAC intra: 23.8% 27.4% 19.5% inter: 0.2% 0.3% 0.1%
    [libx264 @ 00000218cb4acdc0] i16 v,h,dc,p: 54% 45%  1%  0%
    [libx264 @ 00000218cb4acdc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 20% 41%  2%  2%  1%  2%  1%  5%
    [libx264 @ 00000218cb4acdc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 35% 17%  2%  3%  3%  4%  2%  4%
    [libx264 @ 00000218cb4acdc0] i8c dc,h,v,p: 61% 25% 11%  2%
    [libx264 @ 00000218cb4acdc0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 00000218cb4acdc0] ref P L0: 68.0%  6.3% 16.6%  9.1%
    [libx264 @ 00000218cb4acdc0] ref B L0: 70.2% 23.7%  6.1%
    [libx264 @ 00000218cb4acdc0] ref B L1: 91.1%  8.9%
    [libx264 @ 00000218cb4acdc0] kb/s:1415.80