Recherche avancée

Médias (91)

Autres articles (60)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (3826)

  • Multiple trims to a video using ffmpeg generating video with shorter duration than expected [closed]

    9 septembre 2024, par Gerardo

    I have an application that given a video it trims multiple parts of that video using ffmpeg. Each part is cropped, scaled and then concatenated to generate a single video.

    


    To share an example, I have a video of 1 minute and 44 seconds of duration and 60 fps. My goal is to trim 3 parts of the video :

    


      

    • First one between seconds 0 to 44.666
    • 


    • Second one between seconds 44.666 to 74.349
    • 


    • Third one between seconds 74.349 to 103.985
    • 


    


    The ffmpeg command I use to achieve that is the following one :

    


    ffmpeg -y -hide_banner -i bg_720_1280.png -i error.mp4 -filter_complex "
[1:v]trim=0.0:44.666,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_1_0_v];
[1:a]atrim=0.0:44.666,volume=1.0,asetpts=PTS-STARTPTS[crop_1_0_a];
[0:v][crop_1_0_v]overlay=enable='between(t,0,44.666)':x=0.0:y=0.0[crop_1_0_v];
[1:v]trim=44.666:74.349,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_2_0_v];
[1:a]atrim=44.666:74.349,volume=1.0,asetpts=PTS-STARTPTS[crop_2_0_a];
[0:v][crop_2_0_v]overlay=enable='between(t,0,29.683)':x=0.0:y=0.0[crop_2_0_v];
[1:v]trim=74.349:103.985,setpts=PTS-STARTPTS,crop=405.0:720.0:437.5:0.0,scale=-2:1280.0[crop_3_0_v];
[1:a]atrim=74.349:103.985,volume=1.0,asetpts=PTS-STARTPTS[crop_3_0_a];
[0:v][crop_3_0_v]overlay=enable='between(t,0,29.636)':x=0.0:y=0.0[crop_3_0_v];
[crop_1_0_a][crop_2_0_a][crop_3_0_a]concat=n=3:v=0:a=1[a];
[crop_1_0_v][crop_2_0_v][crop_3_0_v]concat=n=3:v=1:a=0[outv];
[a]amix=1:duration=longest[outa]" -map "[outv]" -map "[outa]" -vcodec libx264 -acodec aac -sws_flags lanczos -pix_fmt yuv420p -crf 17 -preset superfast -r 60 test.mp4


    


    Running this command it generates a video of 11 seconds of duration and I'm unable to understand it. What is wrong with the command ? Also I'm open to recommendations of the ffmpeg command in case you find another way more efficient or performant.

    


    I'm using the following FFMPEG version :

    


    ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100


    


    But I got the same issue with static ffmpeg builds

    


    The file bg_720_1280.png is just a transparent image of resolution 720x1280. I think I could achieve the same by using nullsrc filter with that resolution instead of using this background image.

    


  • Nginx - RTMP module - VLC wont start

    15 janvier, par Diana Sari

    Why my vlc only show background colour ?
did i miss something important ?

    


    Im running Nginx with RTMP module on
Linux DESKTOP-RJHVE83 5.15.167.4-microsoft-standard-WSL2 #1 SMP x86_64 GNU/Linux
Kali release : 2024.4 (kali-rolling) WSL on Windows 10 Pro

    


    Screenshot of my VLC

    


    /etc/nginx/nginx.conf
i add this from the default :

    


    rtmp {
    server {
        listen 1935;
        chunk_size 4096;
  allow publish 127.0.0.1;
  deny publish all;

        application live {
            live on;
            record off;
        push rtmp://127.0.0.1/live/stream;
        }
    }
}


    


    Stream my mp4 file using ffmpeg :

    


    


    Kali$> ffmpeg -re -i file.mp4 -c:v libx264 -c:a aac -flvflags no_duration_filesize -f flv rtmp ://localhost:1935/live/

    


    


    VLC on the same machine on WIndows 10 Pro
Open Network Protocol : rtmp ://192.168.1.1:1935/live/

    


    The Vlc Show only Background colour (attach)

    


    -Access.log
