Recherche avancée

Médias (91)

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9208)

  • ffmpeg with "-pattern_type glob" and variable in bash script

    20 juin 2019, par KlausPeter

    I’m trying to let ffmpeg make a video of all pictures in a directory using the -pattern_type glob switch and "/foo/bar/*.jpg". This works well, if I execute the command manually für just one directory. For example :

    ffmpeg -framerate 35 -pattern_type glob -i '/root/webcam_test/2018-07-21/*.jpg' -vf scale=1280:-1 -c -c:v libx264 -pix_fmt yuv420p /root/clips/out01_cut.mp4

    However, if I do it in a bash script and set the path via a variable, according to ffmpegs output, the variable gets substituted correctly, but ffmpeg states that

    ’/root/webcam_test/2018-07-21/*.jpg’ : No such file or directory

    The part of the script looks like this :

    for D in `find /root/webcam_test/ -type d`
    do
       [...]
       cmd="ffmpeg -framerate 35 -pattern_type glob -i '$D/*.jpg' -vf scale=1280:-1 -c -c:v libx264 -pix_fm                                 t yuv420p /root/clips/$d_cut.mp4"
       echo $cmd
    [...]
    done

    Does anyone know how to make ffmpeg do its wildcard interpretation even if the path is constructed by a script and not just try to plainly use the given path ?
    Best regards and thanks in advance

  • While loop in bash to read a file skips first 2 characters of THIRD Line

    9 juillet 2018, par Yaser Sakkaf
    #bin/bash
    INPUT_DIR="$1"
    INPUT_VIDEO="$2"
    OUTPUT_PATH="$3"
    SOURCE="$4"
    DATE="$5"

    INPUT="$INPUT_DIR/sorted_result.txt"
    COUNT=1
    initial=00:00:00
    while IFS= read -r line; do
     OUT_DIR=$OUTPUT_PATH/$COUNT
     mkdir "$OUT_DIR"
     ffmpeg -nostdin -i $INPUT_VIDEO -vcodec h264 -vf fps=25 -ss $initial -to $line $OUT_DIR/$COUNT.avi
     ffmpeg -i $OUT_DIR/$COUNT.avi -acodec pcm_s16le -ar 16000 -ac 1 $OUT_DIR/$COUNT.wav
     python3.6 /home/Video_Audio_Chunks_1.py $OUT_DIR/$COUNT.wav
     python /home/transcribe.py  --decoder beam --cuda --source $SOURCE --date $DATE --video $OUT_DIR/$COUNT.avi --out_dir "$OUT_DIR"
     COUNT=$((COUNT + 1))
     echo "--------------------------------------------------"
     echo $initial
     echo $line
     echo "--------------------------------------------------"
     initial=$line
    done < "$INPUT"

    This is the code I am working on.
    The contents of file sorted_results.txt are as follows :

    00:6:59
    00:7:55
    00:8:39
    00:19:17
    00:27:48
    00:43:27

    While reading the file it skips first two characters of the third line i.e. it takes it as :8:39 which results in the ffmpeg error and the script stops.

    However when I only print the variables $INITIAL and $LINE, commenting the ffmpeg command the values are printed correctly i.e. same as the file contents.

    I think the ffmpeg command is somehow affecting the file reading process or the variable value. BUT I CAN’T UNDERSTAND HOW ?

    PLEASE HELP.

  • ffmpeg select subclips from large video bash and create outputfile names

    29 juin 2018, par martins

    I am using bash command on a Mac Terminal. For each of the 250 .mp4 files in a directory I need to create a new outputfile which extracts 4 subclips from each inputfile : 1st subclip (from second 10 to 20), 2nd subclip (10 seconds at a 33% stage of the inputfile), 3rd subclip (10 seconds at a 66% of the inputfile), and a 4th subclip (10 seconds starting 30seconds before the end of the inputfile). Each inputfile has a different length of about 10-15minutes.

    I tried with one inputfile and the following bash script works :

    #!/bin/bash
    for file in *.mp4; do ffmpeg -i "$file" -vf "select='between(t, 10, 20) + between(t, 197, 207) + between(t, 393, 403) + between(t, 570,580)',
    setpts=N/FRAME_RATE/TB" -qscale 0 -af "aselect='between(t, 10, 20) +
    between(t, 197, 207) + between(t, 393, 403) + between(t, 570, 580)',
    asetpts=N/SR/TB" outputfile.mp4; done

    However, I don’t know how to loop it over the 250 mp4 files. Specifically, I have 2 issues :

    1. The above code shows specific seconds I manually checked from the inputfile I used to test the code. I need to automatize the code according to the timings above.
    2. Name the outputfile the same as the inputfile but adding "_1" suffix

    In sum, I have a directory with inputfiles between 10-15minutes long :

    inputfile1.mp4
    inputfile2.mp4
    inputfile3.mp4
    .......
    inputfile250.mp4

    And I want the same directory with inputfiles and outputfiles together :

    inputfile1.mp4
    inputfile1_1.mp4 #this is 40 seconds long
    inputfile2.mp4
    inputfile2_1.mp4 #this is 40 seconds long
    inputfile3.mp4
    inputfile3_1.mp4 #this is 40 seconds long
    .......
    inputfile250.mp4
    inputfile250_1.mp4 #this is 40 seconds long

    Thank you very much in advance.