Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (91)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11268)

  • Google Speech API "Sample rate in request does not match FLAC header"

    13 février 2017, par kjdion84

    I’m trying to convert an mp4 video clip into a FLAC audio file and then have google speech spit out the words from the video so that I can detect if specific words were said.

    I have everything working except that I am getting an error from the Speech API :

    {
     "error": {
       "code": 400,
       "message": "Sample rate in request does not match FLAC header.",
       "status": "INVALID_ARGUMENT"
     }
    }

    I am using FFMPEG in order to convert the mp4 into a FLAC file. I am specifying that the FLAC file be 16 bits in the command, but when I right click on the FLAC file Windows is telling me it is 302kbps.

    Here is my PHP code :

    // convert mp4 video to 16 bit flac audio file
    $cmd = 'C:/wamp/www/ffmpeg/bin/ffmpeg.exe -i C:/wamp/www/test.mp4 -c:a flac -sample_fmt s16 C:/wamp/www/test.flac';
    exec($cmd, $output);

    // convert flac to text so we can detect if certain words were said
    $data = array(
       "config" => array(
           "encoding" => "FLAC",
           "sampleRate" => 16000,
           "languageCode" => "en-US"
       ),
       "audio" => array(
           "content" => base64_encode(file_get_contents("test.flac")),
       )
    );

    $json_data = json_encode($data);

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'https://speech.googleapis.com/v1beta1/speech:syncrecognize?key=MY_API_KEY');
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    $result = curl_exec($ch);
  • How do I use the ffmpeg CLI to stretch the beginning of an audio stream, using silence, to match the start of the video ?

    26 mai 2019, par enzi

    I’m encoding mpd for DashJS using ffmpeg. I’m trying to encode a video that has audio starting 26 seconds after video. When I play it use DashJS, the video refuses to show until the audio starts. What’s the best way to stretch the audio to to the beginning of the video using the ffmpeg cli using silence ?

    I’ve tried several filters but with no success.

    Here’s my command :

    "ffmpeg" "-i" "static/uploads/tmp.10370ba20dc842f7af87037c8e25e895.mkv" "-c:v" "libx264" "-x264opts" "keyint=25:min-keyint=25:no-scenecut" "-pix_fmt" "yuv420p" "-profile:v" "baseline" "-level" "3" "-coder" "1" "-g" "250" "-c:a" "libfdk_aac" "-b:a" "192k" "-ar" "44100" "-ac" "2" "-map" "0:0" "-map" "0:1" "-map" "0:2" "-map" "0:3" "-metadata" "title=Video" "-f" "dash" "-use_template" "1" "-use_timeline" "1" "-seg_duration" "5" "-init_seg_name" "$RepresentationID$-init.m4s" "-media_seg_name" "$RepresentationID$-$Time$.m4s" "-max_muxing_queue_size" "9999" "-shortest" "-avoid_negative_ts" "make_non_negative" "static/uploads/abea93fe8fe645f291beb6223398e025/index.out"

    I tried amixing evalsrc=0 with source 0:1, the stream that starts at 26 seconds but it still starts at 26 seconds.

  • ffmpeg save video in segments, time does not match

    22 août 2022, par Yohann

    I use ffmpeg to save the rtsp live stream to the local, specify the fragment size of 2 seconds and use the current time to name the video file

    


    But the length of the returned video is not equal to 2 seconds and the interval between file names is not 2 seconds

    


    I have tried several command line arguments

    


    ffmpeg -i rtsp://192.168.18.119/live/test -f segment -strftime 1 -segment_time 2 -segment_atclocktime 1 -reset_timestamps 1 -an -vcodec copy ./%Y-%m-%d-%H.%M.%S.mp4

# execute result
2022-08-22-17.20.16.mp4  duration:00:03
2022-08-22-17.20.17.mp4  duration:00:03
2022-08-22-17.20.18.mp4  duration:00:07
2022-08-22-17.20.19.mp4  duration:00:03
2022-08-22-17.20.20.mp4  duration:00:03
# file names are not time aligned


    


    ffmpeg -i rtsp://192.168.18.119/live/test -f segment -strftime 1 -segment_time 2 -reset_timestamps 1 -an -vcodec copy ./%Y-%m-%d-%H.%M.%S.mp4

# execute result
2022-08-22-17.42.36.mp4 duration:00:03
2022-08-22-17.42.37.mp4 duration:00:03
2022-08-22-17.42.41.mD4 duration:00:03
2022-08-22-17.42.44.mp4 duration:00:03
2022-08-22-17.42.48.mp4 duration:00:03
2022-08-22-17.42.51.mp4 duration:00:03
# file names are not time aligned


    


    Expect to generate video

    


    2022-08-22-17.50.00.mp4 时长:00:02
2022-08-22-17.50.02.mp4 时长:00:02
2022-08-22-17.50.04.mD4 时长:00:02
2022-08-22-17.50.06.mp4 时长:00:02
2022-08-22-17.50.08.mp4 时长:00:02
2022-08-22-17.50.10.mp4 时长:00:02
...