Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (65)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10373)

  • Core : Exclude some keyboard keys to prevent revalidating the field

    24 février 2015, par Arkni
    Core : Exclude some keyboard keys to prevent revalidating the field
    

    Avoid revalidate the field when pressing one of the following keys
    in ’onkeyup’ method :
    Shift => 16
    Alt => 18
    Caps lock => 20
    End => 35
    Home => 36
    Left arrow => 37
    Up arrow => 38
    Right arrow => 39
    Down arrow => 40
    Insert => 45
    Num lock => 144
    AltGr key => 225

    This helps especially with the remote method, which has a lot of
    overhead.

    Closes #1411

  • ffmpeg : avoid scanf in keyboard command parsing

    3 août 2015, par Hendrik Leppkes
    ffmpeg : avoid scanf in keyboard command parsing
    

    Mixing stdio and low-level IO on stdin is not safe.

    • [DH] ffmpeg.c
  • How to make QProcess stop by button or keyboard in GUI ?

    31 août 2015, par xiaowei

    Here I want to make a recorder by ffmpeg.exe.

    And, I found the commend line, succeed running and generate the video file. And I know press "Esc" or "q" on keyboard can terminal

    Now, I want to use GUI to control the recoder(ffmpeg.exe). I select Qt here, and my work environment is windows 7 sp1.

    I use QProcess to execute it, you will see following.

    But I have no idea for terminal the process.

    The code list :
    main.cpp is simple.

    #include "mainwindow.h"
    #include <qapplication>

    int main(int argc, char *argv[])
    {
       QApplication a(argc, argv);
       MainWindow w;
       w.show();

       return a.exec();
    }
    </qapplication>

    mainwindow.h

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <qmainwindow>
    #include <qprocess>

    namespace Ui {
    class MainWindow;
    }

    class MainWindow : public QMainWindow
    {
       Q_OBJECT

    public:
       explicit MainWindow(QWidget *parent = 0);
       ~MainWindow();

    private:
       QProcess *pro;
       QString recorder;
       QString outputName;
       QString options;

    private slots:
       void startRecode();
       void stopRecode();
    };

    #endif // MAINWINDOW_H
    </qprocess></qmainwindow>

    mainwindow.cpp

    #include "mainwindow.h"

    #include <qprocess>
    #include <qtest>
    #include <qpushbutton>
    #include <qvboxlayout>

    MainWindow::MainWindow(QWidget *parent) :
       QMainWindow(parent),
       pro(new QProcess)
    {
       QDateTime current_date_time = QDateTime::currentDateTime();
       QString current_date = current_date_time.toString("yyyy-MM-dd-hh_mm_ss");

       recorder = "E:\\bin\\ffmpeg.exe";
       outputName = current_date + ".mp4";
       options = "-f gdigrab -framerate 6 -i desktop -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -hide_banner -report";
       //-t 00:00:05"; this option can limit the process running time, and work well no GUI, but I don't want to use given time to stop recording.

       QWidget *centerWindow = new QWidget;
       setCentralWidget(centerWindow);

       QVBoxLayout *mainLayout = new QVBoxLayout;
       QPushButton *startButton = new QPushButton("start recording");
       QPushButton *stopButton = new QPushButton("stop recording");
       mainLayout->addWidget(startButton);
       mainLayout->addWidget(stopButton);

       centerWindow->setLayout(mainLayout);

       connect(startButton, SIGNAL(clicked()), this, SLOT(startRecode()));
       connect(stopButton, SIGNAL(clicked()), this, SLOT(stopRecode()));
    }

    MainWindow::~MainWindow()
    {
       delete pro;
    }

    void MainWindow::startRecode()
    {
       pro->execute(QString(recorder + " " +options +" " + outputName));
    }

    void MainWindow::stopRecode(){
       pro->terminate(); // not work
       //pro->close(); // not work, too
       //pro->kill(); // not work, T_T

       //how to terminate the process by pushbutton??
    }
    </qvboxlayout></qpushbutton></qtest></qprocess>

    There have some ideas for me ?

    or, have other solutions for my recorder ?