Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (66)

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

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

  • mac terminal ffmpeg batch recursive conversion preserving directory structure

    13 avril 2020, par kidnim

    i'm using ffmpeg on mac to batch convert .flv to .mp4 files. i'm trying to find all files in subdirectories of the current directory and save new files in the same directory.

    &#xA;&#xA;

    for instance starting with :

    &#xA;&#xA;

    subdirectory1/video1.flv&#xA;subdirectory1/video2.flv&#xA;subdirectory2/video1.flv&#xA;

    &#xA;&#xA;

    and ending with

    &#xA;&#xA;

    subdirectory1/video1.mp4&#xA;subdirectory1/video2.mp4&#xA;subdirectory2/video1.mp4&#xA;

    &#xA;&#xA;

    i've gotten this far but can't figure out how to save with preserved recursive directories

    &#xA;&#xA;

    for i in  `find -name . "*.flv"`; do ffmpeg -i "$i" "${i%.*}.mp4"; done&#xA;

    &#xA;

  • Mac terminal command to list files and sort by date to use in ffmpeg

    22 septembre 2020, par Jeff

    I am using a gopro to film a bunch of videos. I want to then take those videos directly from the SD card folder and concatenate them into a single video (bypass an editor) by using FFMPEG.

    &#xA;

    I'm currently able to stitch together "chaptered" videos with the following example command on my Mac (10.13) :

    &#xA;

    ffmpeg -f concat -safe 0 -i &lt;(for f in /sdcardfolder/100GOPRO/GH*488.MP4; do echo "file &#x27;$f&#x27;"; done) -c copy /folder/video.mp4

    &#xA;

    The reason for this is that the ffmpeg command requires a text file that looks like this :

    &#xA;

    &#xA;

    file '/folder/GH016992.MP4'&#xA;
    &#xA;file '/folder/GH036990.MP4'&#xA;
    &#xA;...

    &#xA;

    &#xA;

    The real command is this, which generates the list of files in the right format with file in front of each one and can be embedded into the ffmpeg command :

    &#xA;

    for f in /Volumes/GoPro8/DCIM/100GOPRO/GH0*71*.MP4; do echo "file &#x27;$f&#x27;"; done

    &#xA;

    I want to add 2 changes to this :

    &#xA;

      &#xA;
    1. List the files in date order (ascending) : I want the list of files to be in date order. But I can't figure out how to add a -sort or something to the for f in command.

      &#xA;

    2. &#xA;

    3. Allow a more robust set of file matching/filtering : Right now I can add basic regex like GH*488.MP4 or, with chapters which increments the first number, something like GH0[123]488.MP4 would work to just get the first few. But when I change it to be more flexible like GH0[0-9]71[0-9][0-9].MP4 - which would be necessary to match all files that were recorded yesterday, but nothing before then, the command doesn't like this regex. It seems to only accept a *.

      &#xA;

    4. &#xA;

    &#xA;

    I looked at a few examples like https://opensource.com/article/19/6/how-write-loop-bash but there wasn't much more than just listing files.

    &#xA;

    This boils down to a terminal command and isn't really related to FFMPEG but I hope it's helpful context.

    &#xA;

    I imagined it would be something like this, but this definitely doesn't work :

    &#xA;

    for f in (find /Volumes/GoPro8/DCIM/100GOPRO/GH0[0-9]71[0-9][0-9].MP4 -type f | sort); do echo "file &#x27;$f&#x27;"; done

    &#xA;

    I'd appreciate any help ! Thanks !

    &#xA;

    Update

    &#xA;

    It looks like sorting isn't easy with Mac tools so I gave up and wrote a much simpler Ruby script that could execute everything for me. This is not really an answer to my question above but it is a solution.

    &#xA;

    Here I can easily write the text file necessary for ffmpeg and I can also filter files with a regex on the name, filter for a particular date, and size. Then, via the script, simply execute the ffmpeg command with args to concat files. I can also have it immediately resample the file to compress it (gopro videos are giant and I'm ok with a much lower bitrate if I want to save raw footage).

    &#xA;

    I got lucky with this Dir.entries in Ruby - it seems to automatically sort by date ? I don't know how to sort it otherwise.

    &#xA;

    PATH = &#x27;/Volumes/GoPro8/DCIM/100GOPRO/&#x27;&#xA;NEW_FILENAME = &#x27;/folder/new-file.mp4&#x27;&#xA;video_list = &#x27;/folder/ffmpeg-list.txt&#x27;&#xA;&#xA;# create the text file&#xA;File.delete(video_list) if File.exist?(video_list)&#xA;i = 1&#xA;Dir.entries(PATH).each do |f|&#xA;    d = File.mtime(PATH &#x2B; f)&#xA;    size = File.size(PATH &#x2B; f)&#xA;    if f.match(/GH0.*.MP4/) &amp;&amp; d.to_s.match(/2020-07-30/) &amp;&amp; size.to_i &lt; 1000000000&#xA;        puts "#{i}\t#{f}\t#{d}\t#{size}"&#xA;        File.write(video_list, "file #{PATH &#x2B; f}\n", mode: "a")&#xA;        i= i&#x2B;1&#xA;    end&#xA;end&#xA;&#xA;command = "ffmpeg -f concat -safe 0 -i #{video_list} -c copy #{NEW_FILENAME}"&#xA;&#xA;puts "executing concatenate..."&#xA;puts command&#xA;system(command)&#xA;

    &#xA;

  • C++ Boost launching FFMPEG doesnt work, working ok via terminal

    21 juin 2023, par Pit Digger

    I am launching an FFMPEG process from C++ , the command is workign fine from terminal command line, but gives error when laucnhed from code. What could cause this ?

    &#xA;

    Error

    &#xA;

    [AVFilterGraph @ 0x3cfadc0] Error parsing filterchain "[0:v]split=3[v1][v2][v3];[v1]copy[v1out];[v2]scale=w=1280:h=720[v2out];[v3]scale=w=640:h=360[v3out]"&#xA;    &#xA;[AVFilterGraph @ 0x2f9fb00] Error parsing filterchain &#xA;    &#xA;[AVFilterGraph @ 0x3cfadc0] Trailing garbage after a filter: split=3[v1][v2][v3];[v1]copy[v1out];[v2]scale=w=1280:h=720[v2out];[v3]scale=w=640:h=360[v3out]&#xA;

    &#xA;

    Code

    &#xA;

    std::vector args;&#xA;args.push_back("-i"); args.push_back("input.mp4");&#xA;args.push_back("-filter_complex");&#xA;args.push_back("\"[0:v]split=3[v1][v2][v3];[v1]copy[v1out];[v2]scale=w=1280:h=720[v2out];[v3]scale=w=640:h=360[v3out]\"");&#xA;&#xA;args.push_back("-map");  args.push_back("[v1out]");&#xA;args.push_back("-c:v:0");  args.push_back("libx264");&#xA;args.push_back("-x264-params");  args.push_back("\"nal-hrd=cbr:force-cfr=1\"");&#xA;args.push_back("-b:v:0");  args.push_back("1M");&#xA;args.push_back("-maxrate:v:0");  args.push_back("2M");&#xA;args.push_back("-minrate:v:0");  args.push_back("2M");&#xA;args.push_back("-bufsize:v:0");  args.push_back("2M");&#xA;args.push_back("-preset");  args.push_back("fast");&#xA;args.push_back("-g");  args.push_back("48");&#xA;args.push_back("-sc_threshold");  args.push_back("0");&#xA;args.push_back("-keyint_min");  args.push_back("48");&#xA;&#xA;args.push_back("-map");  args.push_back("[v2out]");&#xA;args.push_back("-c:v:1");  args.push_back("libx264");&#xA;args.push_back("-x264-params");  args.push_back("\"nal-hrd=cbr:force-cfr=1\"");&#xA;args.push_back("-b:v:1");  args.push_back("1M");&#xA;args.push_back("-maxrate:v:1");  args.push_back("1M");&#xA;args.push_back("-minrate:v:1");  args.push_back("1M");&#xA;args.push_back("-bufsize:v:1");  args.push_back("1M");&#xA;args.push_back("-preset");  args.push_back("fast");&#xA;args.push_back("-g");  args.push_back("48");&#xA;args.push_back("-sc_threshold");  args.push_back("0");&#xA;args.push_back("-keyint_min");  args.push_back("48");&#xA;&#xA;args.push_back("-map");  args.push_back("[v3out]");&#xA;args.push_back("-c:v:2");  args.push_back("libx264");&#xA;args.push_back("-x264-params");  args.push_back("\"nal-hrd=cbr:force-cfr=1\"");&#xA;args.push_back("-b:v:2");  args.push_back("500K");&#xA;args.push_back("-maxrate:v:2");  args.push_back("500K");&#xA;args.push_back("-minrate:v:2");  args.push_back("500K");&#xA;args.push_back("-bufsize:v:2");  args.push_back("500K");&#xA;args.push_back("-preset");  args.push_back("fast");&#xA;args.push_back("-g");  args.push_back("48");&#xA;args.push_back("-sc_threshold");  args.push_back("0");&#xA;args.push_back("-keyint_min");  args.push_back("48");&#xA;&#xA;args.push_back("-map");  args.push_back("a:0");&#xA;args.push_back("-c:a:0");  args.push_back("aac");&#xA;args.push_back("-b:a:0");  args.push_back("96k");&#xA;args.push_back("-ac");  args.push_back("2");&#xA;args.push_back("-map");  args.push_back("a:0");&#xA;args.push_back("-c:a:1");  args.push_back("aac");&#xA;args.push_back("-b:a:1");  args.push_back("96k");&#xA;args.push_back("-ac");  args.push_back("2");&#xA;args.push_back("-map");  args.push_back("a:0");&#xA;args.push_back("-c:a:2");  args.push_back("aac");&#xA;args.push_back("-b:a:2");  args.push_back("48k");&#xA;args.push_back("-ac");  args.push_back("2");&#xA;&#xA;args.push_back("-avoid_negative_ts");  args.push_back("1");&#xA;args.push_back("-f");  args.push_back("hls");&#xA;args.push_back("-hls_time");  args.push_back("6");&#xA;args.push_back("-hls_list_size");  args.push_back("15");&#xA;args.push_back("-hls_flags");  args.push_back("independent_segments");&#xA;args.push_back("-hls_segment_type");  args.push_back("mpegts");&#xA;args.push_back("-hls_segment_filename");  args.push_back("/output/stream_%v_data%02d.ts");&#xA;args.push_back("-master_pl_name");  args.push_back("index.m3u8");&#xA;args.push_back("-var_stream_map");  args.push_back("\"v:0,a:0 v:1,a:1 v:2,a:2\"");&#xA;args.push_back("/output/stream_%v.m3u8");&#xA;&#xA;&#xA;m_childProcess = std::make_unique(&#xA;            bp::exe = ffmpegPath,&#xA;            bp::args = args);&#xA;

    &#xA;

    Command that above code builds (indented for visibility) :

    &#xA;

     ffmpeg -i input.mp4 -c copy -filter_complex "[0:v]split=3[v1][v2][v3];[v1]copy[v1out];[v2]scale=w=1280:h=720[v2out];[v3]scale=w=640:h=360[v3out]" &#xA;-map [v1out] -c:v:0 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:0 1M -maxrate:v:0 2M -minrate:v:0 2M -bufsize:v:0 2M -preset fast -g 48 -sc_threshold 0 -keyint_min 48 &#xA;-map [v2out] -c:v:1 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:1 1M -maxrate:v:1 1M -minrate:v:1 1M -bufsize:v:1 1M -preset fast -g 48 -sc_threshold 0 -keyint_min 48  &#xA;-map [v3out] -c:v:2 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:2 500K -maxrate:v:2 500K -minrate:v:2 500K -bufsize:v:2 500K -preset fast -g 48 -sc_threshold 0 -keyint_min 48 -map a:0 -c:a:0 aac -b:a:0 96k -ac 2 &#xA;-map a:0 -c:a:1 aac -b:a:1 96k -ac 2 -map a:0 -c:a:2 aac -b:a:2 48k -ac 2 &#xA;-avoid_negative_ts 1 -f hls -hls_time 6 -hls_list_size 15 -hls_flags independent_segments -hls_segment_type mpegts -hls_segment_filename /output/stream_%v_data%02d.ts -master_pl_name index.m3u8 -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2" /output/stream_%v.m3u8&#xA;

    &#xA;