Recherche avancée

Médias (91)

Autres articles (48)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (5254)

  • Including ffmpeg in qt project on windows causes the program to unexpectedly finish

    1er avril 2016, par Burn-Man

    I am trying to include ffmpeg in my qt project on windows. I am running QT4 and compiling with microsoft visual compiler 2010 on 32 bit windows 7. I am trying to include ffmpeg 2.8 which I got the dev and shared downloads from zeranoe. When I run it I get the following output :

    Starting (executable path)...
    The program has unexpectedly finished.
    (executable path) exited with code -1073741819

    I am able to produce this output with the following :

    ffmpeg_test.pro :

    QT += core
    TARGET = ffmpeg_test

    INCLUDEPATH += (ffmpeg dev path)/include
    LIBS += -L(ffmpeg dev path)/lib
    LIBS += -lavformat

    SOURCES += main.cpp

    main.cpp :

    extern "C"
    {
    #ifndef __STDC_CONSTANT_MACROS
    #define __STDC_CONSTANT_MACROS
    #endif
    #include <libavformat></libavformat>avformat.h>
    }

    int main(int argc, char *argv[])
    {
     av_register_all();
     return 0;
    }

    I have put the .dll files from the ffmpeg share bin into the same folder that QT builds ffmpeg_test.exe into. I have also confirmed that they are found using dependency walker which shows a question mark when they are not in that directory and the avformat-56.dll file path when they are (the fact that the .dll files are found does not effect the output of the program).

    Dependency walker does reveal that something weird is going on as there are no expected functions, but the functions found in avformat-56.dll look correct. I also have ran Dumpbin.exe /EXPORTS on avformat.lib and it also looks fine (I can post output if it would be helpful). It is worth noting that I have included this version of ffmpeg in a different application on this machine, it was not a qt project however. That project generated its make file with CMake rather than QMake and was built with Microsoft Visual C++ 2010 rather than QT Creator.

    I have also included other .lib/.dll pairs in qt and they have no problems. I am noticing two differences from those pairs. First in the ffmpeg-dev lib folder instead of having only .lib files (as is the case for all my other .lib/.dll pairs) I also have a .def and a .dll.a file for each library. Second ffmpeg is a c library whereas all my other included libraries are c++.

    update 3/29 :

    I have tried replacing the LIBS lines in my .pro with both of the following :

    LIBS += (ffmpeg dev path)/lib/avformat.lib

    LIBS += (ffmpeg dev path)/lib/libavformat.dll.a

    Both give the same error message. I have also tried adding the following to my .pro file also with no effect.

    DEFINES += __STDC_CONSTANT_MACROS
    QMAKE_CXX_FLAGS += -D_STDC_CONSTANT_MACROS

    Additionally I tried adding #define inline __inline to main.cpp as suggested on the ffmpeg website. Any ideas of things to try would be hugely appreciated !

    update 3/31 :

    I have tried to start over with a new Windows build environment but the result remains unchanged with the test code above. (The new environment was able to run a hello world program).

    My process for setting up this environment was to install a fresh version of 32 bit windows 7. Install Visual C++ 2010 Express from the Visual Studio 2010 Express All-in-one ISO. Install Qt 4.8.6 for 32 bit windows and Visual Studio 2010. And finally install Qt Creator 2.5.2. To set up Qt creator I went under tools->options and told it where to find the Qt 4.8.6 qmake. I downloaded the dev and shared builds for ffmpeg 2.8 from Zeranoe. I was missing stdint.h and inttypes so I downloaded them and put the files in /include/libavutil. Then I corrected any of the header files that complained from to "stdint.h" ect. I then put the dll files from ffmpeg-2.8-win32-shared/bin into the folder where qt was building ffmpeg_test ffmpeg_test-build-desktop-Qt_4_8_6__4_8_6__Release/release.

  • ffmpeg error while converting to mp4 Error while opening encoder for output stream #0.0

    20 mars 2016, par Josh

    I am trying to convert various file types to mp4 to be displayed using ffmpeg, but i keep getting the error :

    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

    Another piece that looks important is :

    [libx264 @ 0x93caef0] broken ffmpeg default settings detected

    [libx264 @ 0x93caef0] use an encoding preset (e.g. -vpre medium)

    [libx264 @ 0x93caef0] preset usage : -vpre -vpre

    [libx264 @ 0x93caef0] speed presets are listed in x264 —help

    [libx264 @ 0x93caef0] profile is optional ; x264 defaults to high

    The latest code I am running is :

    ffmpeg -i source -s 320x240 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -maxrate 10M -bufsize 10M -acodec libfaac -ac 2 -ar 48000 -ab 192k destination

    I have seen a few other people with this issue, but their fixes didn’t work for some reason.

    In case it matters : ultimately this will be used in php, though I am trying to get it working first via putty

    EDIT: : Here is the full thing as requested(using a wmv, have tested wmv and flv) :

        ~ >> ffmpeg -i path.wmv -s 320x240 -r 30000/1001 -b 200k -r 29.97 -bt 240k -vcodec libx264 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -maxrate 10M -bufsize 10M -acodec libfaac -ac 2 -ar 48000 -ab 192k path.mp4
    FFmpeg version SVN-r26076, Copyright (c) 2000-2011 the FFmpeg developers
     built on Aug 28 2012 17:55:47 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
     configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-shared --enable-postproc --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --disable-indevs --disable-outdevs --disable-demuxer=v4l --disable-demuxer=v4l2 --disable-mmx
     libavutil     50.36. 0 / 50.36. 0
     libavcore      0.16. 1 /  0.16. 1
     libavcodec    52.108. 0 / 52.108. 0
     libavformat   52.93. 0 / 52.93. 0
     libavdevice   52. 2. 3 / 52. 2. 3
     libavfilter    1.74. 0 /  1.74. 0
     libswscale     0.12. 0 /  0.12. 0
     libpostproc   51. 2. 0 / 51. 2. 0

    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
    Input #0, asf, from 'path.wmv':
     Metadata:
       SfOriginalFPS   : 299
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       IsVBR           : 0
       title           : Wildlife in HD
       artist          :
       copyright       : © 2008 Microsoft Corporation
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
     Duration: 00:00:30.09, start: 8.000000, bitrate: 6977 kb/s
       Stream #0.0(eng): Audio: wmav2, 44100 Hz, 2 channels, s16, 192 kb/s
       Stream #0.1(eng): Video: vc1, yuv420p, 1280x720, 5942 kb/s, 29.97 tbr, 1k tbn, 1k tbc
    File 'path.mp4' already exists. Overwrite ? [y/N] y
    [buffer @ 0x9ce9eb0] w:1280 h:720 pixfmt:yuv420p
    [scale @ 0x9ce8f70] w:1280 h:720 fmt:yuv420p -> w:320 h:240 fmt:yuv420p flags:0x4
    [libx264 @ 0x9ce9ef0] broken ffmpeg default settings detected
    [libx264 @ 0x9ce9ef0] use an encoding preset (e.g. -vpre medium)
    [libx264 @ 0x9ce9ef0] preset usage: -vpre <speed> -vpre <profile>
    [libx264 @ 0x9ce9ef0] speed presets are listed in x264 --help
    [libx264 @ 0x9ce9ef0] profile is optional; x264 defaults to high
    Output #0, mp4, to 'path.mp4':
       Stream #0.0(eng): Video: libx264, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
       Stream #0.1(eng): Audio: libfaac, 48000 Hz, 2 channels, s16, 192 kb/s
    Stream mapping:
     Stream #0.1 -> #0.0
     Stream #0.0 -> #0.1
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    </profile></speed>

    Thanks for any help

  • Generate video with ffmpeg to play using JavaFX

    25 mai 2015, par taskman

    People always say to post a new question so I am posting a new question that relates to Generate video with ffmpeg for JavaFX MediaPlayer

    The images I use can be downloaded from here https://www.dropbox.com/s/mt8yblhfif113sy/temp.zip?dl=0. It is a 2.2GB zip file with 18k images, still uploading, might take some time. The images are slices of a 3D object. I need to display images every 10ms to 20ms. I tried it with Java, but just couldn’t get faster than 30ms+ so now I am trying to generate a video that will display images as fast as I want without worrying about memory or CPU power.

    People will be using my software to slice the objects and then generate the videos to be played later one. The player might run on a cheap laptop or might run on a Raspberry Pi. I need to make sure the slicer will work on any OS and that people don’t need to install too much extra stuff to make it work. It would be best if I can just include everything that is needed in the download of the app.

    I also posted here
    https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=2474&sid=4f7a752f909202fbec19afc9edaf418c

    I am using Windows 7 and I have VLC installed. The ffmpeg version is

    ffmpeg version N-72276-gf99fed7 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (GCC)

    I also tried the command lines posted on the linked question

    This line produced the video and JavaFX didn’t have any errors

    ffmpeg -f image2 -r 50 -i "Mandibular hollow 1 micron.gizmofill%d.gizmoslice.jpg" -s 1638x1004 -vcodec mpeg4 -qscale 1 -f mp4 Timelapse.mp4

    enter image description here

    This line also produced the video, but JavaFX had an error : "Caused by : MediaException : MEDIA_UNSUPPORTED : Unrecognized file signature !"

    ffmpeg -f image2 -r 50 -i "Mandibular hollow 1 micron.gizmofill%d.gizmoslice.jpg" -s 1920x1080 -vcodec mpeg4 -qscale 1 Timelapse.avi

    enter image description here

    I also tried this two pass encoding I believe. It produced the video, but didn’t play

    ffmpeg -r 50 -i "Mandibular hollow 1 micron.gizmofill%d.gizmoslice.jpg" -s 1638x1004 -r 50 -b:v 1550k -bt 1792k -vcodec libx264 -pass 1 -an combined50.flv &amp;&amp; ffmpeg -y -r 50 -i "Mandibular hollow 1 micron.gizmofill%d.gizmoslice.jpg" -s 1638x1004 -r 50 -b:v 1550k -bt 1792k -vcodec libx264 -pass 2 -vpre hq -acodec libfaac -ab 128k combined50.flv

    This is my JavaFX code. As you can see I tried the Oracle video and that worked fine.

    public class FXMLDocumentController implements Initializable {

       @FXML
       private Label label;

       @FXML
       private MediaView mediaView;

       @FXML
       private void handleButtonAction(ActionEvent event) {
           System.out.println("You clicked me!");

    //        final File f = new File("http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv");
           final File f = new File("C:/Users/kobus/Dropbox/JavaProjects/Gizmetor/temp/Timelapse.avi");

    //        "C:/Users/kobus/Dropbox/JavaProjects/Gizmetor/temp/combined50.avi.flv"
    //        http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv

           Media media = new Media(f.toURI().toString());
    //        Media media = new Media("http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv");
           MediaPlayer mediaPlayer = new MediaPlayer(media);
           mediaPlayer.setAutoPlay(true);

           mediaPlayer.play();
           mediaView.setMediaPlayer(mediaPlayer);
           label.setText("Hello World!");
           System.out.println(mediaPlayer.isAutoPlay());

    //        mediaView
       }

       @Override
       public void initialize(URL url, ResourceBundle rb) {
           // TODO
       }

    }