Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (51)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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 (8600)

  • mplayer can't read udp video stream

    23 avril 2014, par Bruno Marques

    Im trying to compare latency between different video codecs using ffmpeg and mplayer’s benchmark.

    I am using this command line to generate and send the stream :

    ffmpeg -s 1280x720 -r 100 -f x11grab -i :0.0 -vcodec mpeg2video -b:v 8000 -f mpegts udp://localhost:4242

    And I’m successfully using ffplay to receive and read it in real time :

    ffplay -an -sn -i -fflags nobuffer udp://localhost:4242?listen

    Now instead of playing the stream with ffplay, i’d like to use the mplayer benchmark to get some information on the latency :

    mplayer -msglevel all=6 -benchmark udp://localhost:4242

    But I get this output instead :

    Playing udp://localhost:4242.
    get_path('sub/') -> '/home/XXXXX/.mplayer/sub/'
    STREAM_UDP, URL: udp://localhost:4242
    Filename for url is now udp://localhost:4242
    Listening for traffic on localhost:4242 ...
    Timeout! No data from host localhost
    udp_streaming_start failed
    No stream found to handle url udp://localhost:4242

    I tried with rtp protocol instead, didn’t work either...

    Does anyone have an idea what i’m doing wrong ?

  • Something wrong with recording video and merging audio and video by using FFmpeg

    16 mars 2014, par VaFancy

    At the beginning, I have to admit that I am a newbie in FFmpeg and also raspbian. Unfortunately, I need to solve this problem as soon as possible.

    I tried to record videos on my Raspberry PI by using PIcamera and USB webcam separately. When I used command :

    ffmpeg -t 10 -f video4linux2 -r 25 -i /dev/video0 out.h264

    However, something was very wrong because there was nothing saved in that video file. I copy the log.

    [video4linux2,v4l2 @ 0x267ad80] The driver changed the time per frame from 1/25 to 1/30
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 37562.908020, bitrate: 147456 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
    File 'out.h264' already exists. Overwrite ? [y/N] y
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x267ca60] using cpu capabilities: ARMv6
    [libx264 @ 0x267ca60] profile High 4:2:2, level 3.0, 4:2:2 8-bit
    Output #0, h264, to 'out.h264':
     Metadata:
       encoder         : Lavf55.34.101
       Stream #0:0: Video: h264 (libx264), yuv422p, 640x480, q=-1--1, 90k tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo -> libx264)
    Press [q] to stop, [?] for help
    DTS 140730117085, next:18648459 st:0 invalid dropping00.00 bitrate=N/A    
    PTS 140730117085, next:18648459 invalid dropping st:0
    DTS 140740452429, next:6538221 st:0 invalid dropping:00.00 bitrate=N/A    
    PTS 140740452429, next:6538221 invalid dropping st:0
    frame=   44 fps=1.1 q=28.0 size=      18kB time=00:00:00.04 bitrate=3712.6kbits/
    frame=   45 fps=0.8 q=28.0 size=      22kB time=00:00:00.08 bitrate=2262.8kbits/
    frame=   46 fps=0.7 q=28.0 size=      27kB time=00:00:00.12 bitrate=1813.4kbits/
    frame=   47 fps=0.6 q=28.0 size=      30kB time=00:00:00.16 bitrate=1559.2kbits/
    frame=   48 fps=0.5 q=28.0 size=      34kB time=00:00:00.20 bitrate=1397.7kbits/
    frame=   49 fps=0.5 q=28.0 size=      39kB time=00:00:00.24 bitrate=1324.3kbits/
    frame=   50 fps=0.4 q=28.0 size=      42kB time=00:00:00.28 bitrate=1241.7kbits/

    As you can see, the size of each frame was only few kb and fps was so low. Thus each frame was taken by using a long time(4s in this case). Then I test my USB webcam by using command :

    ffplay -f video4linux2 /dev/video0

    The video stream which displayed on the screen was so unnatural. It looked like there was such a long delay between each frame. So the video was hardly moved. The log I have copied :

    pi@raspberrypi ~ $ ffplay -f video4linux2 /dev/video0
    avplay version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2003-2013 the Libav developers
     built on Mar 31 2013 13:58:10 with gcc 4.6.3
    [video4linux2 @ 0x1ad83c0] Estimating duration from bitrate, this may be inaccurate
    Input #0, video4linux2, from '/dev/video0':
     Duration: N/A, start: 36107.154598, bitrate: 147456 kb/s
       Stream #0.0: Video: rawvideo, yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc
    [avsink @ 0x1ad9960] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x1ad9d20] w:640 h:480 fmt:yuyv422 -> w:640 h:480 fmt:yuv420p flags:0x4
    36163.33 A-V:  0.000 s:0.0 aq=    0KB vq= 3000KB sq=    0B f=8/8

    The final problem is that no sound was added in video file when I tried to add some in. I used the command :

    avconv -i /home/pi/Desktop/test.mp4 -i /home/pi/Desktop/test.mp3 -map 0:0 -vcodec copy -map 1:0 -acodec copy output.h264

    I have checked separately that the video and audio were both able to play. However the merged file only had video but no audio. The log is shown below, it seems that the process was succeed.

    pi@raspberrypi ~ $ avconv -i /home/pi/Desktop/test.mp4 -i /home/pi/Desktop/test.mp3 -map 0:0 -vcodec copy -map 1:0 -acodec copy output.h264
    avconv version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2000-2013 the Libav developers
     built on Mar 31 2013 13:58:10 with gcc 4.6.3
    [h264 @ 0x1aa6680] max_analyze_duration reached
    [h264 @ 0x1aa6680] Estimating duration from bitrate, this may be inaccurate
    Input #0, h264, from '/home/pi/Desktop/test.mp4':
     Duration: N/A, bitrate: N/A
       Stream #0.0: Video: h264 (High), yuv420p, 640x480, 25 fps, 25 tbr, 1200k tbn, 2400k tbc
    [mp3 @ 0x1aaa120] Estimating duration from bitrate, this may be inaccurate
    Input #1, mp3, from '/home/pi/Desktop/test.mp3':
     Metadata:
       title           : We Are Legend (Original Mix)
       artist          : Dimitri Vegas & Like Mike & Steve Aoki
       album           : SPINNIN RECORDS
       encoded_by      : iTunes 11.1.5
       TBP             : 128
       genre           : Progressive House
       date            : 2013
     Duration: 00:00:11.14, start: 0.000000, bitrate: 191 kb/s
       Stream #1.0: Audio: mp3, 48000 Hz, stereo, s16, 192 kb/s
    File 'output.h264' already exists. Overwrite ? [y/N] y
    Output #0, h264, to 'output.h264':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: libx264, yuv420p, 640x480, q=2-31, 90k tbn, 1200k tbc
       Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, 192 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #1:0 -> #0:1 (copy)
    Press ctrl-c to stop encoding
    frame=  144 fps=  0 q=-1.0 Lsize=    1684kB time=5.06 bitrate=2724.7kbits/s    
    video:1566kB audio:119kB global headers:0kB muxing overhead 0.000000%

    Could somebody helps me, please. And sorry for my bad english.

    BTW : When I finally captured 200 frames, it turns out all of them were green.

  • Qt 5.2 / OpenCV 2.4.8 - Can’t open video files via VideoCapture

    21 février 2014, par Zamahra

    I have a big problem that i can’t solve by myself. OpenCV itself works fine, but i’m not able to load videos. Here’s my code :

    PRO- File

    QT       += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = videoredux
    TEMPLATE = app

    INCLUDEPATH += C:/OpenCV/opencv_bin/install/include
    LIBS += -LC:\\OpenCV\\opencv_bin\\bin \
       libopencv_core248d \
       libopencv_highgui248d \
       libopencv_imgproc248d \
       libopencv_features2d248d \
       libopencv_calib3d248d \
       libopencv_video248d \


    SOURCES += main.cpp\
           mainwindow.cpp

    HEADERS  += mainwindow.h

    FORMS    += mainwindow.ui

    and the MainWindow Class :

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <qfiledialog>
    #include <iostream>
    #include
    #include <opencv2></opencv2>core/core.hpp>
    #include <opencv2></opencv2>highgui/highgui.hpp>
    #include <opencv2></opencv2>imgproc/imgproc.hpp>
    #include <opencv></opencv>cv.h>


    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
       ui->setupUi(this);
       ui->videoStatusLabel->setText("Kein Video geladen.");

       // SIGNALS &amp; SLOTS

       QObject::connect(ui->chooseVideoButton,SIGNAL(clicked()),
                    this,SLOT(chooseVideo()));
       QObject::connect(ui->startButton,SIGNAL(clicked()),
                    this,SLOT(startProcess()));

    }

    void MainWindow::chooseVideo(){

       QString fileName = QFileDialog::getOpenFileName(this,
            tr("Open Video"), "/home", tr("Video Files (*.avi *.mp4 *.mpeg *.mpg)"));
       qDebug() &lt;&lt; "Path:" &lt;&lt; fileName;
       ui->videoStatusLabel->setText(fileName);
    }

    void MainWindow::startProcess(){
       QString videoPath = ui->videoStatusLabel->text();
       QFileInfo video(videoPath);
       if(video.exists()){
           const std::string path = videoPath.toUtf8().constData();
           cv::VideoCapture capture(path);
           cv::Mat frame;

           if(!capture.isOpened()){
               qDebug() &lt;&lt; "Error, video not loaded";
           }

           cv::namedWindow("window",1);
           while(true)
           {
               bool success = capture.read(frame);
               if(success == false){
                   break;
               }
               cv::imshow("window",frame);
               cv::waitKey(20);
           }
           cv::waitKey(0);
       }
       else{
           qDebug() &lt;&lt; "Error, File doesn&#39;t exist";
       }
    }
    </iostream></qfiledialog>

    The paths are correct, I tried many different video formats but he never loads the videos. I’m running Qt on a Windows 8 machine and i have “K-Lite Codec Pack 10.2.0 Basic” and ffmpeg installed. The videos are playing properly with my video players. I also tried to copy the .dll to the working directory, searched for opencv dll's in the system32 directory and rebuild OpenCV with mingw on this computer. I know that many people have the same problems, but none of their suggestions solved it. Does anyone know how to solve this problem ?

    Thank you very much !

    Nadine

    ----UPDATE---- I still can't open video files, so I programmed the application on a Windows7 64-Bit system. It worked fine, but when I try to open the application on a Windows8 computer it still can't open the file. It doesn't matter which codecs are installed, because it generally runs on every Windows7 computer and fails on every Windows8 computer.. The same for older OpenCV-Versions. Is there a general problem with OpenCV and Windows8 ?