Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (76)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • 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 (12185)

  • FFMPEG - convert video without losing resolution

    20 février 2020, par Srh

    I am using ffmpeg to convert mp4 video from youtube. The video is HD 1080. When I convert it to mpeg2video, the video loses its sharpness, regardless of the -s 1920x1080 parameter. How can I convert the video without losing picture sharpness ? The command I use is :

    ffmpeg -i BBB.mp4 -vcodec mpeg2video -s1920x1080 -acodec copy -f mpegts BBB.ts

  • setting bit rates in creating video from images in ffmpeg not working

    2 mai 2014, par mast kalandar

    I have a HQ video of one second

    Some information of this video is as below

    Dimensions : 1920 x 1080    
    Codec : H.264    
    Framerate : 30 frames per second    
    Size : 684.7 kB (6,84,673 bytes)
    Bitrates : 5458 kbps

    I have extracted frames from video

    ffmpeg -i f1.mp4 f%d.jpg

    All images are of 1920 x 1020 pixels by default 30 frames are generated (f7_1.jpg, f7_2.jpg,.....,f7_30.jpg)

    I have added some texts and objects to these images (without changing dimensions of any image, all 30 images are still of 1920 x 1020 pixels)

    Now I am trying to merge all these images to create single video (of 1 second)

    I referred this official document, I have run below command

    ffmpeg -f image2 -i f7_%d.jpg -r 30 -b:v 5458k foo_5458_2.mp4

    Video created is also of one second, thing is its bit rates are higher then the original one. New video has 6091 kbps bit rates, while I expect are 5458 kbps only.

    Because of higher bits, its gets finish very quickly compare to original video in video player.

    Is there any thing I missing ??

    And I don’t know what is exact meaning and job of -f image2 option, when I run command without this option, I am getting same video.

  • libx264 encoder video plays too fast

    23 avril 2014, par Nick

    I’m trying to write a program that uses libx264 to encode the video frames. I’ve wrapped this code into a small class (see below). I have frames that are in YUV420 format. libx264 encodes the frames and I save them to a file. I can play the file back in VLC, all of the frames are there, but it plays back at several hundred times the actual frame rate. Currently I am capturing frames at 2.5 FPS, but they play back as if it was recorded at 250 or more FPS. I’ve tried to change the frame rate with no luck.

    I’ve also tried to set

    _param.b_vfr_input = 1

    and then set the time bases appropriately, but that causes my program to crash. Any ideas ? My encode code is shown below. I’ve also included the output of ffprobe -show_frames

    Wrapper Class :

    x264wrapper::x264wrapper(int width, int height, int fps, int timeBaseNum, int timeBaseDen, int vfr)
    {
       x264_param_default_preset(&_param, "veryfast", "zerolatency");
       _param.i_threads = 1;
       _param.i_width = width;
       _param.i_height = height;
       _param.i_fps_num = fps;
       _param.i_fps_den = 1;
       // Intra refres:
       _param.i_keyint_max = fps;
       _param.b_intra_refresh = 1;
       //Rate control:
       _param.rc.i_rc_method = X264_RC_CRF;
       //_param.rc.i_rc_method = X264_RC_CQP;
       _param.rc.f_rf_constant = 25;
       _param.rc.f_rf_constant_max = 35;
       //For streaming:
       _param.b_repeat_headers = 1;
       _param.b_annexb = 1;    
       // misc
       _param.b_vfr_input = vfr;
       _param.i_timebase_num = timeBaseNum;
       _param.i_timebase_den = timeBaseDen;

       _param.i_log_level = X264_LOG_DEBUG;

       _encoder = x264_encoder_open(&_param);

       cout << "Timebase " << _param.i_timebase_num << "/" << _param.i_timebase_den << endl;
       cout << "fps " << _param.i_fps_num << "/" << _param.i_fps_den << endl;
       _ticks_per_frame = (int64_t)_param.i_timebase_den * _param.i_fps_den / _param.i_timebase_num / _param.i_fps_num;
       cout << "ticks_per_frame " << _ticks_per_frame << endl;
       int result = x264_picture_alloc(&_pic_in, X264_CSP_I420, width, height);
       if (result != 0)
       {
           cout << "Failed to allocate picture" << endl;
           throw(1);
       }

       _ofs = new ofstream("output.h264", ofstream::out | ofstream::binary);
       _pts = 0;
    }


    x264wrapper::~x264wrapper(void)
    {
       _ofs->close();
    }



    void x264wrapper::encode(uint8_t * buf)
    {
       x264_nal_t* nals;
       int i_nals;
       convertFromBalserToX264(buf);
       _pts += _ticks_per_frame;
       _pic_in.i_pts = _pts;
       x264_picture_t pic_out;
       int frame_size = x264_encoder_encode(_encoder, &nals, &i_nals, &_pic_in, &pic_out);
       if (frame_size >= 0)
       {
           _ofs->write((char*)nals[0].p_payload, frame_size);
       }
       else
       {
           cout << "error: x264_encoder_encode failed" << endl;
       }
    }

    Output of ffprobe -show_frames :

    [FRAME]
    media_type=video
    key_frame=1
    pkt_pts=N/A
    pkt_pts_time=N/A
    pkt_dts=N/A
    pkt_dts_time=N/A
    pkt_duration=48000
    pkt_duration_time=0.040000
    pkt_pos=0
    width=1920
    height=1080
    pix_fmt=yuv420p
    sample_aspect_ratio=N/A
    pict_type=I
    coded_picture_number=0
    display_picture_number=0
    interlaced_frame=0
    top_field_first=0
    repeat_pict=0
    reference=0
    [/FRAME]
    [FRAME]
    media_type=video
    key_frame=0
    pkt_pts=N/A
    pkt_pts_time=N/A
    pkt_dts=N/A
    pkt_dts_time=N/A
    pkt_duration=N/A
    pkt_duration_time=N/A
    pkt_pos=54947
    width=1920
    height=1080
    pix_fmt=yuv420p
    sample_aspect_ratio=N/A
    pict_type=P
    coded_picture_number=1
    display_picture_number=0
    interlaced_frame=0
    top_field_first=0
    repeat_pict=0
    reference=0
    [/FRAME]
    [FRAME]
    media_type=video
    key_frame=0
    pkt_pts=N/A
    pkt_pts_time=N/A
    pkt_dts=N/A
    pkt_dts_time=N/A
    pkt_duration=N/A
    pkt_duration_time=N/A
    pkt_pos=57899
    width=1920
    height=1080
    pix_fmt=yuv420p
    sample_aspect_ratio=N/A
    pict_type=P
    coded_picture_number=2
    display_picture_number=0
    interlaced_frame=0
    top_field_first=0
    repeat_pict=0
    reference=0
    [/FRAME]