Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (59)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (8584)

  • ffmpeg transcoding.c problems about 'dimensions not set'

    11 mars 2016, par Park Han Wool

    guys

    I try to solve this problem in transcoding.c example about FFMPEG. but I don’t know how to approach...

    this is my problem

    [libx264 @ 00000000022c7120] dimensions not set

    Cannot open video encoder for stream #0

    Error occurred : Invalid argument

    here is my code to fix the transcoding.c example a little bit

    static int open_output_file(const char *filename)
    {
       AVStream *out_stream;
       AVStream *in_stream;
       AVCodecContext *dec_ctx, *enc_ctx;
       AVCodec *encoder;
       int ret;
       unsigned int i;

       ofmt_ctx = NULL;

       avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, filename);

       if (!ofmt_ctx) {
           av_log(NULL, AV_LOG_ERROR, "Could not create output context\n");
           return AVERROR_UNKNOWN;
       }



       for (i = 0; i < ifmt_ctx->nb_streams; i++) {

           in_stream = ifmt_ctx->streams[i];

           out_stream = avformat_new_stream(ofmt_ctx, NULL);

           if (!out_stream) {
               av_log(NULL, AV_LOG_ERROR, "Failed allocating output stream\n");
               return AVERROR_UNKNOWN;
           }


           dec_ctx = avcodec_alloc_context3(in_stream->codec->codec);
           enc_ctx = avcodec_alloc_context3(out_stream->codec->codec);


           printf("codec name : %s \n", avcodec_get_name(enc_ctx->codec_id));


           if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {



               /* in this example, we choose transcoding to same codec */
               encoder = avcodec_find_encoder(dec_ctx->codec_id);


               //encoder = avcodec_find_encoder(AV_CODEC_ID_H264);

               if (!encoder) {
                   av_log(NULL, AV_LOG_FATAL, "Necessary encoder not found\n");
                   return AVERROR_INVALIDDATA;
               }



               /* In this example, we transcode to same properties (picture size,
               * sample rate etc.). These properties can be changed for output
               * streams easily using filters */
               if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {


                   enc_ctx->height = dec_ctx->height;
                   enc_ctx->width = dec_ctx->width;
                   enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;

                   /* take first format from list of supported formats */
                   //enc_ctx->pix_fmt = encoder->pix_fmts[0];
                   enc_ctx->pix_fmt = AV_PIX_FMT_YUV420P;

                   /* video time_base can be set to whatever is handy and supported by encoder */
                   enc_ctx->time_base = dec_ctx->time_base;

               }

               else {
                   enc_ctx->sample_rate = dec_ctx->sample_rate;
                   enc_ctx->channel_layout = dec_ctx->channel_layout;
                   enc_ctx->channels = av_get_channel_layout_nb_channels(enc_ctx->channel_layout);

                   /* take first format from list of supported formats */
                   enc_ctx->sample_fmt = encoder->sample_fmts[0];
                   enc_ctx->time_base.num = 1;
                   enc_ctx->time_base.den = enc_ctx->sample_rate;
               }


               /* Third parameter can be used to pass settings to encoder */
               ret = avcodec_open2(enc_ctx, encoder, NULL);



               if (ret < 0) {
                   cout << "ret<0" << endl;
                   av_log(NULL, AV_LOG_ERROR, "Cannot open video encoder for stream #%u\n", i);
                   return ret;
               }


           }
           else if (dec_ctx->codec_type == AVMEDIA_TYPE_UNKNOWN) {
               av_log(NULL, AV_LOG_FATAL, "Elementary stream #%d is of unknown type, cannot proceed\n", i);
               return AVERROR_INVALIDDATA;
           }
           else {
               /* if this stream must be remuxed */
               ret = avcodec_copy_context(ofmt_ctx->streams[i]->codec, ifmt_ctx->streams[i]->codec);
               if (ret < 0) {
                   av_log(NULL, AV_LOG_ERROR, "Copying stream context failed\n");
                   return ret;
               }
           }

           if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
               enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;

       }

       av_dump_format(ofmt_ctx, 0, filename, 1);

       if (!(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) {
           ret = avio_open(&ofmt_ctx->pb, filename, AVIO_FLAG_WRITE);
           if (ret < 0) {
               av_log(NULL, AV_LOG_ERROR, "Could not open output file '%s'", filename);
               return ret;
           }
       }

       /* init muxer, write output file header */
       ret = avformat_write_header(ofmt_ctx, NULL);
       if (ret < 0) {
           av_log(NULL, AV_LOG_ERROR, "Error occurred when opening output file\n");
           return ret;
       }

       return 0;

    }

    what part I didn’t check....

    and why avcodec_open2 does not work...

  • Using ffmpeg library

    29 juillet 2014, par DAVIDBALAS1

    Thx all for helping <3

    So, I have downloaded the ffmpeg library, imported it to eclipse, added it as a library to my android application and tried to use it, it doesn’t work.

    Step by step :

    • Downloaded this file : https://github.com/guardianproject/android-ffmpeg-java
    • Extracted it to an empty folder.
    • At Eclipse, "import" and then I have selected this empty folder.
    • Right click at my project, properties, android, added the ffmpeg library.
    • At my on create I used this code(just for checking) :

      ffmpeg -t 30 -i inputfile.mp3 -acodec copy outputfile.mp3

    But I get a lot of errors :

    Multiple markers at this line
    - Syntax error on token(s), misplaced
    construct(s)
    - Syntax error on token "inputfile", delete this
    token
    - Syntax error on token "30", delete this token
    - Syntax error on token ".", ; expected

    Can you see my problem ?

  • A ffmpeg command method into a webjob

    2 juillet 2017, par Fearhunter

    I am new with Azure Webjobs. I made an ffmpeg function to slice a stream into separate mp4 files :

    public Process SliceStream()
    {
       var url = model_s.Url;
       var cuttime = model_s.Cuttime;
       var output = model_s.OutputPath;
       return Process.Start(new ProcessStartInfo
       {
           FileName = "ffmpeg.exe",
           Arguments = $"-i \"{url}\" -c copy -flags +global_header -f segment -segment_time \"{cuttime}\" -segment_format_options movflags=+faststart -reset_timestamps 1 \"{output}\"",
           UseShellExecute = false,
           RedirectStandardOutput = true
       });
    }

    The var properties are the variables for the user input on the front-end. I want to scheduled this method into a webjob. How can I achieve this ? I saw an article on google

    https://zimmergren.net/getting-started-with-building-azure-webjobs-timer-jobs-for-your-office-365-sites/

    Need I just follow these steps to achieve my goal ? Or must I add some C# code to achieve this ?