Recherche avancée

Médias (91)

Autres articles (91)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (13783)

  • ffmpeg concat vertical video, different dimensions [duplicate]

    16 octobre 2020, par Morris

    Context :
3 input videos :

    


    foo.mov : 1080x1920 (vertical, NOT horizontal) with audio.

    


    bar.mp4 and fiz.mp4 : 480x360, with audio.
(Note : .mp4, differs from .mov)

    


    Goal : to concat all 3 videos. Output out.mp4 should be 480x360. Squeeze foo.mov but keep its aspect ratio, taking up 100% height, but the slim video should stand only in the center, with left and right sides being black (or other color) void. foo.mov should not be cropped.

    


    I currently have this command below (added new-line characters for better visualization) for concating, but need to fill the missing code at PLACEHOLDER1 to generate v0, such that v0 is resized to 480x360 like described above. If my attempt so far is correct, please help complete PLACEHOLDER1 ; else, please offer a better solution with explanation.

    


    ffmpeg 
-r 24 -i foo.mov 
-r 24 -i bar.mp4 
-r 24 -i fiz.mp4
-filter_complex 
"[0:v] PLACEHOLDER1 [v0];
[v0][1][2] concat=n=3:v=1:a=1 [v][a]" 
-map "[v]" -map "[a]" out.mp4


    


    Running

    


    ffmpeg -n -i foo.MOV -i bar.mp4 -i fiz.mp4


    


    gives this info :

    


    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  [...configuration omitted...]
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'foo.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : [omitted]
    com.apple.quicktime.make: [omitted]
    com.apple.quicktime.model: [omitted]
    com.apple.quicktime.software: [omitted]
    com.apple.quicktime.creationdate: [omitted]
  Duration: 00:00:04.71, start: 0.000000, bitrate: 17579 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17492 kb/s, 24 fps, 24 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : [omitted]
      handler_name    : Core Media Video
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Audio
    Stream #0:2(und): Data: none (mebx / 0x7862656D), 9 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Metadata
    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Metadata

Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'bar.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:01.94, start: 0.000000, bitrate: 641 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 480x360 [SAR 1:1 DAR 4:3], 354 kb/s, 24.58 fps, 24.58 tbr, 113734695.00 tbn, 49.16 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 280 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'fiz.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:01.98, start: 0.000000, bitrate: 725 kb/s
    Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 480x360 [SAR 1:1 DAR 4:3], 442 kb/s, 24.58 fps, 24.58 tbr, 113734695.00 tbn, 49.16 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 278 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


    


  • FFmpeg unexpected behavior using -loop flag

    7 décembre 2020, par all jazz

    Dear hackers of the world !

    


    I've been trying to use the beloved FFmpeg library to create a video from an image loop and audio using the famous Docker FFmpeg image, but it has been driving me crazy not producing the expected results (the results that I get when I run the ffmpeg command with the equivalent version on my Macbook).

    


    Here is the command :

    


    docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:4.3-alpine \
    -y \
    -stats \
    -loop 1 -i files/image.jpg \
    -i files/a.mp3 \
    -c:v libx265 -pix_fmt yuv420p10 \
    -c:a aac \
    -movflags +faststart \
    -shortest \
    -f mp4 test.mp4


    


    It should create a test.mp4 with the provided audio and image that is ready to be uploaded to the unfortunate Youtube.

    


    When I do this, the video seems to be lacking moov atoms (if I try to analyse it). Strangely enough, if I run this two times using the Docker image (overriding the same file), the video file will magically start to work.

    


    I also tried using different ffmpeg os images and versions. It seems that ffmpeg docummentation and code repo could also benefit from some care and love.

    


    What else I could do to get this fixed ?

    


    Here is the output from the console :

    


            -y \
        -stats \
        -loop 1 -i files/image.jpg \
        -i files/a.mp3 \
        -c:v libx265 -pix_fmt yuv420p10 \
        -c:a aac \
        -movflags +faststart \
        -shortest \
        -f mp4 test30.mp4
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 6.4.0 (Alpine 6.4.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, image2, from 'files/image.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 34300 kb/s
    Stream #0:0: Video: mjpeg, gray(bt470bg/unknown/unknown), 500x500 [SAR 240:240 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, mp3, from 'files/a.mp3':
  Metadata:
    title           : Visions
    artist          : Hattori Hanzo
    album           : Visions
    encoded_by      : Fission
    encoder         : Lavf58.45.100
    TLEN            : 16039
    track           : 1
  Duration: 00:00:16.04, start: 0.000000, bitrate: 199 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 191 kb/s
    Stream #1:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 500x500 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Other
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> hevc (libx265))
  Stream #1:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.1.1+1-04b37fdfd2dc
x265 [info]: build info [Linux][GCC 6.4.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra
x265 [info]: tools: strong-intra-smoothing deblock sao
Output #0, mp4, to 'test30.mp4':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: hevc (libx265) (hev1 / 0x31766568), yuv420p10le(progressive), 500x500 [SAR 1:1 DAR 1:1], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.91.100 libx265
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.91.100 aac
frame=   52 fps=0.0 q=33.0 size=       0kB time=00:00:00.80 bitrate=   0.4kbits/frame=  120 fps=119 q=33.0 size=       0kB time=00:00:03.52 bitrate=   0.1kbits/frame=  190 fps=125 q=33.0 size=       0kB time=00:00:06.33 bitrate=   0.1kbits/frame=  257 fps=127 q=33.0 size=       0kB time=00:00:09.00 bitrate=   0.0kbits/frame=  303 fps=120 q=35.0 size=     256kB time=00:00:10.86 bitrate= 193.0kbits/frame=  373 fps=123 q=36.0 size=     256kB time=00:00:13.65 bitrate= 153.6kbits/[mp4 @ 0x55d481bc6980] Starting second pass: moving the moov atom to the beginning of the file
frame=  432 fps=121 q=36.0 Lsize=     379kB time=00:00:17.16 bitrate= 180.8kbits/s speed= 4.8x
video:107kB audio:255kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 4.667185%
x265 [info]: frame I:      2, Avg QP:23.55  kb/s: 8634.80
x265 [info]: frame P:    147, Avg QP:33.00  kb/s: 13.49
x265 [info]: frame B:    283, Avg QP:35.71  kb/s: 8.06
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 34.2% 10.1% 20.8% 1.3% 33.6%

encoded 432 frames in 3.56s (121.32 fps), 49.84 kb/s, Avg QP:34.73
[aac @ 0x55d481b23ac0] Qavg: 563.168```


    


  • How can I add video time to ffmpeg filename ? [duplicate]

    28 décembre 2020, par Eren Güven

    I'm extracting frames from a video at 1 frame every 5 seconds using

    


    ffmpeg -i vid.mp4 -r 0.2 frames/frame_%04d.png


    


    and I want to add in-video time (ie. time elapsed since beginning of video at x1 speed) to the filename (not timestamp like asked in related questions). Something that could be like

    


    frame_0001_0000.png, frame_0002_0005.png, frame_0003_0010.png, ...
# would stand for
# frame #1 at 00:00, frame #2 at 00:05, frame #3 at 00:10, ...


    


    Since the ffmpeg prints this information while processing, I thought this would be possible ? I don't want to rely on (frame_number * 1/r) since there are usually a few extra frames making the result off.

    


    Thanks in advance.