Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (111)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

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

  • xuggler failed to write header to container

    13 juillet 2015, par user3601262

    I am trying to download video from RTSP stream to a file on my computer using the Xuggler 5.4 library.

    String outputFilename = "D:\\downloadedrtsp.avi";
    String inputSource = "rtsp://[ip-address]:[port]/user=[username]&[password]=password&channel=1&stream=1.sdp";

       try {
           IContainer container = IContainer.make();
           IMetaData im = IMetaData.make();
           im.setValue("max_delay", (1000000l) + "");
           int retval = im.setValue("rtsp_transport", "tcp");

           container.open(inputSource, IContainer.Type.READ, null, false, true, im, null);
           IMediaReader mediaReader = ToolFactory.makeReader(container);

           IMediaWriter mediaWriter = ToolFactory.makeWriter(outputFilename, mediaReader);

           mediaReader.addListener(mediaWriter);

           IError error;
           while ((error = mediaReader.readPacket()) == null) {
               logger.info("reading packet");
           }
       } catch (Exception e) {
           e.printStackTrace();
       }

    But the code fails with a stacktrace

    15:40:52.500 [main] ERROR org.ffmpeg - [tcp @ 00000000171C6BE0] Failed to resolve hostname \downloadedrtsp.avi: ???? ???? ??????????.
    15:40:52.500 [main] ERROR com.xuggle.xuggler - Error: could not write header for container (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:827)
    java.lang.RuntimeException: Error Operation not permitted, failed to write header to container com.xuggle.xuggler.IContainer@387681280[url:D:\downloadedrtsp.avi;type:WRITE;format:com.xuggle.xuggler.IContainerFormat@387719536[oname:rtsp;olongname:RTSP output format;omimetype:null;oextensions:null;];] while establishing stream com.xuggle.xuggler.IStream@387690704[index:1;id:0;streamcoder:com.xuggle.xuggler.IStreamCoder@384527536[codec=com.xuggle.xuggler.ICodec@387719392[type=CODEC_TYPE_AUDIO;id=CODEC_ID_AAC;name=libvo_aacenc;];time base=1/8000;frame rate=0/0;sample rate=8000;channels=1;];framerate:0/0;timebase:1/90000;direction:OUTBOUND;]
       at com.xuggle.mediatool.MediaWriter.getStream(MediaWriter.java:1058)
       at com.xuggle.mediatool.MediaWriter.encodeAudio(MediaWriter.java:830)
       at com.xuggle.mediatool.MediaWriter.onAudioSamples(MediaWriter.java:1441)
       at com.xuggle.mediatool.AMediaToolMixin.onAudioSamples(AMediaToolMixin.java:89)
       at com.xuggle.mediatool.MediaReader.dispatchAudioSamples(MediaReader.java:628)
       at com.xuggle.mediatool.MediaReader.decodeAudio(MediaReader.java:555)
       at com.xuggle.mediatool.MediaReader.readPacket(MediaReader.java:469)
       at ua.datalink.main.StreamTranscodingExample.readHigherLevel(StreamTranscodingExample.java:103)
       at ua.datalink.main.StreamTranscodingExample.main(StreamTranscodingExample.java:121)

    The file is created on program startup, but it’s empty. Where can the problem lies ? I have spend hours to figure it out, but still no result.

  • Ffmpeg hangs when -vcodec copy specified (called from Java via ProcessBuilder)

    24 juin 2015, par Inglonias

    I’m trying to use ffmpeg to export an array of bytes to a video file, but the people I work with insist that I use -vcodec copy in the arguments for it. This, however, causes the code to hang, whereas if I don’t use -vcodec copy, the code will not hang. I don’t know what the problem is, and I’ve been trying to debug this code for the past two hours.

    Here is the relevant section of code. I’ve added comments above and below the line where the code hangs. Can anybody help me ?

           // This is the tricky part. We need to build an ffmpeg process that
           // takes input from stdin, and then plug Java into that.
           ProcessBuilder ffmpegBuilder = new ProcessBuilder();
           String[] cmd = {"ffmpeg", "-i", "-","-vcodec", "copy", directory
                   + "/" + fileName};
           StringBuilder combinedCmd = new StringBuilder();
           for (String s : cmd) {
               combinedCmd.append(s);
               combinedCmd.append(" ");
           }
           mLogger.log(Level.INFO,"Final command is " + combinedCmd.toString());
           ffmpegBuilder.command(cmd);
           ffmpegBuilder.redirectErrorStream(true); // So that stdout and stderr go
                                                       // to the same stream.
           byte[] dataToWrite = new byte[data.size()];
           for (int i = 0; i < dataToWrite.length; i++) {
               dataToWrite[i] = data.get(i); // Is there really STILL no better way
                                               // to convert an ArrayList to an
                                               // array?!
           }
           try {
               Process ffmpeg = ffmpegBuilder.start();
               OutputStream stdin = ffmpeg.getOutputStream();
               BufferedReader stdout = new BufferedReader(new InputStreamReader(
                       ffmpeg.getInputStream()));
    //HANGS AT THIS LINE vvvvvvvvvvvvvvvv
               stdin.write(dataToWrite);
    //HANGS AT THIS LINE ^^^^^^^^^^^^^^^^

               String line = "I know a song that gets on everybody's nerves...";
               while ((line != null) && stdout.ready()) {
                   line = stdout.readLine();
                   mLogger.log(Level.INFO, line);
               }
               try {
                   ffmpeg.waitFor(2, TimeUnit.SECONDS);
                   ffmpeg.destroyForcibly();
               } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
               }
           } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
  • Cannot enable GD support for ffmpeg-php extension

    26 avril 2015, par user3529796

    This is from phpinfo()

    ffmpeg

    ffmpeg-php version  0.6.0-svn
    ffmpeg-php built on Apr 25 2015 20:01:27
    ffmpeg-php gd support   disabled
    ffmpeg libavcodec version   Lavc52.72.2
    ffmpeg libavformat version  Lavf52.64.2
    ffmpeg swscaler version SwS0.11.0

    Directive   Local Value Master Value
    ffmpeg.allow_persistent 0   0
    ffmpeg.show_warnings    0   0

    gd

    GD Support  enabled
    GD Version  bundled (2.1.0 compatible)
    FreeType Support    enabled
    FreeType Linkage    with freetype
    FreeType Version    2.3.11
    GIF Read Support    enabled
    GIF Create Support  enabled
    JPEG Support    enabled
    libJPEG Version 6b
    PNG Support enabled
    libPNG Version  1.2.49
    WBMP Support    enabled
    XPM Support enabled
    libXpm Version  30411
    XBM Support enabled

    Directive   Local Value Master Value
    gd.jpeg_ignore_warning  0   0

    I just need to enable gd support for ffmpeg. I’ve tried using ./configure --enable-skip-gd-check and nothing has worked. I’ve scoured google for the last 12 hours and tried every "solution" so any advice is appreciated. Thanks.

    Terminal output after ./configure --enable-skip-gd-check :

    root@ip-111-111-111-11 [/usr/local/src/ffmpeg-php-0.6.0]# ./configure --enable-skip-gd-check
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking for cc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether cc accepts -g... yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for icc... no
    checking for suncc... no
    checking whether cc understands -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for PHP prefix... /usr/local
    checking for PHP includes... -I/usr/local/include/php
    I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
    checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20121212
    checking for PHP installed headers prefix... /usr/local/include/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking for gawk... gawk
    checking for ffmpeg support... yes, shared
    checking whether to force gd support in ffmpeg-php... yes
    checking for ffmpeg headers... ...found in /usr/include/libavcodec
    checking for ffmpeg libavcodec.so... ...found in /usr/lib64
    checking for ffmpeg swscale support... yes
    checking for ld used by cc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognize dependent libraries... pass_all
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking the maximum length of command line arguments... 1966080
    checking command to parse /usr/bin/nm -B output from cc object... ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    checking if cc supports -fno-rtti -fno-exceptions... no
    checking for cc option to produce PIC... -fPIC
    checking if cc PIC flag -fPIC works... yes
    checking if cc static flag -static works... yes
    checking if cc supports -c -o file.o... yes
    checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no

    creating libtool
    appending configuration tag "CXX" to libtool
    configure: creating ./config.status
    config.status: creating config.h