Recherche avancée

Médias (0)

Mot : - Tags -/logo

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

Autres articles (51)

  • 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 audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7927)

  • How to Merge Multiple video files with different resolution, make padding for the low resolution video in android FFMPEG

    12 février 2021, par Osama aman

    I want to merge multiple videos with different resolutions. if the resolution is low than any other video, it should make a black padding around the low resolution video.

    


    I tried this command

    


        var highestVideoWidth: Int = 0&#xA;    var highestVideoHeight: Int = 0&#xA;&#xA;    val mlisst: MutableList<string> = ArrayList()&#xA;    mlisst.clear()&#xA;    mlisst.add("-i")&#xA;    for (i in trimmedPaths.indices) {&#xA;        if (highestVideoWidth &lt; editedVideosList[i].videoWidth &amp;&amp; highestVideoHeight &lt; editedVideosList[i].videoHeight) {&#xA;            highestVideoWidth = editedVideosList[i].videoWidth&#xA;            highestVideoHeight = editedVideosList[i].videoHeight&#xA;        }&#xA;&#xA;        mlisst.add(trimmedPaths[i])&#xA;        if (i &lt; trimmedPaths.size - 1)&#xA;            mlisst.add("-i")&#xA;    }&#xA;    mlisst.add("-filter_complex")&#xA;    val fc = StringBuilder()&#xA;&#xA;    for (i in trimmedPaths.indices) {&#xA;&#xA;        if (editedVideosList[i].videoWidth == highestVideoWidth &amp;&amp; editedVideosList[i].videoHeight == highestVideoHeight){&#xA;            fc.append("[$i:v]scale=${editedVideosList[i].videoWidth}x${editedVideosList[i].videoHeight},setsar=1:1[v$i];")&#xA;        }else{&#xA;            fc.append("[$i:v]scale=iw*min($highestVideoWidth/iw,${highestVideoHeight}/ih):ih*min(${highestVideoWidth}/iw,${highestVideoHeight}/ih),")&#xA;            fc.append("pad=${highestVideoWidth}:${highestVideoHeight}")&#xA;            fc.append(":(${highestVideoWidth}-iw*min(${highestVideoWidth}/iw,${highestVideoHeight}/ih))/2")&#xA;            fc.append(":(${highestVideoHeight}-ih*min(${highestVideoWidth}/iw,${highestVideoHeight}/ih))/2,setsar1:1[v$i];")&#xA;        }&#xA;    }&#xA;&#xA;    for (i in trimmedPaths.indices) {&#xA;        fc.append("[v$i][$i:a]")&#xA;    }&#xA;    fc.append("concat=unsafe=1:n=${trimmedPaths.size}:v=1:a=1")&#xA;    mlisst.add(fc.toString())&#xA;    mlisst.add("-r")&#xA;    mlisst.add("50")&#xA;    mlisst.add("-preset")&#xA;    mlisst.add("ultrafast")&#xA;    mlisst.add(finalMergedVideoPath)&#xA;</string>

    &#xA;

    but this gives me this error

    &#xA;

    Invalid size 'iw*min(1074/iw'&#xA;I found the command some where i modified it to my use but now i am not sure. Here is the command : complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-strict", "experimental", "-filter_complex","[0:v]scale=1920x1080,setsar=1:1[v0];[1:v] scale=iw*min(1920/iw\\,1080/ih):ih*min(1920/iw\\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\\,1080/ih))/2:(1080-ih*min(1920/iw\\,1080/ih))/2,setsar=1:1[v1];[v0][0:a][v1][1:a] concat=n=2:v=1:a=1","-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1920x1080", "-vcodec", "libx264","-crf","27","-q","4","-preset", "ultrafast", rootPath &#x2B; "/output.mp4"};

    &#xA;

    If anyone can help thanks in advance.&#xA;Here is the link to the question i followed

    &#xA;

  • ffmpeg : handle videos with changing resolution

    5 mars 2021, par mSourire

    I write a program, which concatenates input list of videos programmatically. The problem is that these videos are parts of a recorded stream, and their resolution may change few times within the same file.&#xA;Currently, if that happens, ffmpeg fails, saying that it's not possible to concat files with different resolutions. Is there a way to make ffmpeg handling this automatically ? A good solution would be selective scaling of frames with unexpected resolution.

    &#xA;

    Here is a listing :

    &#xA;

    ffmpeg -y -i 1.mkv -i 1.mka&#xA;-max_muxing_queue_size 10000&#xA;-preset veryfast -r 30 -crf 20 -b:a 96000 -vbr on&#xA;-strict experimental&#xA;-filter_complex &#x27;&#xA;color=black:s=320x240:d=7ms[black0];&#xA;aevalsrc=0:d=15ms[silence1];&#xA;[black0][0]concat=n=2:v=1:a=0[video];&#xA;[1][silence1]concat=n=2:v=0:a=1[audio]&#x27;&#xA;-map [video] -map [audio] -c:v libvpx -c:a libopus output.webm&#xA;&#xA;ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, matroska,webm, from &#x27;1.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : GStreamer matroskamux version 1.8.1.1&#xA;    creation_time   : 2021-03-02T13:44:03.000000Z&#xA;  Duration: 00:01:48.41, start: 0.710000, bitrate: 757 kb/s&#xA;    Stream #0:0(eng): Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 120 tbr, 1k tbn, 1k tbc (default)&#xA;    Metadata:&#xA;      title           : Video&#xA;Input #1, matroska,webm, from &#x27;1.mka&#x27;:&#xA;  Metadata:&#xA;    encoder         : GStreamer matroskamux version 1.8.1.1&#xA;    creation_time   : 2021-03-02T13:44:03.000000Z&#xA;  Duration: 00:01:48.40, start: 0.703000, bitrate: 38 kb/s&#xA;    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)&#xA;    Metadata:&#xA;      title           : Audio&#xA;Codec AVOption preset (Configuration preset) specified for output file #0 (output.webm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.&#xA;Stream mapping:&#xA;  Stream #0:0 (vp8) -> concat:in1:v0&#xA;  Stream #1:0 (opus) -> concat:in0:a0&#xA;  concat -> Stream #0:0 (libvpx)&#xA;  concat -> Stream #0:1 (libopus)&#xA;Press [q] to stop, [?] for help&#xA;[libvpx @ 0x7fe08a80bc00] v1.9.0&#xA;[libvpx @ 0x7fe08a80bc00] Bitrate not specified for constrained quality mode, using default of 256kbit/sec&#xA;Output #0, webm, to &#x27;output.webm&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;    Stream #0:0: Video: vp8 (libvpx), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 256 kb/s, 30 fps, 1k tbn, 30 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.91.100 libvpx&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;    Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, flt, 96 kb/s (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.91.100 libopus&#xA;[Parsed_color_0 @ 0x7fe089815940] EOF timestamp not reliable&#xA;[Parsed_concat_2 @ 0x7fe088501980] Input link in0:v0 parameters (size 640x480, SAR 1:1) do not match the corresponding output link in0:v0 parameters (320x240, SAR 1:1)&#xA;[Parsed_concat_2 @ 0x7fe088501980] Failed to configure output pad on Parsed_concat_2&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Invalid argument&#xA;Error while processing the decoded data for stream #0:0&#xA;[libopus @ 0x7fe08a810c00] 1 frames left in the queue on closing&#xA;Conversion failed!&#xA;

    &#xA;

    Here is the only such video with "floating" resolution, which cannot be concatenated with 320x240 color filter.

    &#xA;

  • FFmpeg - Convert video changing resolution and bitrates

    8 avril 2021, par parvares

    I’m trying to convert a video and change these parameters :

    &#xA;

    resolution : from 1.280x720 to 640x360 pixels

    &#xA;

    average bitrate : from 1.410 to 300 kb/s

    &#xA;

    maximum bitrate : from 1.680 to 2500 kb/s

    &#xA;

    Sampling rate : from 48.0 to 44.1 kHz

    &#xA;

    Bit rate audio : 128 kb/s

    &#xA;

    I used this string with ffmpeg vers. 4.3.2-2021-02-20 full build :

    &#xA;

    ffmpeg -i input.mp4 -c:v -vf scale=640:360 libx264 -b:v 300k -maxrate 2500k -bufsize 2500k -crf 25 -c:a -ar 44100 libfdk_aac -b:a 128k output.mp4&#xA;

    &#xA;

    I get the error : “ffmpeg unable to find a suitable output format for scale ‘640:360’ scale 640:360 : invalid argument”. Could you help me please ?

    &#xA;

    Below is the original file analyzed by MediaInfo, thanks !

    &#xA;

    General

    &#xA;

    Complete name : C :\Users\parvares\Desktop\input.mp4&#xA;Format : MPEG-4&#xA;Format profile : Base Media&#xA;Codec ID : isom (isom/iso2/avc1/mp41)&#xA;File size : 424 MiB&#xA;Duration : 38 min 21 s&#xA;Overall bit rate : 1 545 kb/s&#xA;Writing application : Lavf58.64.100

    &#xA;

    Video

    &#xA;

    ID : 1&#xA;Format : AVC&#xA;Format/Info : Advanced Video Codec&#xA;Format profile : High@L3.1&#xA;Format settings : CABAC / 4 Ref Frames&#xA;Format settings, CABAC : Yes&#xA;Format settings, Reference frames : 4 frames&#xA;Codec ID : avc1&#xA;Codec ID/Info : Advanced Video Coding&#xA;Duration : 38 min 21 s&#xA;Bit rate : 1 410 kb/s&#xA;Maximum bit rate : 1 680 kb/s&#xA;Width : 1 280 pixels&#xA;Height : 720 pixels&#xA;Display aspect ratio : 16:9&#xA;Frame rate mode : Constant&#xA;Frame rate : 25.000 FPS&#xA;Color space : YUV&#xA;Chroma subsampling : 4:2:0&#xA;Bit depth : 8 bits&#xA;Scan type : Progressive&#xA;Bits/(Pixel*Frame) : 0.061&#xA;Stream size : 387 MiB (91%)&#xA;Writing library : x264 core 161 r3027 4121277&#xA;Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / 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=1 / keyint=250 / keyint_min=125 / scenecut=40 / intra_refresh=0 / rc_lookahead=125 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1680 / vbv_bufsize=8400 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00&#xA;Color range : Limited&#xA;Color primaries : BT.709&#xA;Transfer characteristics : BT.709&#xA;Matrix coefficients : BT.709&#xA;Codec configuration box : avcC

    &#xA;

    Audio

    &#xA;

    ID : 2&#xA;Format : AAC LC&#xA;Format/Info : Advanced Audio Codec Low Complexity&#xA;Codec ID : mp4a-40-2&#xA;Duration : 38 min 21 s&#xA;Bit rate mode : Constant&#xA;Bit rate : 129 kb/s&#xA;Channel(s) : 2 channels&#xA;Channel layout : L R&#xA;Sampling rate : 48.0 kHz&#xA;Frame rate : 46.875 FPS (1024 SPF)&#xA;Compression mode : Lossy&#xA;Stream size : 35.3 MiB (8%)&#xA;Default : Yes&#xA;Alternate group : 1

    &#xA;