Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (15)

  • 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

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

Sur d’autres sites (4219)

  • Laravel php timelapse an UploadedFile video element, without saving it as a file

    24 août 2022, par The Blind Hawk

    I want to be able to change the frame rate of a video from 0.05fps to 3fps.
    
I receive the video as an Illuminate\Http\UploadedFile element, with mp4 format, how do I speed up its frame rate before sending it via email ?
    
The video is 25 minutes long, it should become 25 seconds long after changing the frame rate.
    
Is there a way to change the fps without saving the element as a File ?
    
I was planning to use the ffmpeg repository here but it requires me to save both the initial file, and the second file after changing the fps.

    
This is my code :

    


    <?php

namespace Server\Mail;

use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Http\UploadedFile;

class TimeLapse extends Mailable
{
    use Queueable, SerializesModels;

    public UploadedFile $video;

    public bool $is_timelapsed;

    public string $format;

    /**
     * Create a new message instance.
     */
    public function __construct(
        UploadedFile $video, 
        bool $is_timelapsed, 
        string $format
    ){
        $this->video = $video;
        $this->is_timelapsed = $is_timelapsed;
        $this->format = $format;
    }

    private function timelapse(){
        // here I want to change $video element's fps from 0.05 to 3
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        if ( !$is_timelapsed ) { timelapse(); }

        $this->subject('message')
                    ->text('emails.timelapse');

        $this->attach($this->video, [
            'as' => 'sample'.$format,
            'mime' => 'video/'.$format,
        ]);

        return $this;
    }
}


    


  • ffmpeg thumbnailer configure/make trouble in CentOS6

    16 décembre 2013, par Juneyoung Oh

    I am using CentOS 6.4 86x64.

    What I am planning to do is install ffmpegthumbnailer.

    I have downloaded at the link below.
    https://code.google.com/p/ffmpegthumbnailer/

    The problem is when I extract the tar.gz and command configure,

    It alway says like this.

    checking for FFMPEG... no
    configure: error: Package requirements (libavutil libavformat libavcodec >= 52.26.0 libswscale) were not met:

    No package 'libavutil' found
    No package 'libavformat' found
    No package 'libavcodec' found
    No package 'libswscale' found

    Of course, I already installed ffmpeg 1.2.

    /usr/lib64/libswscale.so.0.11.0
    /usr/lib64/libswscale.so.0

    and also have libswscale.so.

    What can I do to solve this ?

    Thanks:D

    ============I solved one and get another===============

    I solved(?) this with what console said.

    adjust PKG_CONFIG_PATH.

    I find my libavutil.pc and give that path to PKG_CONFIG_PATH, like below.

    export PKG_CONFIG_PATH=/usr/lib/pkgconfig/

    then It looks OK, but I got another one.

    ./configure works nice with suspected message.

    CONFIGURATION SUMMARY ----
    png support          : disabled
    jpeg support         : disabled
    gio support          : disabled
    register thumbnailer : disabled
    unittests            : disabled
    debug mode           : disabled

    anyway, configure was OK, and I have make files now.

    The problem is when I do make command, it shows error like below.

    /usr/bin/ld: /usr//lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
    /usr//lib/libavformat.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[2]: *** [libffmpegthumbnailer.la] Error 1
    make[2]: Leaving directory `/home/guest/Downloads/ffmpegthumbnailer-2.0.8'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/guest/Downloads/ffmpegthumbnailer-2.0.8'
    make: *** [all] Error 2

    Please, tell me that I have to do solve this:D

  • ffmpeg H264 Encode Frame at a time for network streaming

    4 février 2017, par Richard Harrow

    I’m working on a remote desktop application, I would like to send an encoded H264 packet over TCP by using ffmpeg for the encoding. However I couldn’t find useful info for the particular case of encoding just one frame (already on YUV444) and get the packet.

    I have several issues, the first was that :

    avcodec_encode_video2

    Was not blocking, I found that most of the time you get the "delayed" frames at the end, however, since this is a real time streaming the solution was :

    av_opt_set(mCodecContext->priv_data, "tune", "zerolatency", 0);

    Now I got the frame, but several issues, it takes a while and even worse I got a gray with trash pixels video as result. My configuration for the Codec Context :

    m_pCodecCtx->bit_rate=8000000;
    m_pCodecCtx->codec_id=AV_CODEC_ID_H264;
    m_pCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
    m_pCodecCtx->width=1920;
    m_pCodecCtx->height=1080;
    m_pCodecCtx->pix_fmt=AV_PIX_FMT_YUV444P;
    m_pCodecCtx->time_base.num = 1;
    m_pCodecCtx->time_base.den = 25;
    m_pCodecCtx->gop_size = 1;
    m_pCodecCtx->keyint_min = 1;
    m_pCodecCtx->i_quant_factor = float(0.71);
    m_pCodecCtx->b_frame_strategy = 20;
    m_pCodecCtx->qcompress = (float)0.6;
    m_pCodecCtx->qmax = 51;
    m_pCodecCtx->qmin = 20;
    m_pCodecCtx->max_qdiff = 4;
    m_pCodecCtx->refs = 4;
    m_pCodecCtx->max_b_frames = 1;
    m_pCodecCtx->thread_count = 1;

    I would like to know how this could be done, how do I set the "I Frames" ? and, that would be the optimal for a "one at a time" encoding ? Also I’m not concerned right now with the quality, just need to be fast enough (under 16 ms).

    For the encoding part :

    nres = avcodec_encode_video2(m_pCodecCtx,&packet,m_pFrame,&framefinished);

    if(nres<0){
       qDebug() << "error encoding: " << nres << endl;
    }

    if(framefinished){
       m_pFrame->pts++;
        ofstream vidout("video.h264",ios::app);
        if(vidout.good()){
            vidout.write((const char*)&packet.data[0],packet.size);
        }
        vidout.close();

        av_packet_unref(&packet);

    }

    I’m not using a container, just a raw file, ffplay reproduce raw files if the packets are right, and that’s my principal issue. I’m planning to send the packet over tcp and decode on the client. Any help would be greatly appreciated.