Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (104)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (9164)

  • Remove black frames and sync audio with ffmpeg

    24 janvier 2020, par rahim123

    I’m trying to figure out a way to automatically process .mp4 or .mkv videos that have been manually edited to remove a bunch of segments, leaving many blank spaces (black frames with no audio). I want to remove all but one black frame (although I would settle for removing all of them if it’s much simpler) and then also sync the audio after the video timings change.

    I found this question and tried the three main suggestions :

    1. ffmpeg -i in.mkv -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mkv
    2. ffmpeg -i in.mkv -vf [mpdecimate][] out.mkv
    3. ffmpeg -i in.mkv -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mkv

    The first one does eliminate the black segments, but it doesn’t sync the audio. The other two commands don’t work :

    > ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
    ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9 (SUSE Linux)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.20.100
     Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [AVFilterGraph @ 0x55ece8def080] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0
    [aac @ 0x55ece8c5be80] Qavg: 222.643
    [aac @ 0x55ece8c5be80] 2 frames left in the queue on closing
    Conversion failed!
    > ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
    ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9 (SUSE Linux)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.20.100
     Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [AVFilterGraph @ 0x558b0d48af80] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0
    [aac @ 0x558b0d2f7e80] Qavg: 222.643
    [aac @ 0x558b0d2f7e80] 2 frames left in the queue on closing
    Conversion failed!

    I also tried this script, but it also fails to sync the audio. I tried with both .mp4 and .mkv source files. Thanks for the help.

  • Trying to concatenate 11 seconds of black video onto the end of a 5 min video. Getting non-monotonous DTS in output stream error

    14 janvier 2020, par TidusWulf

    I have a video shot from my smartphone that is 3840x2160@57.74. Originally, it was exactly 5 minutes long. I replaced the audio with a music file that is 5 minutes and 11 seconds using ffmpeg -i video.mp4 -i audio.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4 I expected 11 seconds of black at the end, but instead the video output freezes on the last frame for 11 seconds. There’s definitely something funky going on because when I try to upload to youtube, it only sees the first 5 minutes. The last 10 seconds of audio get dropped.

    I tried making a second black clip with ffmpeg -f lavfi -i color=c=black:s=uhd2160:r=57.74 -t 11 -pix_fmt yuv420p blk2.mp4. When I try to concat the two files with ffmpeg -f concat -safe 0 -i list.txt -c copy teacup6.mp4 I get a huge list of errors such as [mp4 @ 00000166fda994c0] Non-monotonous DTS in output stream 0:0; previous: 27002920, current: 3728954; changing to 27002921. This may result in incorrect timestamps in the output file. for what appears to be about 11 seconds worth of frames, so basically the entire 11 second black clip. When I play it in VLC it goes black, but I suspect it’s not actually processing/playing 11 seconds of good black video because if I click along the track timeline, visual glitches start happening in the canvas.

    Here is what ffmpeg tells me about my inputs and outputs as far as framerate, pixel format, etc.

    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000239e6cb2880] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'list.txt':
     Duration: N/A, start: -0.023021, bitrate: 72244 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 71994 kb/s, SAR 1:1 DAR 16:9, 57.74 fps, 59 tbr, 90k tbn, 180k tbc
       Metadata:
         handler_name    : VideoHandle
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 250 kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, mp4, to 'teacup5.mp4':
     Metadata:
       encoder         : Lavf58.35.102
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 71994 kb/s, 57.74 fps, 59 tbr, 90k tbn, 90k tbc
       Metadata:
         handler_name    : VideoHandle
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 250 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help

    alternatively, I tried to make a black 3840x2160 png file and create an 11 second slideshow. It didn’t turn out any better. I tried a single image for 11 seconds @ 57.74fps, I also tried a looping slideshow of that one image, looping on every single frame, at 57.74 fps. I should note that wether a slideshow or a color generator, the filesize for the 11 seconds of black comes out to about 160KB. Strangely small in my opinion, but I was chalking it up to a good compression algorithm.

    I tried to do this in Da Vinci Resolve 16.1 instead and the video wouldn’t play. I also couldn’t find a way to maintain the same unusual 57.74 framerate with the free version, so it was undesirable anyway. I tried to re-process using Handbrake, but it threw an error. The output of the Handbrake processed video file also gets stuck on the last frame of the video, instead of going to black.

  • FFmpeg : Pure white image becomes gray after overlaying

    17 décembre 2019, par hanswim

    I am using FFmpeg to overlay a sticker image to another image. The problem is, the pure white sticker image becomes gray after overlaying. Here is my command :

    -i, input.jpg, -i, white.png, -filter_complex, [1]scale=162:63[v1];[0][v1]overlay=125:337[v2], -map, [v2], -map, 0:a?, output.jpg

    The input.jpg and the white.png are both pure white image. I create the pure white image by taking a screen shot of an empty website, and I confirm it’s pure white by Color Meter(RGB=255,255,255).

    After running the command, the output image :

    ffmpeg output image

    I have searched Google and tried many ways like -color_range 2, format=rgb24, -pix_fmt rgb24, but none work for me. (Maybe I haven’t use it in the right way.)

    Anyone can help me ? Thanks a lot !