Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (52)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (12689)

  • Controlling ffmpeg at runtime with zmq

    3 avril 2023, par Gavin

    I want to dynamically change the rectilinear view (eg its yaw) of a 360 video as it plays.

    


    basic command

    


    To take a 360 video and show a flat/normal view at a yaw perspective of 60 degrees

    


    ffmpeg -i input360.mp4 -vf "v360=input=e:rectilinear:yaw=60,scale=iw/4:-1" out60.mp4
This works fine.

    


    Changing the yaw during playback

    


    I understand ffmpeg has two methods to change filter params at runtime ; sendcmd (file based) and zmq (message based)

    


    I got sendcmd method working, but am struggling to understand zmq syntax and use. ffmpeg's zmq docs are pretty sparse.
I am using a local Windows 10 PC

    


    sendcmd

    


    ffplay -i input360.mp4 -vf "sendcmd=f=cmd.txt,v360=input=e:rectilinear:reset_rot=1,scale=iw/4:-1"

    


    with a cmd.txt file

    


    0-5 [expr] v360 yaw 'lerp(0,90,TI)';
5-10 [expr] v360 yaw 'lerp(90,0,TI)';


    


    result : yaw changes from 0 to 90 degrees from t=0-5s and then 90 to 0 degrees from t=5-10s. Perfect

    


    zmq

    


    ffplay -i input360.mp4 -vf "v360=input=e:rectilinear:reset_rot=1,zmq,scale=iw/4:-1"

    


    I got zmqsend from ffmpeg-tools.zip and added to my ffmpeg bin directory

    


      

    1. execute above ffplay command from terminal window #1 - and see video playing

      


    2. 


    3. Open terminal window #2 and execute : echo v360 yaw 90 > zmqsend

      


    4. 


    


    result : no change to video yaw. No errors either

    


    What am I doing wrong ? Im not sure if my ffmpeg command is wrong, or if my zmq message does not reach ffmpeg (or both). I checked my ffmpeg v2022-10-10 config has —enable-libzmq

    


  • Copy C++ FFmpeg AVFrame to C# WritableBitmap

    2 janvier 2023, par Spuriga

    I have a C++ function definition with ffmpeg scaler The last two parameter is my question (buffer and stride) :

    


    int scale_decoded_video_frame(void* handle, void* scalerHandle, void* scaledBuffer, int scaledBufferStride) 

sws_scale(
    scalerContext->sws_context,
    srcData,
    context->frame->linesize,
    0, 
    scalerContext->source_height,
    reinterpret_cast(&scaledBuffer),
    &scaledBufferStride);


    


    When I declared it in C# I use the following code :

    


    [DllImport(LibraryName, EntryPoint = "scale_decoded_video_frame", CallingConvention = CallingConvention.Cdecl)]
public static extern int ScaleDecodedVideoFrame(IntPtr handle, IntPtr scalerHandle, IntPtr scaledBuffer, int scaledBufferStride);


    


    And the C# call :

    


    WriteableBitmap w = new WriteableBitmap(1920, 1080, 96, 96, PixelFormats.Pbgra32, null);
RenderOptions.SetBitmapScalingMode(w, BitmapScalingMode.NearestNeighbor);
w.Lock();

Int32Rect rect = new Int32Rect(0, 0, 1920, 1080);

resultCode = FFmpegVideoPInvoke.ScaleDecodedVideoFrame(decoderPtr, scalerHandle, w.BackBuffer, w.BackBufferStride);
if (resultCode == 0)
   w.AddDirtyRect(rect);

w.Unlock();


    


    It works perfect, but I want to skip the scale function and only want to get the decoded image to the WritableBitmap buffer. I try to use this code, change the sws_scale function to memcpy, but it shows nothing. The context->frame is AVFrame*.

    


    memcpy(scaledBuffer, context->frame->data, AV_NUM_DATA_POINTERS * sizeof(uint8_t));
memcpy(&scaledBufferStride, context->frame->linesize, AV_NUM_DATA_POINTERS * sizeof(int));


    


    How can I copy the AVFrame buffer to the WritableBitmap buffer ?

    


  • phantomjs screenshots and ffmpeg frame missing

    20 octobre 2015, par Bussiness Way

    I have problem making video from website screenshots taken from phantomjs.

    the phantomjs did not make screenshots for all frames within the same second and even not all seconds there , there is huge missing frames .

    the result is high speed video playing with many jumps in video effects .

    test.js :

    var page = require('webpage').create(),
       address = 'http://raphaeljs.com/polar-clock.html',
       duration = 5, // duration of the video, in seconds
       framerate = 24, // number of frames per second. 24 is a good value.
       counter = 0,
       width = 1024,
       height = 786;
           frame = 10001;

    page.viewportSize = { width: width, height: height };

    page.open(address, function(status) {
       if (status !== 'success') {
           console.log('Unable to load the address!');
           phantom.exit(1);
       } else {
           window.setTimeout(function () {
               page.clipRect = { top: 0, left: 0, width: width, height: height };

               window.setInterval(function () {
                   counter++;
                   page.render('newtest/image'+(frame++)+'.png', { format: 'png' });
                   if (counter > duration * framerate) {
                       phantom.exit();
                   }
               }, 1/framerate);
           }, 200);
       }
    });

    this will create 120 image , this is correct count , but when you see the images one by one you will see many duplicate the same contents and many missing frames

    ffmpeg :

    fmpeg -start_number 10001 -i newtest/image%05d.png -c:v libx264 -r 24 -pix_fmt yuv420p out.mp4

    I know this script and ffmpeg command not perfect , because I did hundred of changes without lucky, and I lost the correct setting understanding .

    an anyone guide me to fix this ?.

    thank you all