172.27.96.1 [14/Jan/2025:14:28:02 +0700] PLAY "live" "" "" - 556 1612142 "" "LNX 9,0,124,2" (25s)
127.0.0.1 [14/Jan/2025:14:28:34 +0700] PUBLISH "live" "" "" - 4573293 529 "" "FMLE/3.0 (compatible ; Lavf61.7." (1m 3s)
172.27.96.1 [14/Jan/2025:14:29:47 +0700] PLAY "live" "" "" - 365 1578527 "" "LNX 9,0,124,2" (1m 43s)

    


    -Error.log
Blank

    


    i tried this on :
Ubuntu Focal 20.04.6 (WSL)
Ubuntu Noble24.04.1 LTS (WSL)
id read 2 tutorials
https://www.hostinger.com/tutorials/how-to-set-up-a-streaming-server
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-video-streaming-server-using-nginx-rtmp-on-ubuntu-20-04

    


  • ffmpeg remote url not working in lambda function

    9 septembre 2024, par Komal

    I have created lambda function to trim video.

    


    I run this command :

    


    /opt/bin/ffmpeg -protocol_whitelist file,http,https,tcp,tls -i 'https://source-bucket.s3.amazonaws.com/1.mp4' -ss 5 -t 10 -loglevel 48 -y -avoid_negative_ts 1 -acodec copy /tmp/output.mp4


    


    It gives following output :

    


    "ffmpeg version 7.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2024 the FFmpeg developers\n  built with gcc 8 (Debian 8.3.0-6)\n  configuration: --enable-gpl --enable-version3
--enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n  libavutil      59.  8.100 / 59.  8.100\n  libavcodec     61.  3.100 / 61.  3.100\n  libavformat    61.  1.100 / 61.  1.100\n  libavdevice    61.  1.100 /
61.  1.100\n  libavfilter    10.  1.100 / 10.  1.100\n  libswscale      8.  1.100 /  8.  1.100\n  libswresample   5.  1.100 /  5.  1.100\n  libpostproc    58.  1.100 / 58.  1.100\nSplitting the commandline.\nReading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,http,https,tcp,tls'.\nReading option '-i' ... matched as input url with argument 'https://source-bucket.s3.amazonaws.com/1.mp4'.\nReading option '-ss' ... matched as option 'ss' (start transcoding at specified time) with argument '50'.\nReading option '-t' ... matched as option 't' (stop transcoding after specified duration) with argument '100'.\nReading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'.\nReading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.\nReading option '-avoid_negative_ts' ... matched as AVOption 'avoid_negative_ts' with argument '1'.\nReading option '-acodec' ... matched as option 'acodec' (alias for -c:a (select encoder/decoder for audio streams)) with argument 'copy'.\nReading option '/tmp/output.mp4' ... matched as output url.\nFinished splitting the commandline.\nParsing a group of options: global .\nApplying option loglevel (set logging level) with argument 48.\nApplying option y (overwrite output files) with argument
1.\nSuccessfully parsed a group of options.\nParsing a group of options: input url https://source-bucket.s3.amazonaws.com/1.mp4.\nSuccessfully parsed a group of options.\nOpening an input file: https://source-bucket.s3.amazonaws.com/1.mp4.\n[AVFormatContext @ 0x70ea0c0] Opening 'https://source-bucket.s3.amazonaws.com/1.mp4' for reading\n"


    


    So, its not going beyond this : 'Opening 'https://source-bucket.s3.amazonaws.com/1.mp4' ; for reading\n'

    


    And after this, it immediately gets out. Need suggestions, where its going wrong. Same command working fine on local computer.

    


    I tried cloudfront and signed url as well, as mentioned in this post : How to read remote video on Amazon S3 using ffmpeg. But it doesnt work with url. Only working when downloaded into tmp folder.

    


    Following is the final log, which you can see is no timeout. It actually finish function execution within 2-3 seconds. I have timeout set for 15 mins to the function which is maximum :
enter image description here

    


    REPORT RequestId: 4acd7b38-017c-4dce-bb65-8f6fd3cf37e0  Duration: 1297.93 ms    Billed Duration: 1298 ms    Memory Size: 1024 MB    Max Memory Used: 103 MB Init Duration: 328.76 ms