Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (50)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10425)

  • Can't synchronize frame from two webcam streams side by side using ffmpeg

    15 juin 2019, par Peppe

    i’m trying to stream two webcam in sbs mode using ffmpeg websocket.

    It works but there is a delay of some second between the two scene.

    Here is what I do :

    ffmpeg -f v4l2   -framerate 30 -video_size 1280x720 -input_format mjpeg
    -i /dev/video1 -f v4l2 -framerate 30  -input_format mjpeg
    -video_size 1280x720 -i /dev/video0 -filter_complex "
    [0:v][1:v]hstack [left+right]" -map [left+right] -r 30 -fflags nobuffer
    -f mpegts -codec:v mpeg1video -s 2560x720 -b:v 800k -bf 0 http://localhost:8081/secretsecret

    And this is the output :

    ffmpeg version 4.1.3-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
     configuration: --prefix=/usr --extra-version=0ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable- libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, video4linux2,v4l2, from '/dev/video2':
       Duration: N/A, start: 9539.835119, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
    Input #1, video4linux2,v4l2, from '/dev/video4':
     Duration: N/A, start: 9541.474622, bitrate: N/A
       Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 (mjpeg) -> hstack:input0
     Stream #1:0 (mjpeg) -> hstack:input1
     hstack -> Stream #0:0 (mpeg1video)
    Press [q] to stop, [?] for help
    [swscaler @ 0x55aa2c266f00] deprecated pixel format used, make sure you did set range correctly
    Output #0, mpegts, to 'http://localhost:8081/supersecret':
     Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mpeg1video, yuv420p, 2560x720, q=2-31, 800 kb/s, 25 fps, 90k tbn, 25 tbc (default)
    Metadata:
     encoder         : Lavc58.35.100 mpeg1video
    Side data:
     cpb: bitrate max/min/avg: 0/0/800000 buffer size: 0 vbv_delay: -1
    [video4linux2,v4l2 @ 0x55aa2c1d4e40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)

    It works but there is a delay of 1 second between the two screens.

    also tried with :

    ffmpeg -f v4l2 -framerate 25 -video_size 1280x720 -input_format mjpeg -i \
    /dev/video2 -f v4l2 -framerate 25  -input_format mjpeg -video_size 1280x720 \
    -i /dev/video4 -filter_complex " \
    nullsrc=size=2560x720 [background]; \
    [0:v] setpts=PTS-STARTPTS, scale=1280x720 [left]; \
    [1:v] setpts=PTS-STARTPTS, scale=1280x720 [right]; \
    [background][left]       overlay=shortest=1       [background+left]; \
    [background+left][right] overlay=shortest=1:x=1280 [left+right] \
    " -map [left+right] -f mpegts -codec:v mpeg1video -s 2560x720 -b:v 800k -bf 0     http://localhost:8081/supersecret

    but same problem....
    How can I fix ?

  • subprocess call of ffmpeg returns negative value

    11 juin 2019, par Zak44

    Here is the original command line call that works at shell :

    ffmpeg -i /Users/abc/Desktop/Test/Full_Mov.mov -vf "drawtext=fontfile=/System/Library/Fonts/Keyboard.ttf: text='SCENE BLAH BLAH - %{frame_num}': start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: fontsize=20: box=1: boxcolor=black: boxborderw=5","format=yuv420p" -f segment -segment_frames 123 -reset_timestamps 1 -c:a copy -map 0 "/Users/abc/Desktop/Test/%03d_test40.mov"

    Getting a negative value when trying to run ffmpeg via subprocess, causing it to fail and not process. I’ve even tried dumbing down the call to just run ffmpeg by itself with no arguments, and it still returns a negative value.

    import subprocess
    ffmpeg = "/usr/local/bin/ffmpeg"
    source = "/Users/abc/Desktop/Test/Full_Mov.mov"
    destination = "/Users/abc/Desktop/Test/%03d_test40.mov"
    cmd = "%s -i %s -vf \"drawtext=fontfile=/System/Library/Fonts/Keyboard.ttf: text='SCENE BLAH BLAH - %%{frame_num}': start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5\",\"format=yuv420p\" -f segment -segment_frames 123 -reset_timestamps 1 -c:a copy -map 0 \"%s\"" % (ffmpeg, source, destination)
    log("ffmpeg cmd: %s" % cmd)
    log(subprocess.check_output(cmd, shell=True))

    When running full command :

    CalledProcessError: Command '/usr/local/bin/ffmpeg -i /Users/abc/Desktop/Full_Mov.mov -vf "drawtext=fontfile=/System/Library/Fonts/Keyboard.ttf: text='SCENE BLAH BLAH - %{frame_num}': start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5","format=yuv420p" -f segment -segment_frames 318 -reset_timestamps 1 -c:a copy -map 0 "/Users/abc/Desktop/Test/%03d.tmp.mov"' returned non-zero exit status -8
       raise CalledProcessError(retcode, cmd, output=output)

    When running just ffmpeg no arguments :

    CalledProcessError: Command '/usr/local/bin/ffmpeg' returned non-zero exit status 1
       raise CalledProcessError(retcode, cmd, output=output)

    Latest output with suggested changes below :

    subprocess.CalledProcessError: Command '['/usr/local/bin/ffmpeg', '-i', '/Users/szaharak/Desktop/Flix_Test/ep888_sq66_main_mov_2019_05_20_14_15.mov', '-vf', 'drawtext=fontfile=/System/Library/Fonts/Keyboard.ttf:', 'text=SCENE BLAH BLAH - %%{frame_num}:', 'start_number=1:', 'x=(w-tw)/2:', 'y=h-(2*lh):', 'fontcolor=black:', 'fontsize=20:', 'box=1:', 'boxcolor=white:', 'boxborderw=5', 'format=yuv420p', '-f', 'segment', '-segment_frames', '123', '-reset_timestamps', '1', '-c:a', 'copy', '-map', '0', '/Users/szaharak/Desktop/Flix_Test/%03d_test40.mov']' returned non-zero exit status 1

    [NULL @ 0x7f88c3012200] Unable to find a suitable output format for 'text=SCENE BLAH BLAH - %%{frame_num}:'
    text=SCENE BLAH BLAH - %%{frame_num}:: Invalid argument

    And here is latest...

       >>> rc = subprocess.check_call(cmd)
    ffmpeg version N-93891-ge1839283bc-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay

     libavutil      56. 28.100 / 56. 28.100
     libavcodec     58. 52.102 / 58. 52.102
     libavformat    58. 27.103 / 58. 27.103
     libavdevice    58.  7.100 / 58.  7.100
     libavfilter     7. 53.101 /  7. 53.101
     libswscale      5.  4.101 /  5.  4.101
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/szaharak/Desktop/Flix_Test/ep888_sq66_main_mov_2019_05_20_14_15.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2019-05-14T17:58:24.000000Z
       com.apple.quicktime.player.movie.audio.gain: 1.000000
       com.apple.quicktime.player.movie.audio.treble: 0.000000
       com.apple.quicktime.player.movie.audio.bass: 0.000000
       com.apple.quicktime.player.movie.audio.balance: 0.000000
       com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
       com.apple.quicktime.player.movie.audio.mute:
       com.apple.quicktime.player.movie.visual.brightness: 0.000000
       com.apple.quicktime.player.movie.visual.color: 1.000000
       com.apple.quicktime.player.movie.visual.tint: 0.000000
       com.apple.quicktime.player.movie.visual.contrast: 1.000000
       com.apple.quicktime.player.version: 7.6.6 (7.6.6)
       com.apple.quicktime.version: 7.7.3 (2943.14) 0x7738000 (Mac OS X, 10.11.6, 15G22010)
     Duration: 00:01:12.67, start: 0.000000, bitrate: 23379 kb/s
       Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 21838 kb/s, 24 fps, 24 tbr, 24k tbn, 24k tbc (default)
       Metadata:
         creation_time   : 2019-05-14T17:58:24.000000Z
         handler_name    : Apple Video Media Handler
         encoder         : Photo - JPEG
       Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default)
       Metadata:
         creation_time   : 2019-05-14T17:58:24.000000Z
         handler_name    : Apple Sound Media Handler
    [NULL @ 0x7f8ddc8ce200] Unable to find a suitable output format for 'text=SCENE BLAH BLAH - %{frame_num}: start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5: format=yuv420p'
    text=SCENE BLAH BLAH - %{frame_num}: start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5: format=yuv420p: Invalid argument
    Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
       raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/local/bin/ffmpeg', '-i', '/Users/szaharak/Desktop/Flix_Test/ep888_sq66_main_mov_2019_05_20_14_15.mov', '-vf', 'drawtext=fontfile=/System/Library/Fonts/Keyboard.ttf:', 'text=SCENE BLAH BLAH - %{frame_num}: start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5: format=yuv420p', '-f', 'segment', '-segment_frames', '123', '-reset_timestamps', '1', '-c:a', 'copy', '-map', '0', '/Users/szaharak/Desktop/Flix_Test/%03d_test40.mov']' returned non-zero exit status 1
    </module></stdin>
  • Ffmpeg stream stops after a couple of seconds

    28 juin 2019, par Connor Woodford

    I have an http stream of an mkv file that I am trying to transcode to mp4 via ffmpeg. Here is the command I enter to start the stream ffmpeg -i "input.mkv" -f mpeg1video -vf "scale=640:480" -r 20 "http://localhost:port". The stream starts fine. Here is what the stream gives me at first :

    Metadata:
         title           : Chapter 17
       Stream #0:0(eng): Video: mpeg1video, yuv420p, 640x480 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc
       Metadata:
         BPS-eng         : 31632108
         DURATION-eng    : 02:03:42.289875000
         NUMBER_OF_FRAMES-eng: 177957
         NUMBER_OF_BYTES-eng: 29347831113
         SOURCE_ID-eng   : 001011
         _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.2 win(x64-release)
         _STATISTICS_WRITING_DATE_UTC-eng: 2019-06-18 22:53:22
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
         encoder         : Lavc58.31.102 mpeg1video
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    frame=  111 fps=0.0 q=6.2 size=     212kB time=00:00:04.54 bitrate= 382.2kbits/s speed=8.82x

    but after this shows up it hangs for a while then it gives me this :

    av_interleaved_write_frame(): Unknown errorime=00:00:05.24 bitrate= 788.3kbits/s speed=10.5x
    Error writing trailer of http://192.168.1.19:4012: Error number -10054 occurred
    frame=  128 fps=1.1 q=12.1 Lsize=     646kB time=00:00:05.84 bitrate= 905.0kbits/s speed=0.0487x
    video:343kB audio:274kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.639489%
    [http @ 000001cb1fdac780] URL read error:  -10054
    Conversion failed!

    Here is my http server in node.js :

    const express = require('express')
    const port = port
    var ffmpeg = require('ffmpeg');
    var http = require('http')

    var server = http.createServer(function(req, res) {
       res.writeHead(200, {'Content-Type': 'video/mp4'});
    })

    server.listen(port, 'ipAddress')
    console.log(`Example app on port ${port}!`);