Recherche avancée

Médias (91)

Autres articles (60)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (3645)

  • Using openCV library with Java works well on Linux but not on Windows

    6 août 2016, par user3586330

    I have a method that takes screenshots on absolute intervals (25%, 50%, 75% and 100%) from a video-file and save each of them to a separate .png-file. I use openCV with the JavaCV-Wrapper library to do that. The class/method of interest is :

    package de.stal.videoreporter;

    import org.bytedeco.javacpp.opencv_core;
    import static org.bytedeco.javacpp.opencv_imgcodecs.cvSaveImage;
    import org.bytedeco.javacv.FFmpegFrameGrabber;
    import org.bytedeco.javacv.Frame;
    import org.bytedeco.javacv.FrameGrabber;
    import org.bytedeco.javacv.OpenCVFrameConverter;

    class VideoThumbnailer {
    public void createThumbnails(String videoname) throws FrameGrabber.Exception {

       FFmpegFrameGrabber g = new FFmpegFrameGrabber("videos/" + videoname);
       g.start();
       OpenCVFrameConverter.ToIplImage converterToIplImage = new OpenCVFrameConverter.ToIplImage();
       int length = g.getLengthInFrames();
       int fifty = length / 2;
       int twentyfive = fifty / 2;
       int seventyfive = fifty + twentyfive;
       int hundred = length - 1;

       //each frame of video
       for (int j = 0; j < length; j++) {

           if (j == twentyfive || j == fifty || j == seventyfive || j == hundred) {
               String ss = "";
               if (j == twentyfive) {
                   ss = "25";
               } else if (j == fifty) {
                   ss = "50";
               } else if (j == seventyfive) {
                   ss = "75";
               } else if (j == hundred) {
                   ss = "100";
               }

               g.setFrameNumber(j);

               Frame f = g.grabImage();

               opencv_core.IplImage image = converterToIplImage.convert(f);
               String img_path = "thumbnails/" + videoname + "." + ss + ".png";
               cvSaveImage(img_path, image);
           }

       }
       g.stop();
    }
    }

    That works fine on environment : Ubuntu 15.10 x64, Java v.1.7.0_101 and Netbeans 8.0.2 with Maven. So I exported the project to a runnable jar-file(with all dependencies included) and tried to start it on Windows 10 x64 via :

    java -jar VideoReporter-1.0-SNAPSHOT-jar-with-dependencies.jar

    On Windows an exception will be thrown when executing the .jar-file :

    Error putting member offsets for class org/bytedeco/javacpp/avutil$Pool_free_Pointer.
    Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at org.bytedeco.javacpp.Loader.load(Loader.java:472)
       at org.bytedeco.javacpp.Loader.load(Loader.java:417)
       at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2719)
       at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:391)
       at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:385)
       at de.stal.videoreporter.VideoThumbnailer.createThumbnails(VideoThumbnailer.java:15)
       at de.stal.videoreporter.MetaReader.slurpMetadata(MetaReader.java:67)
       at de.stal.videoreporter.VideoReporter.main(VideoReporter.java:19)
    </clinit>

    My pom.xml is :

    &lt;?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelversion>4.0.0</modelversion>
    <groupid>de.stal</groupid>
    <artifactid>VideoReporter</artifactid>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
       UTF-8
       1.7
       1.7
    </properties>
    <build>
       <plugins>
           <plugin>
               <artifactid>maven-assembly-plugin</artifactid>
               <configuration>
                   <archive>
                       <manifest>
                           <mainclass>de.stal.videoreporter.VideoReporter</mainclass>
                       </manifest>
                   </archive>
                   <descriptorrefs>
                       <descriptorref>jar-with-dependencies</descriptorref>
                   </descriptorrefs>
               </configuration>
               <executions>
                   <execution>
                       <id>make-assembly</id>
                       <phase>package</phase>
                       <goals>
                           <goal>single</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>
       </plugins>
    </build>
    <dependencies>
       <dependency>
           <groupid>org.apache.commons</groupid>
           <artifactid>commons-csv</artifactid>
           <version>1.1</version>
       </dependency>
       <dependency>
           <groupid>org.bytedeco</groupid>
           <artifactid>javacpp</artifactid>
           <version>1.2.1</version>
       </dependency>
       <dependency>
           <groupid>org.bytedeco</groupid>
           <artifactid>javacv</artifactid>
           <version>1.2</version>
       </dependency>
       <dependency>
           <groupid>com.fasterxml.jackson.dataformat</groupid>
           <artifactid>jackson-dataformat-csv</artifactid>
           <version>2.8.0.rc2</version>
       </dependency>
       <dependency>
           <groupid>javassist</groupid>
           <artifactid>javassist</artifactid>
           <version>3.12.1.GA</version>
       </dependency>
       <dependency>
           <groupid>commons-collections</groupid>
           <artifactid>commons-collections</artifactid>
           <version>3.2.1</version>
       </dependency>
       <dependency>
           <groupid>com.opencsv</groupid>
           <artifactid>opencsv</artifactid>
           <version>3.3</version>
       </dependency>
    </dependencies>
    </project>

    What might be the problem on Windows ? In my opinion there shouldn’t be a problem with access to openCV/FFMPEG-classes because they all have been included the .jar-file ? Is this a problem with the classpath ?

    Thanks, Peter

  • ffmpeg NVENC Encoding with -flags:v +ildct shows "No NVENC capable devices found"

    29 mai 2020, par gaamaa

    So far I use NVENC with ffmpeg for all my encoding successfully. Today I got a new Zotac nVidia GEForce GTX 1660 6GB card.

    &#xA;&#xA;

    I get "No NVENC capable devices found" error from ffmpeg. Only if I use -flags:v &#x2B;ildct flag. Without ildct flag no issues except the output is progressive.

    &#xA;&#xA;

    I 100% need Interlaced output and I tried most of the Interlaced flags like, -vf tinterlace=interleave_top,fieldorder=tff -x264opts tff=1 Nothing is giving me Interlaced output except -flags &#x2B;ildct But with "Zotac nVidia GEForce GTX 1660" ffmpeg shows :

    &#xA;&#xA;

    No NVENC capable devices found&#xA;

    &#xA;&#xA;

    I even tried all latest nVidia drivers. Nothing helped me.

    &#xA;&#xA;

    My pseudo ffmpeg command line is as below :

    &#xA;&#xA;

    ffmpeg -i SourceFile.mkv -codec:v h264_nvenc -preset:v slow -flags:v &#x2B;ildct&#x2B;cgop -s:v 1920x1080 -ac 2 -ar 48000 -codec:a mp2 -b:a 384k -r 25 -f mp4 -y NewFile.mp4&#xA;

    &#xA;&#xA;

    Is it a bug with nVidia driver or ffmpeg ? Is latest nVidia Turing technology doesn't support Interlaced (very Bad) ?

    &#xA;&#xA;

    Could some one help me ?

    &#xA;

  • Libavformat | Hidden RTP channel inside RTSP

    22 mai 2020, par Max Ridman

    The problem :

    &#xA;&#xA;

    I'm working with libavformat (ffmpeg) library to grab RTSP stream.

    &#xA;&#xA;

    I have accidently discovered that when my test RTSP grabber will represent itself with a custom "RTSP USER AGENT NAME" - it starting to receive a secret (hidden) RTP channel inside main RTSP stream.

    &#xA;&#xA;

    In receiving TCP stream I can see 3 Interleaved channels. But RTSP SDP describes only 2 channels (0-1 Video, 2-3 Audio). The data I need flies in the 3 stream (WireShark tells me its channel 0x04)

    &#xA;&#xA;

    The problem is that the source will not describe this hidden channel in RTSP DESCRIBE. So this way libavformat can not see it and will not receive this stream. Have read tons of libavformat documentation, still no luck...

    &#xA;&#xA;

    The question :

    &#xA;&#xA;

    Is there a way I can manually tell libavformat that this channel exists and start receiving it ? I just need the HEX inside of Data Payload of this channel.

    &#xA;&#xA;

    Hope some ffmpeg/libavformat experts will give me an advice how to move on with this stuff.

    &#xA;&#xA;

    #include &#xA;#include &#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>error.h>&#xA;#include &#xA;&#xA;#define MEDIA_URL  "rtsp://admin:password@192.168.50.154:554/stream1"&#xA;&#xA;/*&#xA; * &#xA; */&#xA;int main(int argc, char** argv) {&#xA;&#xA;    AVFormatContext *input_fmt_ctx = NULL;&#xA;    AVDictionary *opt = NULL;&#xA;    AVPacket frame;&#xA;    AVPacket pkt;&#xA;    int ret; //var for return value&#xA;&#xA;&#xA;    av_dict_set(&amp;opt, "rtsp_transport", "tcp", 0);&#xA;    av_dict_set(&amp;opt, "user-agent", "Media-1.0-Server", 0);&#xA;    //av_dict_set(&amp;opt, "initial_pause","1",0);&#xA;&#xA;&#xA;&#xA;&#xA;    if ((ret = avformat_open_input(&amp;input_fmt_ctx, MEDIA_URL, 0, &amp;opt)) &lt; 0) {&#xA;        fprintf(stderr, "Could not open input url &#x27;%s&#x27;", MEDIA_URL);&#xA;        goto end;&#xA;    }&#xA;&#xA;&#xA;    if ((ret = avformat_find_stream_info(input_fmt_ctx, 0)) &lt; 0) {&#xA;        fprintf(stderr, "Failed to retrieve input stream information");&#xA;        goto end;&#xA;    }&#xA;&#xA;&#xA;    av_dump_format(input_fmt_ctx, 0, MEDIA_URL, 0); // HIDDEN RTP CHANNEL IS ABSENT&#xA;    //av_read_play(input_fmt_ctx);&#xA;&#xA;    while ((ret = av_read_frame(input_fmt_ctx, &amp;frame)) >= 0) {&#xA;&#xA;        /*&#xA;         * Here I never receive rtsp-tcp interleaved channel 4&#xA;         */&#xA;        printf("stream index=%d\r\n",frame.stream_index);&#xA;        av_packet_unref(&amp;frame);&#xA;    }&#xA;&#xA;&#xA;end:&#xA;    if (ret &lt; 0 &amp;&amp; ret != AVERROR_EOF) {&#xA;        fprintf(stderr, "Error occurred: %s\n", av_err2str(ret));&#xA;        return 1;&#xA;    }&#xA;    avformat_close_input(&amp;input_fmt_ctx);&#xA;&#xA;&#xA;    return (EXIT_SUCCESS);&#xA;}&#xA;

    &#xA;&#xA;

    Thank you.

    &#xA;