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)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (15184)

  • FFMPEG merge two .mp4 videos - resolution distorted

    9 juin 2016, par Misha Moryachok

    I am trying to merge two .mp4 videos, and in some cases the seconds video part is distorted in the output video. Providing an example below :
    https://www.youtube.com/watch?v=wWMNTBWJ37A

    The real video is : https://www.youtube.com/watch?v=ASio-j-Epi8

    As you can see, we added intro before the real content, however, the real content is stretched.
    In my opinion it happens because first video is 1280x720 and the second is 460x720.

    Providing commands for merging videos :

    *1st step (convert the videos from .mp4 to .ts)

    ffmpeg -i videoPathMP4 -c copy -bsf:v h264_mp4toannexb -f mpegts videoPathTS

    *2nd step (merge videos)

    ffmpeg -i "concat:$video1 | $video2" -c copy -bsf:a aac_adtstoasc $meagePathMP4

    Video output is like you saw in provided videolink on youtube.
    I also tried to change the first video resolution to be like the second video :

    ffmpeg -i inputVideo.mp4 -s 460x720 outputVideo.mp4

    However it doesn’t helped.
    Is anyone know how to solve this ?
    Thanks

  • FFmpeg sws_scale crash at certain resolution

    23 mai 2016, par Tamás Szobonya

    I’m having a weird issue with sws_scale. The problem is, that at certain resolutions i got an Access violation reading location exception. Resolutions like 1920x1080, 1600x900 works, but 1280x720 doesn’t ? This happens in a c++ cli code which is called from c#. Every project is x64 build (no Any CPU) on a Win7 x64.

    c++ cli code :

    void FFmpegWrapper::Codec::E(int width, int height, IntPtr dataIn, [Out] IntPtr %dataOut)
    {
       int ret;
       AVFrame *f, *fIn, *fOut;
       f = av_frame_alloc();
       fIn = av_frame_alloc();
       fOut = av_frame_alloc();

       fIn->format = AV_PIX_FMT_RGB24;
       fIn->width = width;
       fIn->height = height;
       ret = av_image_alloc(fIn->data, fIn->linesize, width, height, AV_PIX_FMT_RGB24, 32);

       f->format = AV_PIX_FMT_YUV420P;
       f->width = width;
       f->height = height;
       ret = av_image_alloc(f->data, f->linesize, width, height, AV_PIX_FMT_YUV420P, 32);

       fOut->format = AV_PIX_FMT_RGB24;
       fOut->width = width;
       fOut->height = height;
       ret = av_image_alloc(fOut->data, fOut->linesize, width, height, AV_PIX_FMT_RGB24, 32);


       uint8_t *data = (uint8_t*)dataIn.ToPointer();
       fIn->data[0] = data;

       //with or without struct no difference
       /*struct */SwsContext *convertCtx = sws_getContext(width, height, AV_PIX_FMT_RGB24, width, height, AV_PIX_FMT_YUV420P, 0, NULL, NULL, NULL);

       // CRASH here
       sws_scale(convertCtx, fIn->data, fIn->linesize, 0, height, f->data, f->linesize);

       convertCtx = sws_getContext(width, height, AV_PIX_FMT_YUV420P, width, height, AV_PIX_FMT_RGB24, 0, NULL, NULL, NULL);

       sws_scale(convertCtx, f->data, f->linesize, 0, height, fOut->data, fOut->linesize);

       dataOut = (IntPtr)fIn->data[0];

    }

    And its called from c# like this :

    FFmpegWrapper.Codec test = new FFmpegWrapper.Codec();

    Bitmap image = new Bitmap(w, h, PixelFormat.Format24bppRgb);

    // Get a screenshot from the desktop
    Screen.Capture(w, h, image, PixelFormat.Format24bppRgb);

    Rectangle rec = new Rectangle(0, 0, image.Width, image.Height);
    BitmapData bitmapData = image.LockBits(rec, ImageLockMode.ReadWrite, image.PixelFormat);

    IntPtr ptr = bitmapData.Scan0;

    IntPtr testptr1;

    test.E(w, h, ptr, out testptr1);

    // We never reach this with 1280x720 resolution
    Bitmap bmp = new Bitmap(w, h, w * 3, PixelFormat.Format24bppRgb, testptr1);

    bmp.Save(@"H:\sajt1.bmp", ImageFormat.Bmp);

    What i don’t understand is, how can it work with certain resolutions and crash with others ?
    Using 20160512-git-cd244fa-win64 version of ffmpeg.

    Edit :
    It seems, that changing AV_PIX_FMT_RGB24 to AV_PIX_FMT_BGR24 fixes it, but I’m not sure why. I know that .Net stores the pixels in bgr, but why does wrong format crashes it ? And only at some resolutions ?

  • Taking a high resolution picture with FFMPEG and Webcam

    13 mai 2016, par user2088176

    I have a Microsoft LifeCam VX-3000 and I want to capture a single image from this video source.

    I have tried DirectShow :

    ffmpeg -f dshow -video_size 1280x960 -i video="Microsoft LifeCam VX-3000" -vframes 1 file.jpg

    [dshow @ 01D69340] Could not set video options

    and
    Microsoft WDM Image Capture :

    ffmpeg -f vfwcap -video_size 1280x960 -i video="Microsoft LifeCam VX-3000" -vframes 1 file.jpg

    [vfwcap @ 01D79340] Could not set Video Format.

    If I lower the video size to 640x480, it works, but every sites tells me that 640x480 is the maximum video resolution, but the still picture maximum resolution is 1280x960. Like here

    I would like to capture the image at the highest resolution possible. Is there a way to do it with FFMPEG ? What command-line options should I give it ?

    Thank you very much.