Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (66)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (6848)

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


    


  • create a movie in python [closed]

    23 mai 2017, par masoud

    I have some files with names (’Den_car_resample’ +’_ sdf_ ’+ str(n)+’.dat’) where n changes from 0 to 25. I wrote a code to read these files and plots the results.
    now I want to create a movie from these plots. at the end of the program, I used the avconv command to do that.
    but, unfortunately my code creates a movie but it is empty.
    I don’t know the reason exactly but I think, first, I have to define a frame to each plot and then create a movie.
    can anyone please tell me how can I define a frame and also the add bit_rate of the movie.

    import sys
    import subprocess  
    import sdf
    import numpy as np
    import matplotlib.pyplot as plt  
    import time
    import matplotlib.animation as Animation
    from matplotlib.font_manager import FontProperties
    fp = FontProperties('Symbola')

    ##################### information from EPOCH input.deck
    nx,ny= 1200, 1600
    xmin=-100e-6
    xmax = 110e-6
    ymin = -200e-6
    ymax = 200e-6
    X =np.linspace(xmin,xmax,nx)  
    Y =np.linspace(ymin,ymax,ny)

    #################
    for n in range(0,25):
     nstr = str(n)

    ######################..... reading Density of carbon
     filename ="Den_car_resample" +'_sdf_'+ str(n)+'.dat'

     with open(filename, 'rb') as f:                        
       data = np.fromfile(f, dtype='float64', count=nx*ny)  

     Den_car  = np.reshape(data, [ny, nx], order='F')
     Den_car= np.log10(Den_car)

     ######################  Display Carbon density

     fig = plt.imshow(Den_car,  extent=[X.min()*1e6, X.max()*1e6, Y.min()*1e6,Y.max()*1e6], vmin=24, vmax=29, cmap='brg', aspect='auto')
     plt.suptitle('Den_car')
     plt.title('sdf '+ str(n)+'; Time= '+str(n*50)+'ps',color='green', fontsize=15)
     plt.xlabel('x($\mu$m)')
     plt.ylabel('y($\mu$m)')
     plt.text(-80,-40,'Den_Carbon',color='red', fontsize=15)
     plt.colorbar()
     plt.savefig( 'fig%06d.png' % n, bbox_inches='tight')          

     plt.pause(.1)
     plt.clf()  
     plt.close()

     ######################  Create movie

     subprocess.call("avconv -framerate 1 -i fig%06d.png -c:v libx264 -profile:v high -crf 20".split())

    sys.exit()
  • Unable to run ffmpeg with qProcess to extract a single frame from Vide

    24 janvier 2018, par user3840315

    I am trying to extract a single frame from a video using the QProcess in qt framework and ffmpeg and store it in a tmp folder. When I run the program in terminal command line it is able to extract it but not when QProcess runs it. I’m developing on a mac. What am I doing wrong.

    QString extractSingleFrame(QString videoPath, QDir tmpDir)
    {
       QString program = ffmpegPath();
       QProcess *ffmpegProcess = new QProcess();
       QString arguments;
       QFileInfo videoInfo(videoPath);
       QString videoName = videoInfo.fileName();

       QString firstFrameName(tmpDir.absolutePath() + "/" + videoName + ".jpg");
       arguments = " -y -i " + QDir::toNativeSeparators(videoPath)
                   + " -frames:v 1 -q:v 1 -f image2 " + QDir::toNativeSeparators(firstFrameName);

       QFile::remove(firstFrameName);
       qDebug() << "Starting program" << program + arguments;
       ffmpegProcess->start(program + arguments);
       // ffmpegProcess->start(program , QStringList() <<  arguments); this also doesnt work
       if (ffmpegProcess->state() == QProcess::Starting){
          qDebug() << "program is starting" + ffmpegProcess->state();
       }
       ffmpegProcess->waitForFinished(-1);

       qDebug() << "done";

       delete ffmpegProcess;

       return firstFrameName;
    }

    This is the printed command
    to start the program "ffmpeg -y -i "/Users/userX/test.mov" -vframes 1 -q:v 1 -f image2 "/var/folders/s1/vtv2cx36p3h0000gn/T/test-ywDBgj/test.mov.jpg""