Recherche avancée

Médias (0)

Mot : - Tags -/utilisateurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (74)

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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (6375)

  • PHP ffmpeg exec returns null

    19 mars 2012, par benedict_w

    I'm trying to run ffmpeg through a PHP exec call, I've been debugging for a while and looked at lot of responses on here, but still not found any answers...

    My simplified call is :

    $cmd = 'ffmpeg 2>&1';

    exec(escapeshellcmd($cmd), $stdout, $stderr);

    var_dump($stderr);
    var_dump($stdout);
    var_dump($cmd);
    exit;

    My output is $stderr = int(1) and $stdout = array(0)

    Also I tried shell_exec($cmd) which returns NULL.

    cmd.exe has permissions set for the IUSR account - e.g. I can run $cmd = 'dir' and see a directory listing output.

    PHP is not running in safe mode.

    The ffmpeg.exe is in the same directory as my php file, but I have the same response giving an absolute path to the ffmpeg.exe file in $cmd.

    ffmpeg is executing fine from the command line.

    I'm running Windows XP, IIS and PHP 5.3.

    EDIT :

    If I run 'ffmpeg -h' I get the help commands, which must indicated that ffmpeg is recognised

    I've increased the PHP memory limit to 1024 - no luck.

  • Decode audio using libavcodec and play using libAO ?

    21 mars 2012, par Ashika Umanga Umagiliya

    I use following code snippet to decode audio files (tested with MP3,WAV,WMV).

    But when it plays the audio , it just gives static sounds and crashes time to time.
    Any hints on what i am doing wrong here ?

    #include
    #include
    #include
    #include


    extern "C" {
    #include "libavutil/mathematics.h"
    #include "libavformat/avformat.h"
    #include "libswscale/swscale.h"
    #include <ao></ao>ao.h>

    }

    void die(const char *msg)
    {
       fprintf(stderr,"%s\n",msg);
       exit(1);
    }

    int main(int argc, char **argv)
    {

       const char* input_filename=argv[1];

       //avcodec_register_all();
       av_register_all();
       //av_ini

       AVFormatContext* container=avformat_alloc_context();
       if(avformat_open_input(&amp;container,input_filename,NULL,NULL)&lt;0){
           die("Could not open file");
       }

       if(av_find_stream_info(container)&lt;0){
           die("Could not find file info");
       }
       av_dump_format(container,0,input_filename,false);

       int stream_id=-1;
       int i;
       for(i=0;inb_streams;i++){
           if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
               stream_id=i;
               break;
           }
       }
       if(stream_id==-1){
           die("Could not find Audio Stream");
       }

       AVDictionary *metadata=container->metadata;

       AVCodecContext *ctx=container->streams[stream_id]->codec;
       AVCodec *codec=avcodec_find_decoder(ctx->codec_id);

       if(codec==NULL){
           die("cannot find codec!");
       }

       if(avcodec_open(ctx,codec)&lt;0){
           die("Codec cannot be found");
       }

       //ctx=avcodec_alloc_context3(codec);

       //initialize AO lib
       ao_initialize();

       int driver=ao_default_driver_id();

       ao_sample_format sformat;
       sformat.bits=16;
       sformat.channels=2;
       sformat.rate=44100;
       sformat.byte_format=AO_FMT_NATIVE;
       sformat.matrix=0;

       ao_device *adevice=ao_open_live(driver,&amp;sformat,NULL);
       //end of init AO LIB

       AVPacket packet;
       av_init_packet(&amp;packet);

       AVFrame *frame=avcodec_alloc_frame();

       int buffer_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
       uint8_t buffer[buffer_size];
       packet.data=buffer;
       packet.size =buffer_size;



       int len;
       int frameFinished=0;
       while(av_read_frame(container,&amp;packet)>=0)
       {

           if(packet.stream_index==stream_id){
               //printf("Audio Frame read  \n");
               int len=avcodec_decode_audio4(ctx,frame,&amp;frameFinished,&amp;packet);
               //frame->
               if(frameFinished){
                   //printf("Finished reading Frame %d %d\n",packet.size,len);
                   ao_play(adevice, (char*)frame->data, len);
               }

           }


       }

       av_close_input_file(container);
       ao_shutdown();
       return 0;
    }
  • Sending big packets gets Bad Address error

    30 mars 2012, par Roi

    Im writing a live webcam stream using ffmpeg and sdl on C.
    my platform is linux.

    my application is a client server based.
    The client is reading from the webcam, produce an AVPacket, then send to server.

    My problem is, that the AVPacket struct has a member named data which is approximately 600k.
    At first, i had not checked the send() return value,
    So, of course the packet had failed to send completely.

    But after I checked, the send() returns Bad Address error at the second iteration of the big packet.
    the length of the data packet must be correct because is supplied from the AVPacket struct.

    It sends 2 members of the AVPacket before, so the server is up and functional.

    The problematic section :

       int send_video_data(video_client_t *client, void* buf, int length)
       {
           int rc;

           while (length > 0)
           {
              if ((rc = send(client->sockfd, buf, length, 0)) == -1) {
                        perror("failed sending data to server");
                        exit(1);
               }

               length-=rc;
               buf+=rc;
           }

           return 0;

       }

    Any one got any ideas why it's not working ?
    Thanks in advanced !