Recherche avancée

Médias (91)

Autres articles (69)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (6800)

  • What is the best way to split videos into equally sized parts using ffmpeg ? [closed]

    18 juin 2024, par GBPU

    I have tried to split an mp4 file into smaller parts of equal time length like this ffmpeg -i ../data/2024-06-02_12-34-51.mp4 -c copy -map 0 -segment_time 00:00:05 -f segment v1_%03d.mp4. However, this produced videos of highly variables size, some 25x larger than others. I assume this was due to inconsistent framerate during recording.

    &#xA;

    Next, I tried a script that would split based and limit each part to a specific size :

    &#xA;

    #!/bin/sh&#xA;# Short script to split videos by filesize using ffmpeg by LukeLR&#xA;&#xA;if [ $# -ne 3 ]; then&#xA;    echo &#x27;Illegal number of parameters. Needs 3 parameters:&#x27;&#xA;    echo &#x27;Usage:&#x27;&#xA;    echo &#x27;./split-video.sh FILE SIZELIMIT "FFMPEG_ARGS&#x27;&#xA;    echo &#xA;    echo &#x27;Parameters:&#x27;&#xA;    echo &#x27;    - FILE:        Name of the video file to split&#x27;&#xA;    echo &#x27;    - SIZELIMIT:   Maximum file size of each part (in bytes)&#x27;&#xA;    echo &#x27;    - FFMPEG_ARGS: Additional arguments to pass to each ffmpeg-call&#x27;&#xA;    echo &#x27;                   (video format and quality options etc.)&#x27;&#xA;    exit 1&#xA;fi&#xA;&#xA;FILE="../data/$1"&#xA;SIZELIMIT="$2"&#xA;FFMPEG_ARGS="$3"&#xA;&#xA;# Duration of the source video&#xA;DURATION=$(ffprobe -i "$FILE" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1|cut -d. -f -2)&#xA;&#xA;# Duration that has been encoded so far&#xA;CURDURATION=0&#xA;&#xA;# Filename of the source video (without extension)&#xA;BASENAME="${FILE%.*}"&#xA;&#xA;# Extension for the video parts&#xA;#EXTENSION="${FILE##*.}"&#xA;EXTENSION="mp4"&#xA;&#xA;# Number of the current video part&#xA;i=1&#xA;&#xA;# Filename of the next video part&#xA;NEXTFILENAME="$BASENAME-$i.$EXTENSION"&#xA;&#xA;echo "Duration of source video: $DURATION"&#xA;&#xA;# Until the duration of all partial videos has reached the duration of the source video&#xA;#while [[ $CUR_DURATION -lt $DURATION ]]; do&#xA;while [[ $(bc &lt;&lt;&lt; "$CURDURATION &lt; $DURATION") -eq 1 ]]; do&#xA;    # Encode next part&#xA;    echo ffmpeg -i "$FILE" -ss "$CURDURATION" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"&#xA;    ffmpeg -ss "$CURDURATION" -i "$FILE" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"&#xA;&#xA;    # Duration of the new part&#xA;    NEWDURATION=$(ffprobe -i "$NEXTFILENAME" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1|cut -d. -f -2)&#xA;&#xA;    # Total duration encoded so far&#xA;    echo $CURDURATION&#xA;    CURDURATION=$(bc &lt;&lt;&lt; "$CURDURATION &#x2B; $NEWDURATION")&#xA;    echo $CURDURATION&#xA;&#xA;    i=$((i &#x2B; 1))&#xA;&#xA;    echo "Duration of $NEXTFILENAME: $NEWDURATION"&#xA;    echo "Part No. $i starts at $CURDURATION"&#xA;    echo "Current Duration: $CURDURATION"&#xA;&#xA;    NEXTFILENAME="$BASENAME-$i.$EXTENSION"&#xA;done&#xA;

    &#xA;

    I call the script like this : bash split-video.sh 2024-06-02_12-34-51.mp4 10000000 "-c copy"&#xA;Unfortunately, this has an issue where some of the sub videos are extremely short and have wildly inconsistent numbers of frames in them (some with nearly 400, others with 1), despite being similar sizes. I am guessing this has something to do with inconsistent framerate and keyframes or something ?

    &#xA;

    I am curious what the best way to split a video into equally sized parts, and ideally with similar numbers of frames, is using ffmpeg.

    &#xA;

  • ffmpeg : getting larger gif file after optimization [closed]

    28 août 2024, par xaxa

    I'm trying to use ffmpeg to reduce the size of GIF images by lowering fps and color palette size. This is the command I use :

    &#xA;

    ffmpeg -i initial.gif -filter_complex "[0]fps=${fps},split[m][t];[t]palettegen=max_colors=${max_colors}[p];[m][p]paletteuse" output.gif&#xA;

    &#xA;

    however, for some reason I'm getting larger files even if I do something as stupid as fps=1, max_colors=4.

    &#xA;

    here's the initial file :&#xA;enter image description here

    &#xA;

    here's what I've got after the transformation :&#xA;enter image description here

    &#xA;

    the command was :

    &#xA;

    ffmpeg -i eglite.gif -filter_complex "[0]fps=1,split[m][t];[t]palettegen=max_colors=4[p];[m][p]paletteuse" output.gif&#xA;

    &#xA;

    and the sizes I get are :

    &#xA;

    -rw-r--r-- 1 work work    15860 Aug 26 11:30 eglite.gif&#xA;-rw-r--r-- 1 work work    21395 Aug 28 21:35 output.gif&#xA;

    &#xA;

    Here's my ffmpeg version :

    &#xA;

    ffmpeg version n7.0.2 Copyright (c) 2000-2024 the FFmpeg developers&#xA;built with gcc 14.2.1 (GCC) 20240805&#xA;configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan&#xA;libavutil      59.  8.100 / 59.  8.100&#xA;libavcodec     61.  3.100 / 61.  3.100&#xA;libavformat    61.  1.100 / 61.  1.100&#xA;libavdevice    61.  1.100 / 61.  1.100&#xA;libavfilter    10.  1.100 / 10.  1.100&#xA;libswscale      8.  1.100 /  8.  1.100&#xA;libswresample   5.  1.100 /  5.  1.100&#xA;libpostproc    58.  1.100 / 58.  1.100&#xA;

    &#xA;

  • How to convert rtmp hevc video stream to srt av1 endpoint with ffmpeg ?

    20 juin 2024, par Lulík

    i want use ffmpeg to listen rtmp stream and send to srt endpoint.

    &#xA;

    Flow : smartphone (camera) -> laptop (ffmpeg script) -> desktop (obs studio)

    &#xA;

    ffmpeg script show warning message and in obs stuido i can see any video only audio.

    &#xA;

    Thank you in advance.

    &#xA;

    Console output while running script (error in the end is bcs i stoped sending data from phone) :

    &#xA;

    ffmpeg version git-2024-06-20-8d6014d Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 12 (Debian 12.2.0-14)&#xA;  configuration: --enable-libsvtav1 --enable-libsrt&#xA;  libavutil      59. 24.100 / 59. 24.100&#xA;  libavcodec     61.  8.100 / 61.  8.100&#xA;  libavformat    61.  3.104 / 61.  3.104&#xA;  libavdevice    61.  2.100 / 61.  2.100&#xA;  libavfilter    10.  2.102 / 10.  2.102&#xA;  libswscale      8.  2.100 /  8.  2.100&#xA;  libswresample   5.  2.100 /  5.  2.100&#xA;Input #0, flv, from &#x27;rtmp://192.168.0.194/s/streamKey&#x27;:&#xA;  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: hevc (Main), yuv420p(tv, smpte170m/bt470bg/smpte170m), 1080x1920, 10240 kb/s, 30 fps, 120 tbr, 1k tbn&#xA;  Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 131 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (native) -> av1 (libsvtav1))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))&#xA;Press [q] to stop, [?] for help&#xA;Svt[info]: -------------------------------------------&#xA;Svt[info]: SVT [version]:   SVT-AV1 Encoder Lib 595a874&#xA;Svt[info]: SVT [build]  :   GCC 12.2.0   64 bit&#xA;Svt[info]: LIB Build date: Jun 20 2024 14:25:08&#xA;Svt[info]: -------------------------------------------&#xA;Svt[info]: Number of logical cores available: 12&#xA;Svt[info]: Number of PPCS 76&#xA;Svt[info]: [asm level on system : up to avx2]&#xA;Svt[info]: [asm level selected : up to avx2]&#xA;Svt[info]: -------------------------------------------&#xA;Svt[info]: SVT [config]: main profile   tier (auto) level (auto)&#xA;Svt[info]: SVT [config]: width / height / fps numerator / fps denominator       : 1080 / 1920 / 120 / 1&#xA;Svt[info]: SVT [config]: bit-depth / color format                   : 8 / YUV420&#xA;Svt[info]: SVT [config]: preset / tune / pred struct                    : 10 / PSNR / random access&#xA;Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type          : 641 / 16 / key frame&#xA;Svt[info]: SVT [config]: BRC mode / rate factor                     : CRF / 35 &#xA;Svt[info]: SVT [config]: AQ mode / variance boost                   : 2 / 0&#xA;Svt[info]: -------------------------------------------&#xA;Svt[warn]: Failed to set thread priority: Invalid argument&#xA;Output #0, mpegts, to &#x27;srt://192.168.0.167:9998?mode=caller&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf61.3.104&#xA;  Stream #0:0: Video: av1, yuv420p(tv, smpte170m/bt470bg/smpte170m, progressive), 1080x1920, q=2-31, 120 fps, 90k tbn&#xA;      Metadata:&#xA;        encoder         : Lavc61.8.100 libsvtav1&#xA;  Stream #0:1: Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s&#xA;      Metadata:&#xA;        encoder         : Lavc61.8.100 mp2&#xA;[mpegts @ 0x55ec921d9540] Stream 0, codec av1, is muxed as a private data stream and may not be recognized upon reading.&#xA;[in#0/flv @ 0x55ec9219cc40] Error during demuxing: Input/output error1990.7kbits/s speed=0.967x    &#xA;[out#0/mpegts @ 0x55ec922247c0] video:4431KiB audio:1138KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 6.374870%&#xA;frame=  723 fps= 31 q=35.0 Lsize=    5923KiB time=00:00:24.12 bitrate=2011.3kbits/s speed=1.04x&#xA;

    &#xA;

    I send video stream from mobile app over rtmp encoded with hevc to my laptop where running script ffmpeg -f flv -listen 1 -i rtmp://192.168.0.194/s/streamKey -c:v libsvtav1 -f mpegts srt://192.168.0.167:9998?mode=caller. On the desktop i have obs with media source input srt://192.168.0.167:9998?mode=listener.

    &#xA;

    When i run ffmpeg script without video codec option (-c:v libsvtav1) its working fine and in obs i can see video from my phone camera. With the option i can not see video only audio.&#xA;I clearly dont understand warning message : [mpegts @ 0x55ec921d9540] Stream 0, codec av1, is muxed as a private data stream and may not be recognized upon reading..&#xA;Do I need specify codec (av1) in obs media source or my ffmpeg script is wrong ?

    &#xA;