Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (99)

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

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

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

Sur d’autres sites (8611)

  • Using ffplay with RTSP and source-specific multicast

    14 septembre 2022, par bigbrobrody

    We are trying to use ffplay to join a live video source in a network that uses IGMPv3 source-specific multicast.

    


    If we use an SDP file this works fine and wireshark shows that ffplay correctly sends a source-specific multicast membership report.

    


    However, when we try to join the same source using RTSP, ffplay seems to ignore the source-specific address contained in the SDP response to RTSP DESCRIBE and fails because it tries to join for any source. This is the command used :

    


    ffplay -loglevel debug -rtsp_transport udp_multicast -protocol_whitelist rtp,udp,tcp -i rtsp://[username:password]@[ip address]/stream0

    


    The SDP response as reported by ffplay includes :

    


    a=source-filter: incl IN IP4 * [ssm ip address]

    


    The only error reported by ffplay is :

    


    Failed to parse interval end specification ''

    


    Wireshark shows that ffplay is not performing an SSM join :

    


    Membership Report / Join group [group IP address] for any sources

    


    Further details in the screenshot below. Are we doing something wrong, is this a feature of ffplay or a potential bug ?

    


    I note that libavformat/rtsp.h contains the comment /** The following are used only in SDP, not RTSP */ against code for sdp port, source-specific multicast addresses, etc. I’m not sure if that hints at our issue being because of a feature in ffmpeg.

    


    ffplay using rtsp and ssm

    


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



    


  • Using hex colors with ffmpeg's showwaves

    25 août 2017, par Dan

    I’ve been trying to create a video with ffmpeg’s showwaves filter and have cobbled together the below command which I sort of understand. I’m wondering if it is possible to set the color of the wav form using hex colors. (i.e. #F3ECDA instead of "blue")
    Also, feel free to tell me if there’s any unneeded garbage in the command as is. Thanks.

    ffmpeg -i audio.mp3 -loop 1 -i picture.jpg -filter_complex \
    "[0:a]showwaves=s=960x202:mode=cline:colors=blue[fg]; \
    [1:v]scale=960:-1,crop=iw:540[bg]; \
    [bg][fg]overlay=shortest=1:main_h-overlay_h-30,format=yuv420p[out]" \
    -map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a libopus output.col.mkv