Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (52)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (5894)

  • FFMPEG documentation example for chromakey doesn't work for green background png file

    15 septembre 2021, par JPM

    Im new in FFMPEG and I try to make just simple green background chroma keying of png images.
In FFMPEG documentation in 38.16 Chromakey - there is an example script :

    



    ffmpeg -i input.png -vf chromakey=green out.png

    



    for which is said that "Make every green pixel in the input image transparent"
That exactly what i wanted.
I tried with many different png images but the result is always a copy of input image.
Also i replaced the word "green" to 0x00FF00 or 0x008000 and still no successes. Only when replacing green to black and then the result is as expected - transparent.
Im working on Windows with pre-build binaries of FFMpeg.
What am I missing ?
Thanks.

    


  • Audiopulse record multiple xfbv screens with python

    7 octobre 2020, par Eric Lagarda

    I’m trying to do something complicated and I need some help.

    


    I’m able to record a session (video and audio) with python using xvfb and ffmpeg.

    


    I just want to visit a page using selenium and record the video and audio. It’s working but when I try to run multiple instances, the audio is mixing between records.

    


    How can achieve that ? I’m using pulseaudio. I know that with also you can set like a interface per instance, but I don’t know how to do it.

    


    Thanks for you support and comments.

    


  • When decoding video with ffmpeg and playing the decoded audio data with SDL2, it's all noise [closed]

    18 février, par jodan feng

    it is the code in the main thread

    


    int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Ffplay f;
    f.start();
    return a.exec();
}


    


    Ffplay is the thread that decode the video and play it

    


    class Ffplay : public QThread
{
   Q_OBJECT
public:
    Ffplay();
    protected:
      void run() override;
public:
    AVFormatContext* format2;
    Thread2 t2;
};
Ffplay::Ffplay() {}

void Ffplay::run(){
    format2=avformat_alloc_context();
    avformat_open_input(&format2,"c:/Qt/project/player/movie.mp4",NULL,NULL);
    avformat_find_stream_info(format2,NULL);
    t2.format=format2;
    t2.start();
}


    


    Thread2 is the thread that decoed the audio part and play it

    


    class Thread2 : public QThread
{
    Q_OBJECT
public:
    Thread2();
protected:
    void run() override;
public:
    AVFormatContext* format;
    AVCodecContext* codec;
    const AVCodec* c;
    AVPacket* packet;
    AVFrame* frame;
    SwrContext* s;
    FILE* f;
    FILE* f2;

};
Thread2::Thread2() {}

struct Sound
{
    Uint8* data;
    Uint32 position=0;
    Uint32 len;
};

Sound* d=new Sound;

void write(void* userdata,Uint8* stream,int len){
    SDL_memset(stream,0,len);
    int size2=std::min((Uint32)len,d->len-d->position);
    SDL_memcpy(stream,d->data+d->position,size2);
    d->position=d->position+size2;
}


void Thread2::run(){
    int index=-1;
    for(unsigned int i=0;inb_streams;i++){
        if(format->streams[i]->codecpar->codec_type==AVMEDIA_TYPE_AUDIO){
            index=i;
            break;
        }
    }
    c=avcodec_find_decoder(format->streams[index]->codecpar->codec_id);
    codec=avcodec_alloc_context3(c);
    avcodec_parameters_to_context(codec,format->streams[index]->codecpar);
    avcodec_open2(codec,c,NULL);
    packet=av_packet_alloc();
    frame=av_frame_alloc();
    s=swr_alloc();
    swr_alloc_set_opts2(&s,&codec->ch_layout,AV_SAMPLE_FMT_S16,codec->sample_rate,&codec->ch_layout,codec->sample_fmt,codec->sample_rate,0,NULL);
    swr_init(s);
    f=fopen("yinpin","wb");
    uint8_t* buff=(uint8_t*)av_malloc(2*1024*4);  
    while(av_read_frame(format,packet)==0){
        if(packet->stream_index==1){
            avcodec_send_packet(codec,packet);
            while(avcodec_receive_frame(codec,frame)>=0){
                swr_convert(s,&buff,2*1024*2*2,(const uint8_t **)frame->data,frame->nb_samples);
                int size=av_samples_get_buffer_size(NULL,2,frame->nb_samples,AV_SAMPLE_FMT_S16,1);
                fwrite(buff,1,size,f);
            }
        }
    }


    SDL_Init(SDL_INIT_AUDIO);
    SDL_AudioSpec spec;
    spec.freq=48000;
    spec.format=AUDIO_S16;
    spec.channels=2;
    spec.samples=1024;
    spec.callback=write;
    SDL_OpenAudio(&spec,NULL);
    SDL_PauseAudio(0);
    f2=fopen("yinpin","rb");
    uint8_t* buff2=(uint8_t*)av_malloc(2*2*1024*2);
    size_t size=10;
    while(size>0){
        size=fread(buff2,1,2*2*1024*2,f2);
        d->data=buff2;
        d->len=(Uint32)size;
    }
}


    


    After the program is run, the sound played is all noise, which makes me a little confused because I don't know whether it is a decoding problem or a problem with SDL2 audio playback. Is there any troubleshooting method ? Has anyone figured out the source of the problem ?