Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (56)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (5093)

  • compiling ffmpeg and chromaprint for android with success on some devices

    4 août 2016, par D Liebman

    I am following the recommendations of this site :

    https://bitbucket.org/phorton1/chromaprint

    From the site I have copied the multi-configure and multi-make scripts for the ffmpeg and chromaprint libraries. I have used them with recent clones of ffmpeg 3.0 and chromaprint 1.3.2 . I get working ’.so’ files for arm, x86 and armv7. I don’t have compillation problems. I load them into my app (a very simple app just to test this library) and I try it on my two devices. One is a Samsung Galaxy TabPro (SM-T320, api 19), and one is the Samsung S4 (api 21). I get the program to run on both. I can use the ’-version’ command to get the chromaprint version info. When I try to fingerprint a audio file, the software works on the older tablet, but not on the s4. On the s4 the error message is ’error decoding audio’.

    I have tried ffmpeg 0.9 as the bitbucket site suggests. I have the same problem. I have tried ffmpeg 2.7 and I thought this was working. Now I cannot get 2.7 to work. As before the code works on the api 19 device and not the s4.

    The Tab is an armeabi-v7a device and the s4 is an armeabi/armeabi-v7 device, so I thought by removing the ’armeabi’ binary I would have the same file on both machines, and they would have to work. This attempt did nothing. I am using android studio.

    Below is a list of some of my ffmpeg configurations. They are taken from the multi-configure script.

       --enable-static
       --disable-shared
       --disable-doc
       --disable-txtpages
       --disable-iconv

       --enable-memalign-hack
       --enable-debug
       --disable-avdevice
       --disable-avfilter
       --disable-swscale
       --disable-ffmpeg
       --disable-ffplay
       --disable-ffserver
       --disable-network
       --disable-muxers
       --disable-demuxers
       --enable-rdft
       --enable-demuxer=aac
       --enable-demuxer=ac3
       --enable-demuxer=ape
       --enable-demuxer=asf
       --enable-demuxer=flac
       --enable-demuxer=matroska_audio
       --enable-demuxer=mp3
       --enable-demuxer=mpc
       --enable-demuxer=mov
       --enable-demuxer=mpc8
       --enable-demuxer=ogg
       --enable-demuxer=tta
       --enable-demuxer=wav
       --enable-demuxer=wv
       --disable-bsfs
       --disable-filters
       --disable-parsers
       --enable-parser=aac
       --enable-parser=ac3
       --enable-parser=mpegaudio
       --disable-protocols
       --enable-protocol=file
       --disable-indevs
       --disable-outdevs
       --disable-encoders
       --disable-decoders
       --enable-decoder=aac
       --enable-decoder=ac3
       --enable-decoder=alac
       --enable-decoder=ape
       --enable-decoder=flac
       --enable-decoder=mp1
       --enable-decoder=mp2
       --enable-decoder=mp3
       --enable-decoder=mpc7
       --enable-decoder=mpc8
       --enable-decoder=tta
       --enable-decoder=vorbis
       --enable-decoder=wavpack
       --enable-decoder=wmav1
       --enable-decoder=wmav2
       --enable-decoder=pcm_alaw
       --enable-decoder=pcm_dvd
       --enable-decoder=pcm_f32be
       --enable-decoder=pcm_f32le
       --enable-decoder=pcm_f64be
       --enable-decoder=pcm_f64le
       --enable-decoder=pcm_s16be
       --enable-decoder=pcm_s16le
       --enable-decoder=pcm_s16le_planar
       --enable-decoder=pcm_s24be
       --enable-decoder=pcm_daud
       --enable-decoder=pcm_s24le
       --enable-decoder=pcm_s32be
       --enable-decoder=pcm_s32le
       --enable-decoder=pcm_s8
       --enable-decoder=pcm_u16be
       --enable-decoder=pcm_u16le
       --enable-decoder=pcm_u24be
       --enable-decoder=pcm_u24le
       --enable-decoder=rawvideo

    Here is some information about the s4 that I got from a system info app.

    Build Info
       Build.BOARD: MSM8960
       Build.BRAND: Verizon
       Build.DEVICE: jfltevzw
       Build.DISPLAY: LRX22C.I545VRUGOF1
       Build.PRODUCT: jfltevzw
       Build.HARDWARE: qcom
       Build.FINGERPRINT: Verizon/jfltevzw/jfltevzw:5.0.1/LRX22C/I545VRUGOF1:user/release-keys
       Build.CPU_ABI: armeabi-v7a
       Build.SUPPORTED_32_BIT_ABIS: [armeabi-v7a, armeabi]
       Build.SUPPORTED_64_BIT_ABIS: []
       Build.SUPPORTED_ABIS: [armeabi-v7a, armeabi]
       Build.HOST: SWDD6122
       Build.ID: LRX22C
       Build.MANUFACTURER: samsung
       Build.MODEL: SCH-I545
       Build.PRODUCT: jfltevzw
       Build.TAGS: release-keys
       Build.TIME: 2015-07-15T03:39:01.000-0400
       Build.TYPE: user
       Build.USER: dpi
       Build.BOOTLOADER: I545VRUGOF1
       Build.TAGS: release-keys
       Build.VERSION.CODENAME: REL
       Build.VERSION.INCREMENTAL: I545VRUGOF1
       Build.VERSION.RELEASE: 5.0.1
       Build.VERSION.SDK_INT: 21

    EDIT :

    This is the complete source for my project minus the api-key which is personal. https://github.com/radiodee1/awesome-fpcalc The code is arranged in parts inside the git repository. The ’fpcalc-testapp’ part just has the Android Studio project. The ’fpcalc-build’ part is my attempt to use the latest versions of ffmpeg, chromaprint, and kissfft. The ’fpcalc-build-complete’ part is a series of scripts that reproduces the P. Horton ffmpeg 2.7 scenario. Bye the way I believe the best libraries are produced in the ’build-complete’ folders.

  • ffmpeg split by silence (with logic to achieve 12 split segments)

    14 mars 2023, par Martin

    https://github.com/MartinBarker/split_by_silence

    


    I am trying to automate the process of splitting a single audio file into 12 tracks. you can see in the below image that this 35:62 length mp3 file has 11 visible split points (where the audio more quiet), which means 12 distinct segments.
