Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (65)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (8369)

  • 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

    


    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"

    


    # ./split_by_silence.sh "full_lowq.flac" %03d_output.flac
#IN=$1
#OUT=$2

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

true ${SD_PARAMS:="-18dB"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
    echo "Usage: split_by_silence.sh full.mp3 output_template_%03d.mp3"
    echo "Depends on FFmpeg, Bash, Awk, Perl 5. Not tested on Mac or Windows."
    echo ""
    echo "Environment variables (with their current values):"
    echo "    SD_PARAMS=$SD_PARAMS       Parameters for FFmpeg's silencedetect filter: noise tolerance and minimal silence duration"
    echo "    MIN_FRAGMENT_DURATION=$MIN_FRAGMENT_DURATION    Minimal fragment duration"
    exit 1
fi
#
# get comma separated list of split points (use ffmpeg to determine points where audio is at SD_PARAMS [-18db] )
#

echo "_______________________"
echo "Determining split points..." >& 2
SPLITS=$(
    ffmpeg -v warning -i "$IN" -af silencedetect="$SD_PARAMS",ametadata=mode=print:file=-:key=lavfi.silence_start -vn -sn  -f s16le  -y /dev/null \
    | grep lavfi.silence_start= \
    | cut -f 2-2 -d= \
    | perl -ne '
        our $prev;
        INIT { $prev = 0.0; }
        chomp;
        if (($_ - $prev) >= $ENV{MIN_FRAGMENT_DURATION}) {
            print "$_,";
            $prev = $_;
        }
    ' \
    | sed 's!,$!!'
)
echo "SPLITS= $SPLITS"

#
# Add 5 seconds to each of the comma separated numbers
#
# Convert the comma-separated string into an array
arr=($(echo $SPLITS | tr ',' '\n'))
# Initialize a new array to store the results
new_arr=()
# Iterate through each element and add 5 seconds of padding
for i in "${arr[@]}"; do
  result=$(echo "$i + 5" | bc -l)
  new_arr+=("$result")
done
# Convert the array back into a comma-separated string
NEW_SPLITS=$(IFS=,; echo "${new_arr[*]}")
# Print the result
echo "NEW_SPLITS= $NEW_SPLITS"
SPLITS=$NEW_SPLITS

#
# Print how many tracks should be exported
#
res="${SPLITS//[^,]}"
CHARCOUNT="${#res}"
num=$((CHARCOUNT + 2))
echo "Exporting $num tracks"
echo "_______________________"

#
# Split audio into individual tracks
#
current_directory=$(pwd)

cd "$OUTPUT_LOCATION"

echo "Running ffmpeg command: "

ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUT"
#ffmpeg -i "full_lowq.flac" -c copy -map 0 -f segment -segment_times "302.825,552.017" "%03d_output.flac"


echo "Done."

cd $current_directory

echo "running flac command"
# check flac file intrgrity


    


    If I call this code for my flac file :

    


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


    


    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.

    


    enter image description here

    


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

    


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


    


    enter image description here

    


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

    


    ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUT"



    


    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

    


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

    


  • 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 Android - Minimum binary size to convert WAV to MP3

    22 novembre 2020, par timson

    The only thing I want to do is convert wav files to mp3 inside my Android application.

    &#xA;

    I am currently using https://github.com/tanersener/mobile-ffmpeg and with audio-release everything is working fine. As the lib size is about 40 MB and I only need a single command, I'd like to build my own .aar file as described in the Wiki to reduce the application size.

    &#xA;

    I edited the android-ffmpeh.sh ./configure:

    &#xA;

    --disable-everything \    &#xA;--enable-pthreads \&#xA;--enable-avcodec \&#xA;--enable-avformat \&#xA;--enable-swresample \&#xA;--enable-avfilter \&#xA;--enable-libmp3lame \&#xA;--enable-parser=mpegaudio \&#xA;--enable-demuxer=mp3,wav,pcm_s16le \&#xA;--enable-muxer=mp3,wav,pcm_s16le \&#xA;--enable-decoder=pcm*,mp3*,wav,pcm_s16le \&#xA;--enable-encoder=pcm*,pcm_s16le,wav,mp3,libmp3lame \&#xA;--enable-filter=aresample \&#xA;--enable-protocol=file \&#xA;

    &#xA;

    and then ran ./android.sh -l --enable-lame --enable-libiconv

    &#xA;

    In my Android app FFmpeg loads but the conversion doesn't succed with following error :

    &#xA;

    E/mobile-ffmpeg: [AVFilterGraph @ 0x7209dfec40] No such filter: &#x27;anull&#x27;&#xA;E/mobile-ffmpeg: Error reinitializing filters!&#xA;E/mobile-ffmpeg: Failed to inject frame into filter network: Invalid argument&#xA;E/mobile-ffmpeg: Error while processing the decoded data for stream #0:0&#xA;I/mobile-ffmpeg: Conversion failed!&#xA;

    &#xA;

    Does anyone know what I'm missing or another config to build a minimal size binary for this.&#xA;Any help is highly appreciated !

    &#xA;