Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (12)

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

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (3546)

  • как сделать 8 d музыку -> ffmpeg [closed]

    3 janvier 2023, par имя фамилия

    Всех приветствую, подскажите как через ffmpeg создать трек 8D
8D музыка это - метод постобработки аудиозаписи, когда диджеи берут уже существующий трек и микшируют его, создавая эффект движения звука вокруг слушателя.
По сути, 8D-аудио эмулирует звучание surround-формата Ambisonics. Последний подразумевает, что слушатель находится в центре «акустической сферы», по краям которой расставлены источники звука. (на одном форуме спросил что такое 8D)

    


    Писал на форуме, там не знаю решения, пробовал найти в открытых источниках, но видимо таким вопросом не задавались

    


  • Using batch, how would you iterate through an array that you don't know how many values it may contain to run a function on each individual variable

    10 mai 2017, par Jay1995

    I have a batch file creating an array of variables it gets from a textfile, as follows :

    for /f "skip=1 tokens=9 delims= " %%a in (%findfile%) do set "_%%a=yes"
    set count = 0
    for /f "tokens=1* delims==#" %%b in ('set _') do (
       set /a count+=1
       set x=%%b
       set location[!count!]=!x:~1!
    )
    set %location%

    I’m trying to get each variable from the array to be looped into a function individually, but have no idea how to do it !!

    The location array storing all the variables has to be called into a for loop and the function I’m trying to get it to loop into is an FFMPEG function :

    for %%i in (%location%\*.mp4) do (if not exist "%%~ni\" MD "%%~ni"

       ffmpeg -i "%%i" -vframes 1 -f image2 -start_number 0
       "%%~ni\%%~ni_Summary_%%3d.jpeg"

    )

    All HELP would be greatly appreciated

  • Minimal sample of muxing two streams with no reencoding (av_interleaved_write_frame fails)

    19 juillet 2022, par Alvein

    What I'm trying to do : having two files, one is video-only and the other is audio-only, with identical durations, I want to "join" them in a single container.

    


    I previously made a routine which just copied all the streams inside a container to another one. No reencoding, etc. This works perfectly :

    


    while(true) {
    pkIn=av_packet_alloc();
    if(NULL==pkIn) {
        fprintf(stderr,"av_packet_alloc() failed");
        break;
    }
    iError=av_read_frame(fcIn,pkIn);
    if(0>iError)
        if(AVERROR_EOF==iError)
            break;
        else {
            fprintf(stderr,"av_read_frame() failed");
            break;
        }
    stIn=fcIn->streams[pkIn->stream_index];
    stOut=fcOut->streams[pkIn->stream_index];
    log_packet(fcIn,pkIn,"in");
    av_packet_rescale_ts(pkIn,stIn->time_base,stOut->time_base);
    pkIn->pos=-1;
    log_packet(fcOut,pkIn,"out");
    iError=av_interleaved_write_frame(fcOut,pkIn);
    if(0>iError) {
        fprintf(stderr,"av_interleaved_write_frame() failed");
        break;
    }
    av_packet_free(&pkIn);
}


    


    I just did the analogy and tried to do the same, but taking each stream from a distinct container, like this :

    


    while(true) {
    if(!bVideoInEOF) {
        pkVideoIn=av_packet_alloc();
        if(NULL==pkVideoIn) {
            fprintf(stderr,"av_packet_alloc(video in) failed");
            break;
        }
        iError=av_read_frame(fcVideoIn,pkVideoIn);
        if(0>iError)
            if(AVERROR_EOF==iError)
                bVideoInEOF=true;
            else {
                fprintf(stderr,"av_read_frame(video in) failed");
                break;
            }
        if(!bVideoInEOF) {
            log_packet(fcVideoIn,pkVideoIn,"video in");
            av_packet_rescale_ts(pkVideoIn,stVideoIn->time_base,stVideoOut->time_base);
            pkVideoIn->pos=-1;
            pkVideoIn->stream_index=stVideoOut->index; // Edit (2022-07-19)
            log_packet(fcVideoIn,pkVideoIn,"video out");
            iError=av_interleaved_write_frame(fcOut,pkVideoIn);
            if(0>iError) {
                fprintf(stderr,"av_interleaved_write_frame(video out) failed");
                break;
            }
        }
        av_packet_free(&pkVideoIn);
    }
    if(!bAudioInEOF) {
        pkAudioIn=av_packet_alloc();
        if(NULL==pkAudioIn) {
            fprintf(stderr,"av_packet_alloc(audio in) failed");
            break;
        }
        iError=av_read_frame(fcAudioIn,pkAudioIn);
        if(0>iError)
            if(AVERROR_EOF==iError)
                bAudioInEOF=true;
            else {
                fprintf(stderr,"av_read_frame(audio in) failed");
                break;
            }
        if(!bAudioInEOF) {
            log_packet(fcAudioIn,pkAudioIn,"audio in");
            av_packet_rescale_ts(pkAudioIn,stAudioIn->time_base,stAudioOut->time_base);
            pkAudioIn->pos=-1;
            pkAudioIn->stream_index=stAudioOut->index; // Edit (2022-07-19)
            log_packet(fcAudioIn,pkAudioIn,"audio out");
            iError=av_interleaved_write_frame(fcOut,pkAudioIn);
            if(0>iError) {
                fprintf(stderr,"av_interleaved_write_frame(audio out) failed");
                break;
            }
        }
        av_packet_free(&pkAudioIn);
    }
    if(bVideoInEOF&&bAudioInEOF)
        break;
}


    


    I know the previous code looks like redundant but I wanted to leave both streams "processing" separated the way you understand my plans.

    


    Anyway, that code ends quickly with "av_interleaved_write_frame(audio out) failed".

    


    The error detail is "Invalid argument", and the debugger shows this :

    


    


    Application provided invalid, non monotonically increasing dts to
muxer in stream 0.

    


    


    If I disable any of the main blocks "if(!bVideoInEOF)" / "if(!bAudioInEOF)", the file is written successfully, with the obvious lack of the disabled stream.

    


    I'm new into using this library so probably I'm doing something really stupid, or missing something obvious.

    


    Suggestions ?

    


    Edit (2022-07-19) :

    


    By checking the logs, I noticed I was writing every frame to the stream #0. Hence, the horrible jumps in PTS/DTS.

    


    Code edited by adding the corresponding "...->stream_index=" before each call to av_interleaved_write_frame().

    


    ...

    


    Though it works, I still think my code is far from perfect. Comments are welcome.