enter image description here

    


    I'd like to be able to run a script to automatically find these split points and split my file, my first split point should be around 159 seconds, and second around 360, third around 540, 4th around 780, 5th around 960, and so on for a total of 11 split points :

    


    1 159
2 360
3 540
4 780
5 960
6 1129
7 1309
8 1500
9 1680
10 1832
11 1980


    


    but my test results have not been working so good :

    


    - Goal:
11 split points found
12 tracks rendered

- Test 1
SD_PARAMS="-24dB"
MIN_FRAGMENT_DURATION="3"
5 split points found: 361.212,785.811,790.943,969.402,2150.24`
6 tracks rendered

-Test 2
SD_PARAMS="-24dB"
MIN_FRAGMENT_DURATION="3"
10 split points found: 151.422,155.026,158.526,361.212,534.254,783.667,967.253,1128.91,2150.2
11 tracks rendered


    


      

    • Test 2 Problem :
Even though 12 tracks were rendered, some split points are very close
enter image description here
leading to tracks being exported that are very short, such as 3, 5, and 2 seconds. as well as one long track being 16 minutes
enter image description here
    • 


    


    So I added a variable MIN_SEGMENT_LENGTH and ran another test

    


    - Test 3
SD_PARAMS="-18dB"
MIN_FRAGMENT_DURATION="3"
MIN_SEGMENT_LENGTH=120 (02:00)

log:
_______________________
Determining split points...
split points list= 150.482,155.026,158.526,361.212,530.019,534.254,783.667,967.245,1127.67,2144.57,2150.2
1. The difference between 150.482 and 155.026 is 4.544
       diff is less than MIN_SEGMENT_LENGTH=120
2. The difference between 155.026 and 158.526 is 3.500
       diff is less than MIN_SEGMENT_LENGTH=120
3. The difference between 158.526 and 361.212 is 202.686
4. The difference between 361.212 and 530.019 is 168.807
5. The difference between 530.019 and 534.254 is 4.235
       diff is less than MIN_SEGMENT_LENGTH=120
6. The difference between 534.254 and 783.667 is 249.413
7. The difference between 783.667 and 967.245 is 183.578
8. The difference between 967.245 and 1127.67 is 160.425
9. The difference between 1127.67 and 2144.57 is 1016.90
10. The difference between 2144.57 and 2150.2 is 5.63
       diff is less than MIN_SEGMENT_LENGTH=120
_______________________
Exporting 12 tracks with ffmpeg...


    


    I'm unsure how to change my script and vars so that by running it, are calculating the split points, if any of them are too short (less then 120 seconds) to regenerate the split point(s) ?

    


    Here is my audio file :
https://filetransfer.io/data-package/HC7GG07k#link

    


    And here is my script, which can be ran by running ./split_by_silence.sh

    


    # -----------------------
# SPLIT BY SILENCE
# Requirements:
#    ffmpeg
#    $ apt-get install bc
# How To Run:
# $ ./split_by_silence.sh "full_lowq.flac" %03d_output.flac

# output title format
OUTPUTTITLE="%03d_output.mp3"
# input audio filepath
IN="/mnt/e/martinradio/rips/vinyl/L.T.D. – Gittin' Down/lowquality_example.mp3"
# output audio filepath
OUTPUTFILEPATH="/mnt/e/folder/rips"
# ffmpeg option: split input audio based on this silencedetect value
SD_PARAMS="-18dB"
# split option: minimum fragment duration
MIN_FRAGMENT_DURATION=3
# minimum segment length
MIN_SEGMENT_LENGTH=120

# -----------------------
# step: ffmpeg
# goal: 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 "split points list= $SPLITS"
# determine if the difference between any two splits is less than MIN_SEGMENT_LENGTH seconds
IFS=',' read -ra VALUES <<< "$SPLITS"

for (( i=0; i<${#VALUES[@]}-1; i++ )); do
  diff=$(echo "${VALUES[$i+1]} - ${VALUES[$i]}" | bc)
  display_i=$((i+1))
  echo "$display_i. The difference between ${VALUES[$i]} and ${VALUES[$i+1]} is $diff"
  if (( $(echo "$diff < $MIN_SEGMENT_LENGTH" | bc -l) )); then
    echo "       diff is less than MIN_SEGMENT_LENGTH=$MIN_SEGMENT_LENGTH"
  fi
done


# using the split points list, calculate how many output audio files will be created 
num=0
res="${SPLITS//[^,]}"
CHARCOUNT="${#res}"
num=$((CHARCOUNT + 2))
echo "_______________________"
echo "Exporting $num tracks with ffmpeg"

ffmpeg -i "$IN" -c copy -map 0 -f segment -segment_times "$SPLITS" "$OUTPUTFILEPATH/$OUTPUTTITLE"

echo "Done."



    


  • 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 ?