Recherche avancée

Médias (0)

Mot : - Tags -/médias

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

Autres articles (58)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (6416)

  • FFMpeg- Raw compressed data to video

    21 août 2012, par p.streef

    I'm trying to use FFMpeg to create a video. So far i've been playing with a multiplexing example :
    http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html, and i'm able to create a compressed video from an already existing video.

    Because my program is going to run on an embedded platform I would like to use some custom code (generated by a colleague) to compress the video data and place it into the video file.
    So I'm looking for a way to create a video file in c/c++ using ffmpeg in which i have full control over the compression part (to basically circumvent ffmpeg from doing the compression for me and inserting my own code).

    To clarify i'm planning to use this to save film from an intelligent camera into a compressed h264 mpeg-4 file.

  • FFmpeg - generate x264 CBR video transport stream with C-API

    6 juillet 2020, par ZeroDefect

    Using various posts sprinkled around the Internet, including this one here on SO, I've been able to understand how to use the FFmpeg cli to generate a CBR video bitrate using the x264 codec (wrapped in an MPEG-2 transport stream). Note : I'm concerned with the video bitrate - nothing else.

    


    ffmpeg -i cbr_test_file_input.mp4 -c:v libx264 -pix_fmt yuv420p -b:v 6000000 -preset fast -tune film -g 25 -x264-params vbv-maxrate=6000:vbv-bufsize=6000:force-cfr=1:nal-hrd=cbr -flags +ildct+ilme x264_cbr_test_output.ts


    


    However, I'm trying to approach this from an FFmpeg C-API point of view. I'm having issues. I've knocked together some code to try do something very similar to what is being done in the FFmpeg CLI. I can generate a transport stream of what I think should be CBR, but the profile of the video bitrate is very different from what I thought was the FFmpeg cli equivalent :

    


    The initialisation of the AVCodecContext looks something like :

    


          av_dict_set(&amp;pDict, "preset", "faster", 0);&#xA;      av_dict_set(&amp;pDict, "tune", "film", 0);&#xA;      av_dict_set_int(&amp;pDict, "rc-lookahead", 25, 0);&#xA;&#xA;      pCdcCtxOut->width = pCdcCtxIn->width;&#xA;      pCdcCtxOut->height = pCdcCtxIn->height;&#xA;      pCdcCtxOut->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;      pCdcCtxOut->gop_size = 25;&#xA;&#xA;      // Going for 6Mbit/s&#xA;      pCdcCtxOut->bit_rate = 6000000;&#xA;      //pCdcCtxOut->rc_min_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_max_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_buffer_size = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_initial_buffer_occupancy = static_cast<int>((pCdcCtxOut->bit_rate * 9) / 10);&#xA;&#xA;      std::string strParams = "vbv-maxrate="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":vbv-bufsize="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":force-cfr=1:nal-hrd=cbr";&#xA;&#xA;      av_dict_set(&amp;pDict, "x264-params", strParams.c_str(), 0);&#xA;&#xA;      pCdcCtxOut->field_order = AV_FIELD_TT;&#xA;      pCdcCtxOut->flags = (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME | AV_CODEC_FLAG_CLOSED_GOP);&#xA;&#xA;      // WARN: Make some assumptions here!&#xA;      pCdcCtxOut->time_base = AVRational{1,25};&#xA;      pCdcCtxOut->framerate = AVRational{25,1};&#xA;      pCdcCtxOut->sample_aspect_ratio = AVRational{64,45};&#xA;</int>

    &#xA;

    The output graphs appear very different :

    &#xA;

    FFmpeg CLI output

    &#xA;

    Above is the FFmpeg CLI output - video bitrate holds fairly steady.

    &#xA;

    enter image description here

    &#xA;

    Above is the output of my sample application - some significant dips in the video bitrate.

    &#xA;

    I've taken this a step further and created a git repo consisting of :

    &#xA;

      &#xA;
    • Code of sample application
    • &#xA;

    • Test input file (.mp4)
    • &#xA;

    • Outputs (.ts file) of tests
    • &#xA;

    • Graphs of output bitrates.
    • &#xA;

    &#xA;

  • Reducing the bit rate is dropping the audio stream [closed]

    19 février 2013, par user977505

    I'm a newbie to the ffmpeg, x264 commands and conversion. So please bear w/ me.

    I've a H.264 content w/ very high bit rate and I'm using ffmepg, x264 commands to reduce the bit rate. The bit rate is getting reduced but the problem is the output doesn't have the audio stream anymore.

    Here are the commands, I'm using :

    ffmpeg.exe  -i King_Maker_Leader.mp4 -pix_fmt yuv420p -vf scale=1024:576 -r 24 \
      -f yuv4mpegpipe - | x264.exe  —bitrate 1664 —demuxer y4m \
      —preset slow —ref 3 —threads 6 —thread-input —no-scenecut \
      —no-interlaced —stats King_Maker_Leader.stats —vbv-bufsize 3328000 \
      —vbv-maxrate 1996 —pass 1 —output NUL —profile main —level 3.1 —sar 1:1 \
      —tune film —keyint 96 -
    

    ffmpeg.exe -i King_Maker_Leader.mp4 -pix_fmt yuv420p -vf scale=1024:576 \
    -r 24 -f yuv4mpegpipe - | x264.exe —bitrate 1664 —demuxer y4m \
    —preset slow —ref 3 —threads 6 —thread-input —no-scenecut \
    —no-interlaced —stats King_Maker_Leader.stats —vbv-bufsize 3328000 \
    —vbv-maxrate 1996 —pass 2 —output King_Maker_Leader_generated.mp4 \
    —profile main —level 3.1 —sar 1:1 —tune film —keyint 96 -

    I cannot figure out what is wrong with the above commands.

    I'm attaching the partial logs from pass 2 command that show the input has two streams (video and audio) and the output has only video stream.

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#39;..\yathrakkarude_sathruka.mp4&#39;:
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf54.6.101
     Duration: 00:01:00.37, start: 0.000000, bitrate: 8587 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 720x576 [
    SAR 16:11 DAR 20:11], 8073 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 508
    kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, yuv4mpegpipe, to &#39;pipe:&#39;:
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf54.25.104
       Stream #0:0(eng): Video: rawvideo (I420 / 0x30323449), yuv420p, 1024x576 [SA
    R 45:44 DAR 20:11], q=2-31, 200 kb/s, 90k tbn, 24 tbc
       Metadata:
         handler_name    : VideoHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> rawvideo)
    Press [q] to stop, [?] for help
    [yuv4mpegpipe @ 016d5800] Encoder did not produce proper pts, making some up.
    y4m [info]: 1024x576p 45:44 @ 24/1 fps (cfr)
    x264 [info]: using SAR=1/1
    x264 [warning]: VBV buffer (2000000) > level limit (14000)
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT