Recherche avancée

Médias (91)

Autres articles (23)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (3821)

  • Getting rid of FFmpeg non-existng PPS error

    11 août 2016, par Girls.Gone.Wired

    I am using ffmpeg to decode videos. I am aware that the error I am getting is due to the frame/sliceHeader is decoded and the Picture Parameter Set information is not there. I am just curious if anyone knows a way to get rid of this error ? My video is successfully decoding but in the debugger this error makes the metadata hard to read.

    The error is :

    non existing PPS 0 referenced
    decode_slice_header error
    no frame!

    ******** My code is in C ******

  • ffmpeg error - "error converting wmv to ac3 "

    13 octobre 2014, par yakumo

    hello i have an error

    my line

    ffmpeg -i 00003.track_4352.wav 00003.track_4352.ac3

    and résult

    ffmpeg version 2.1.5 Copyright (c) 2000-2014 the FFmpeg developers
    built on Jul 8 2014 20:44:17 with gcc 4.8.3 (GCC) 20140624 (Red Hat 4.8.3-1)
    configuration : —prefix=/usr —bindir=/usr/bin —datadir=/usr/share/ffmpeg —incdir=/usr/include/ffmpeg —libdir=/usr/lib64 —mandir=/usr/share/man —arch=x86_64 —optflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong —param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ —enable-bzlib —disable-crystalhd —enable-frei0r —enable-gnutls —enable-libass —enable-libcdio —enable-libcelt —enable-libdc1394 —disable-indev=jack —enable-libfreetype —enable-libgsm —enable-libmp3lame —enable-openal —enable-libopencv —enable-libopenjpeg —enable-libopus —enable-libpulse —enable-libschroedinger —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libvorbis —enable-libv4l2 —enable-libvpx —enable-libx264 —enable-libxvid —enable-x11grab —enable-avfilter —enable-avresample —enable-postproc —enable-pthreads —disable-static —enable-shared —enable-gpl —disable-debug —disable-stripping —shlibdir=/usr/lib64 —enable-runtime-cpudetect
    libavutil 52. 48.101 / 52. 48.101
    libavcodec 55. 39.101 / 55. 39.101
    libavformat 55. 19.104 / 55. 19.104
    libavdevice 55. 5.100 / 55. 5.100
    libavfilter 3. 90.100 / 3. 90.100
    libavresample 1. 1. 0 / 1. 1. 0
    libswscale 2. 5.101 / 2. 5.101
    libswresample 0. 17.104 / 0. 17.104
    libpostproc 52. 3.100 / 52. 3.100
    00003.track_4352.wav : Invalid data found when processing input

    I do not understand this error can you help me I would like to convert this file

    thank you in advance

  • How to fix ffmpeg 'Assertion error' error in C++

    9 mai 2019, par evn

    I’m writing a program to speed up quiet sections of videos, and I want to support videos up to 2 hours long.

    This is for a command line based program. I’m building it in XCode, then copying the compiled program to a folder with the input video and running it from terminal.

    I’m basically generating a command to run a very large complex filter based on times from ffmpeg’s silence_detect feature, to speed up every other ’section’ of video and then concatenate all those sections together.

    #include <iostream>
    #include <vector>
    #include <string>
    #include <fstream>
    #include "CoreFoundation/CoreFoundation.h"

    using namespace std;

    int main(int argc, const char * argv[]) {
       CFBundleRef mainBundle = CFBundleGetMainBundle();
       CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
       char path[PATH_MAX];
       if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
       {
           // error!
       }
       CFRelease(resourcesURL);

       /************************************/
       /***********Getting Input************/
       /************************************/

       chdir(path);
       std::cout &lt;&lt; "Current Path: " &lt;&lt; path &lt;&lt; std::endl;

       for (int i = 0; i &lt; argc; i++){
           printf("argv[%d] = %s\n", i, argv[i]);
       }
       string inpath = "input.mp4";
       string outpath = "output.mp4";
       if(argc >= 1){
           inpath = argv[1];
       }
       if(argc >= 2){
           outpath = argv[2];
       }
       string volcall = "ffmpeg -i \"" + inpath + "\" -af silencedetect=noise=-30dB:d=0.5 -f null - 2> " + inpath + "vol.txt";
       system(volcall.c_str());

       /************************************/
       /***********File Analysis************/
       /************************************/
       cout&lt;&lt;"Starting File Analysis"&lt;/loads entire document into sTotal
       while(!in.eof()) {
           getline(in, s);
           sTotal += s + "\n";
       }

       size_t pos = sTotal.find("silence_start"); //find location of first time
       sNew = sTotal.erase(0,pos); //delete everything prior to location found

       //START TIME EXTRACTION
       vector<double> startArr;
       vector<double> endArr;

       string term = "silence_start";
       int bpos = 0;

       while ((bpos = sNew.find(term,bpos)) != -1)
       {
           int posStart = 15 + bpos;
           string timeStart = sNew.substr (posStart,7);

           float timeSrt = stof (timeStart);
           startArr.push_back(timeSrt);
           cout&lt;&lt; (timeSrt / 2) &lt;/END TIME EXTRACTION
       string term2 = "silence_end";
       int bpos2 = 0;

       while ((bpos2 = sNew.find(term2,bpos2)) != -1)
       {
           int posStart = 13 + bpos2;
           string timeEnd = sNew.substr (posStart,7);

           float timeNd = stof (timeEnd);
           endArr.push_back(timeNd);
           cout&lt;&lt; (timeNd / 2) &lt; totalArr(startArr);

       totalArr.insert( totalArr.end(), endArr.begin(), endArr.end() );
       sort(totalArr.begin(), totalArr.end());

       in.close();

       /************************************/
       /***********Video Editing************/
       /************************************/

       cout&lt;&lt;"Starting Video Editing"&lt; times(totalArr); //starts with next timecode after 0, ends with last timecode
       int numTimes = times.size();

       cmd= cmd + "[0:v]trim=0:" + to_string(times[0]) + ",setpts=" + to_string(first_speed) + "*(PTS-STARTPTS)[v0]; ";
       acmd= acmd + "[0:a]atrim=0:" + to_string(times[0]) + ",asetpts=PTS-STARTPTS,atempo=" + to_string(first_speed) + "[a0]; ";

       double mySpeed;
       int i;
       for(i = 0; i &lt; numTimes - 1; i++){
           mySpeed = i%2==1? first_speed : second_speed;
           cmd= cmd + "[0:v]trim=" + to_string(times[0 + i]) + ":" + to_string(times[1 + i]) + ",setpts=" + to_string(1 / mySpeed) + "*(PTS-STARTPTS)[v" + to_string(i+1) + "]; ";
           acmd= acmd + "[0:a]atrim=" + to_string(times[0 + i]) + ":" + to_string(times[1 + i]) + ",asetpts=PTS-STARTPTS,atempo=" + to_string(mySpeed) + "[a" + to_string(i+1) + "]; ";
       }
       cmd = cmd + "[0:v]trim=" + to_string(times[i]) + ",setpts=" + to_string(1/(i%2==1? first_speed : second_speed)) + "*(PTS-STARTPTS)[v" + to_string(i + 1) + "]; ";
       acmd= acmd + "[0:a]atrim=" + to_string(times[i]) + ",asetpts=PTS-STARTPTS,atempo=" + to_string(i%2==1? first_speed : second_speed) + "[a" + to_string(i + 1) + "]; ";

       string cnc = "";
       for(int j = 0; j &lt; i + 2; j++){
           cnc = cnc + "[v" + to_string(j) + "][a" + to_string(j) + "]";
       }
       cnc = cnc + "concat=n=" + to_string(i + 2) + ":v=1:a=1";

       cmd = cmd + acmd + cnc + "\" -preset superfast -profile:v baseline " + outpath;

       system(cmd.c_str());
       return 0;
    }
    </double></double></fstream></string></vector></iostream>

    I expect the output to be a video of shorter length to the input. (or equal length if the input video has no quiet parts).

    This sometimes works perfectly :

    Here is the actual command that worked in shortening Jacksfilms’ ’woooooww’ video from 17.200 seconds to 13.434 seconds.

    ffmpeg -loglevel verbose -i WOOOW.mp4 -filter_complex "[0:v]trim=0:0.978250,setpts=1.000000*(PTS-STARTPTS)[v0]; [0:v]trim=0.978250:2.452020,setpts=0.500000*(PTS-STARTPTS)[v1]; [0:v]trim=2.452020:3.706520,setpts=1.000000*(PTS-STARTPTS)[v2]; [0:v]trim=3.706520:5.565560,setpts=0.500000*(PTS-STARTPTS)[v3]; [0:v]trim=5.565560:7.122250,setpts=1.000000*(PTS-STARTPTS)[v4]; [0:v]trim=7.122250:8.272020,setpts=0.500000*(PTS-STARTPTS)[v5]; [0:v]trim=8.272020:8.892350,setpts=1.000000*(PTS-STARTPTS)[v6]; [0:v]trim=8.892350:10.034100,setpts=0.500000*(PTS-STARTPTS)[v7]; [0:v]trim=10.034100:11.695400,setpts=1.000000*(PTS-STARTPTS)[v8]; [0:v]trim=11.695400:13.783300,setpts=0.500000*(PTS-STARTPTS)[v9]; [0:v]trim=13.783300,setpts=1.000000*(PTS-STARTPTS)[v10]; [0:a]atrim=0:0.978250,asetpts=PTS-STARTPTS,atempo=1.000000[a0]; [0:a]atrim=0.978250:2.452020,asetpts=PTS-STARTPTS,atempo=2.000000[a1]; [0:a]atrim=2.452020:3.706520,asetpts=PTS-STARTPTS,atempo=1.000000[a2]; [0:a]atrim=3.706520:5.565560,asetpts=PTS-STARTPTS,atempo=2.000000[a3]; [0:a]atrim=5.565560:7.122250,asetpts=PTS-STARTPTS,atempo=1.000000[a4]; [0:a]atrim=7.122250:8.272020,asetpts=PTS-STARTPTS,atempo=2.000000[a5]; [0:a]atrim=8.272020:8.892350,asetpts=PTS-STARTPTS,atempo=1.000000[a6]; [0:a]atrim=8.892350:10.034100,asetpts=PTS-STARTPTS,atempo=2.000000[a7]; [0:a]atrim=10.034100:11.695400,asetpts=PTS-STARTPTS,atempo=1.000000[a8]; [0:a]atrim=11.695400:13.783300,asetpts=PTS-STARTPTS,atempo=2.000000[a9]; [0:a]atrim=13.783300,asetpts=PTS-STARTPTS,atempo=1.000000[a10]; [v0][a0][v1][a1][v2][a2][v3][a3][v4][a4][v5][a5][v6][a6][v7][a7][v8][a8][v9][a9][v10][a10]concat=n=11:v=1:a=1" -preset superfast -profile:v baseline shortWOWOUT.mp4 2> shortWOWOUT.mp4_log.txt

    But sometimes the code stops and returns an error :

    Assertion start_sample &lt; end_sample || (start_sample == end_sample &amp;&amp; !frame->nb_samples) failed at libavfilter/trim.c:303

    This seems to only happen when ffmpeg is rendering somewhere around the 3 minute mark. There does not seem to be a correlation of file size, resolution, bitrate, framerate, or length of the generated command. There does seem to be a correlation with the length of the input video, but I’m not sure what it is e.g. a 3m56s video worked fine but a 5m57 video threw an error.

    Is there a way to fix this ? Or is this program doomed to fail when the input video passes some unknown cut-off time ?