Recherche avancée

Médias (91)

Autres articles (88)

  • 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

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (11715)

  • matroskaenc : implement CueRelativePosition

    23 juillet 2013, par Bernie Habermeier
    matroskaenc : implement CueRelativePosition
    

    This is a minimal change to matroskaenc that implements CueRelativePosition in the output.
    Most players will probably ignore this additional information, but it is in the
    matroska spec, and it’d be nice to be able to make use of it.

    Signed-off-by : Bernt Habermeier <bernt@wulfram.com>
    Tested-by : wm4 <nfxjfg@googlemail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/matroska.h
    • [DH] libavformat/matroskaenc.c
    • [DH] tests/ref/lavf/mkv
  • ffmpeg command exports flac with wrong 'length' metadata, works fine for mp3

    21 juillet 2023, par Martin

    I have some audio recorded in Audacity 3.2.3 that I have exported as an mp3 and a flac. Then I have this file split_by_silence.sh

    &#xA;

    Which has hardcoded input path values that take an input file, split it by detecting silence, and then finally run an ffmpeg command to split the files. If you save the below code into a file split.sh, you can call it with the command $ ./split_by_silence.sh "value1" "value2"

    &#xA;

    # ./split_by_silence.sh "full_lowq.flac" %03d_output.flac&#xA;#IN=$1&#xA;#OUT=$2&#xA;&#xA;OUT="%03d_output.flac"&#xA;IN="/mnt/e/martinradio/rips/vinyl/WIP/Dogs On Fire (1983, Vinyl)/dog on fire.flac"&#xA;OUTPUT_LOCATION="/mnt/e/martinradio/rips/vinyl/WIP/Dogs On Fire (1983, Vinyl)/"&#xA;&#xA;true ${SD_PARAMS:="-18dB"};&#xA;true ${MIN_FRAGMENT_DURATION:="20"};&#xA;export MIN_FRAGMENT_DURATION&#xA;if [ -z "$OUT" ]; then&#xA;    echo "Usage: split_by_silence.sh full.mp3 output_template_%03d.mp3"&#xA;    echo "Depends on FFmpeg, Bash, Awk, Perl 5. Not tested on Mac or Windows."&#xA;    echo ""&#xA;    echo "Environment variables (with their current values):"&#xA;    echo "    SD_PARAMS=$SD_PARAMS       Parameters for FFmpeg&#x27;s silencedetect filter: noise tolerance and minimal silence duration"&#xA;    echo "    MIN_FRAGMENT_DURATION=$MIN_FRAGMENT_DURATION    Minimal fragment duration"&#xA;    exit 1&#xA;fi&#xA;#&#xA;# get comma separated list of split points (use ffmpeg to determine points where audio is at SD_PARAMS [-18db] )&#xA;#&#xA;&#xA;echo "_______________________"&#xA;echo "Determining split points..." >&amp; 2&#xA;SPLITS=$(&#xA;    ffmpeg -v warning -i "$IN" -af silencedetect="$SD_PARAMS",ametadata=mode=print:file=-:key=lavfi.silence_start -vn -sn  -f s16le  -y /dev/null \&#xA;    | grep lavfi.silence_start= \&#xA;    | cut -f 2-2 -d= \&#xA;    | perl -ne &#x27;&#xA;        our $prev;&#xA;        INIT { $prev = 0.0; }&#xA;        chomp;&#xA;        if (($_ - $prev) >= $ENV{MIN_FRAGMENT_DURATION}) {&#xA;            print "$_,";&#xA;            $prev = $_;&#xA;        }&#xA;    &#x27; \&#xA;    | sed &#x27;s!,$!!&#x27;&#xA;)&#xA;echo "SPLITS= $SPLITS"&#xA;&#xA;#&#xA;# Add 5 seconds to each of the comma separated numbers&#xA;#&#xA;# Convert the comma-separated string into an array&#xA;arr=($(echo $SPLITS | tr &#x27;,&#x27; &#x27;\n&#x27;))&#xA;# Initialize a new array to store the results&#xA;new_arr=()&#xA;# Iterate through each element and add 5 seconds of padding&#xA;for i in "${arr[@]}"; do&#xA;  result=$(echo "$i &#x2B; 5" | bc -l)&#xA;  new_arr&#x2B;=("$result")&#xA;done&#xA;# Convert the array back into a comma-separated string&#xA;NEW_SPLITS=$(IFS=,; echo "${new_arr[*]}")&#xA;# Print the result&#xA;echo "NEW_SPLITS= $NEW_SPLITS"&#xA;SPLITS=$NEW_SPLITS&#xA;&#xA;#&#xA;# Print how many tracks should be exported&#xA;#&#xA;res="${SPLITS//[^,]}"&#xA;CHARCOUNT="${#res}"&#xA;num=$((CHARCOUNT &#x2B; 2))&#xA;echo "Exporting $num tracks"&#xA;echo "_______________________"&#xA;&#xA;#&#xA;# Split audio into individual tracks&#xA;#&#xA;current_directory=$(pwd)&#xA;&#xA;cd "$OUTPUT_LOCATION"&#xA;&#xA;echo "Running ffmpeg command: "&#xA;&#xA;ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUT"&#xA;#ffmpeg -i "full_lowq.flac" -c copy -map 0 -f segment -segment_times "302.825,552.017" "%03d_output.flac"&#xA;&#xA;&#xA;echo "Done."&#xA;&#xA;cd $current_directory&#xA;&#xA;echo "running flac command"&#xA;# check flac file intrgrity&#xA;

    &#xA;

    If I call this code for my flac file :

    &#xA;

    OUT="%03d_output.flac"&#xA;IN="/mnt/e/martinradio/rips/vinyl/WIP/Dogs On Fire (1983, Vinyl)/dog on fire.flac"&#xA;

    &#xA;

    The outputted files have an incorrect metadata for the length. They all report as having the same length, but if i import any of them into audacity, the file has a correct length.

    &#xA;

    enter image description here

    &#xA;

    but if i run this for my mp3 file, we can see the correct length metadata :

    &#xA;

    OUT="%03d_output.mp3"&#xA;IN="/mnt/e/martinradio/rips/vinyl/WIP/Dogs On Fire (1983, Vinyl)/dogs on fire.mp3"&#xA;

    &#xA;

    enter image description here

    &#xA;

    So there is something with my ffmpeg command that causes it to export flac files with wrong 'length' metadata

    &#xA;

    ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUT"&#xA;&#xA;

    &#xA;

    I've tried with the flac example to change -c copy to -c:a flac, but that just gives every output flac file a length of 00:00:00

    &#xA;

    is it a problem with my ffmpeg command ? Or my files ? https://file.io/tIFsa1l70076&#xA;it works for mp3 files just fine, why does it have this issue with flac ?

    &#xA;

  • FFMPEG - Struggling to find correct input audio codec parameters on macOS

    20 septembre 2024, par Xavi

    I am trying to read my external stereo microphone with ffmpeg within my Qt Windows+macOs application, but I am struggling to obtain consistent correct input codec parameters on macOs. My findings and suspicions so far :

    &#xA;

    The code I'm using in macOs is the following, where everything returns a successful return code :

    &#xA;

     avdevice_register_all();&#xA; &#xA; //macOs only, the same code in windows looks for "dshow" &#xA; const AVInputFormat *inputFormat = av_find_input_format("avfoundation");&#xA; &#xA; AVFormatContext* inputFormatContext;&#xA; avformat_open_input(&amp;inputFormatContext, inputDevice, inputFormat, NULL);&#xA;&#xA; avformat_find_stream_info(inputFormatContext, NULL);&#xA; &#xA; //... allocate the codec context for the single input stream and&#xA; // copy the parameters from the stream to the context&#xA;&#xA;

    &#xA;

    In my standalone minimal reproducer this always results on the codec ID of the single stream being AV_CODEC_ID_PCM_F32LE, in both macOS and Windows. When I integrate this code in my Qt application on Windows, I get the same result. However, on macOS, most of the times results in the codec id of the stream being AV_CODEC_ID_PCM_S16LE (via AV_CODEC_ID_FIRST_AUDIO) and sometimes AV_CODEC_ID_PCM_F32LE. Both sample formats are supported by my microphone.

    &#xA;

    AV_CODEC_ID_PCM_F32LE always results in a correct output. AV_CODEC_ID_PCM_S16LE results on buzzy noisy audio slowed down to 0.5x, and If in this case I decode with AV_CODEC_ID_PCM_F32LE instead of copying the codec parameters from the stream, the output sounds correct again.

    &#xA;

    I am trying to write generic code, so while enforcing the AV_CODEC_ID_PCM_F32LE codec works, I'd rather understand what is happening.

    &#xA;

    What am I missing ? Is Qt interacting in some way that I can't think of ? I am compiling and linking my own ffmpeg libraries (6.1.1) and not using Qt's ones.

    &#xA;