Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (102)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (11335)

  • FFMPEG Combine multiple commands into one script

    16 février 2017, par ObeeWnn

    I need some help combining ffmpeg commands into a python or bash script :

    \Download
    Youtube-dl URL

    \Concatenate videos

    WD = "C:\"
    import glob
    files = glob.glob ('*.mp4')
    with open ('output.txt', 'w') as in_files:
       for eachfile in files: in_files.write('file \''+eachfile+'\'\n')

    ffmpeg -y -f concat -i output.txt -c copy input.mp4

    \Encode
    ffmpeg -y -threads 16 -i input.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate1.ts
    ffmpeg -y -threads 16 -i endscreen720.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate2.ts
    ffmpeg -y -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc tmp.mp4
    ffmpeg -y -i tmp.mp4 -itsoffset 00:00:20 -i lt1sub.avi -filter_complex overlay tmp1.mp4
    ffmpeg -y -i tmp1.mp4 -i intro.avi -filter_complex overlay tmp1a.mp4
    ffmpeg -y -i tmp1a.mp4 -i watermarkfile720.png -filter_complex "[0:v]drawtext=enable='between(n,30,116)' : 'fontfile=/Windows/Fonts/arial.ttf':text='TEXTGOESHERE':fontcolor=white:fontsize=50:x=150:y=(300)+th[text]; [text][1:v]overlay[filtered]" -map "[filtered]" -map 0:a -codec:v libx264 -codec:a copy tmp2.mp4
    ffmpeg -y -i tmp2.mp4 -r 60 -vf scale=1920:1080 output.mp4


    \Create Thumbnail
    ffmpeg -y -i tmp1.mp4 -vf drawtext="fontfile=/Windows/Fonts/arial.ttf': text='':fontcolor=white@1.0:fontsize=120:y=0:x=100" -ss 00:00:12 -vframes 1 out.png

    set /p input= Video #

    ffmpeg -y -i out.png  -i tnOverlay.png -filter_complex overlay,drawtext="fontfile=/Windows/Fonts/arial.ttf': text="%input%":fontcolor=white@1.0:fontsize=120:y=25:x=1190" out.png

    This is to download videos, place an intro video in the beginning, draw text over intro, concatenate the videos, apply watermark throughout video, apply outro, create thumbnail, etc.
    My FFmpeg compile :

    ffmpeg version N-83522-g6a37abc59a Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (Rev1, Built by MSYS2 project)
     configuration:  --enable-avisynth --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-schannel --enable-sdl2 --enable-decklink --enable-fontconfig --enable-frei0r --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmfx --enable-libmodplug --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxavs --enable-libxvid --enable-libzimg --enable-openssl --enable-libsnappy --enable-gpl --enable-opencl --enable-opengl --enable-libcdio --enable-libfdk-aac --enable-libkvazaar --enable-librubberband --enable-libssh --enable-libtesseract --enable-libzvbi --enable-chromaprint --enable-libopenh264 --enable-libopenmpt --enable-netcdf --disable-w32threads --enable-version3 --enable-nonfree --enable-filter=frei0r --disable-debug
     libavutil      55. 47.100 / 55. 47.100
     libavcodec     57. 80.100 / 57. 80.100
     libavformat    57. 66.102 / 57. 66.102
     libavdevice    57.  2.100 / 57.  2.100
     libavfilter     6. 73.100 /  6. 73.100
     libswscale      4.  3.101 /  4.  3.101
     libswresample   2.  4.100 /  2.  4.100
     libpostproc    54.  2.100 / 54.  2.100

    Would like to use libfdk-aac and x264, or highest quality possible. The video source will be at 720p60fps and will be rendered to 1080p60fps.

  • ffmpeg c# Windows forms

    7 février 2017, par TODO

    I’m fairly new to windows forms and ffmpeg (unity background).

    I’m trying to get a button click on a windows form to take a png sequence, and convert it to an mp4 with ffmpeg.

           Process ffmpeg = new Process();

           ffmpeg.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, @"c:\test\ffmpeg.exe");

           ffmpeg.StartInfo.Arguments = "-framerate 25 -i 0001_IMG%03d.JPG -c:v libx264 -preset ultrafast -crf 0 -vf scale=-2:1080 -pix_fmt yuv420p temp.mp4";

           ffmpeg.Start();

    I have no problem running the same ffmpeg command from cmd, or from within a c++ console application I experimented with Using system("")

    I’ve been stuck on this for a little longer than I care to admit, and have tried searching for answers, but am still learning as i go.

    Any help would be much appreciated.

  • Can't replicate FFMpeg Prores quality setting

    3 février 2017, par Ben L

    Using ffmpeg as a library. I’m looking to create a global-quality slider with very inconsistent results. AvCodecContext::global_quality seems like a good place to start. Not all lossy codecs make reference to this member, but it does appear to work for ProRes.

    c:\>ffmpeg.exe -i test.mov -c:v prores_ks -q:v 28 out.mov     # output 10mb file

    c:\>ffmpeg.exe -i test.mov -c:v prores_ks -q:v 2 out.mov     # output 28mb file

    Great. Now let’s do it in code. Based on Muxing.c. I’m distilling down the code a lot just to give a hint about which api’s I’m calling.

    AVStream* AddStream(AVFormatContext* formatContext, int quality)
    {
       AVCodec* codec = AVFindEncoder("prores_ks");

       AVStream* newStream = avformat_new_stream(formatContext, codec);

       newStream->id = formatContext->nb_streams - 1;

       AVCodecContext c = avcodec_alloc_context3(codec);

       c->codec_id = AV_CODEC_ID_PRORES;
       c->codec_type = AVMEDIA_TYPE_VIDEO;
       c->width = 1920;
       c->height = 1080;

       newStream->time_base = av_inv_q(frameRate);
       c->time_base = av_inv_q(frameRate);

       c->pix_fmt = AV_PIX_FMT_YUVA444P10;

       c->global_quality = quality;

       return newStream;
    }
    ......
    //excerpt from WriteFrame()

    AVPacket pkt;
    av_init_packet(&pkt);
    pkt.data= pVideoBuffer;
    pkt.size= iVideoBufferSize;
    int gotpkt = 0;
    int ret = avcodec_encode_video2(pCodecContext, &pkt, pPicture, &gotpkt);
    if (ret == 0)
    {
       av_packet_rescale_ts(&pkt, pCodecContext->time_base, pVideoStream->time_base);

       if (gotpkt) {
           ret = av_interleaved_write_frame(pFormatContext, &pkt);
       }
    }

    I can’t get quality to affect the size of the output. Any ideas ?

    This is the excerpt from proresenc_kostya.c

    ctx->force_quant = avctx->global_quality / FF_QP2LAMBDA;
    if (!ctx->force_quant) {
       if (!ctx->bits_per_mb) {
           for (i = 0; i < NUM_MB_LIMITS - 1; i++)
               if (prores_mb_limits[i] >= ctx->mb_width * ctx->mb_height *
                                          ctx->pictures_per_frame)
                   break;
           ctx->bits_per_mb   = ctx->profile_info->br_tab[i];
       } else if (ctx->bits_per_mb < 128) {
           av_log(avctx, AV_LOG_ERROR, "too few bits per MB, please set at least 128\n");
           return AVERROR_INVALIDDATA;
       }

       min_quant = ctx->profile_info->min_quant;
       max_quant = ctx->profile_info->max_quant;
       for (i = min_quant; i < MAX_STORED_Q; i++) {
           for (j = 0; j < 64; j++)
               ctx->quants[i][j] = ctx->quant_mat[j] * i;
       }

       ctx->slice_q = av_malloc(ctx->slices_per_picture * sizeof(*ctx->slice_q));
       if (!ctx->slice_q) {
           encode_close(avctx);
           return AVERROR(ENOMEM);
       }

       ctx->tdata = av_mallocz(avctx->thread_count * sizeof(*ctx->tdata));
       if (!ctx->tdata) {
           encode_close(avctx);
           return AVERROR(ENOMEM);
       }

       for (j = 0; j < avctx->thread_count; j++) {
           ctx->tdata[j].nodes = av_malloc((ctx->slices_width + 1)
                                           * TRELLIS_WIDTH
                                           * sizeof(*ctx->tdata->nodes));
           if (!ctx->tdata[j].nodes) {
               encode_close(avctx);
               return AVERROR(ENOMEM);
           }
           for (i = min_quant; i < max_quant + 2; i++) {
               ctx->tdata[j].nodes[i].prev_node = -1;
               ctx->tdata[j].nodes[i].bits      = 0;
               ctx->tdata[j].nodes[i].score     = 0;
           }
       }
    }

    Edit :

    Outputs from ffmpeg.exe :

    profile 4, 1020 slices, interlacing: no, 6576 bits per MB
    frame size upper bound: 11429274

    Output from ffmpeg avlog on my app :

    profile 4, 1020 slices, interlacing: no, 1425 bits per MB
    frame size upper bound: 6170103