Recherche avancée

Médias (91)

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

  • ffmpeg run from shell runs properly, but does not when called from within .NET

    2 juillet 2013, par Bevin

    I'm attempting to use ffmpeg (compiled on Windows with Cygwin) in a C# program, by using the Process class to spawn an ffmpeg instance. However, I've hit a rather odd bug that doesn't make much sense.

    When I run ffmpeg directly from a shell (be it Cygwin's bash, PowerShell, cmd), ffmpeg can properly decode and reencode files without any issues :

    PS C:\audio> ffmpeg -i .\sound1.wav -acodec libvorbis -f ogg abc.ogg
    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on Apr  8 2013 15:10:40 with gcc 4.5.3 (GCC)
     configuration: --disable-encoder=vorbis --enable-libvorbis
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
    [wav @ 0x800538a0] max_analyze_duration 5000000 reached at 5015510 microseconds
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, wav, from '.\sound1.wav':
     Metadata:
       encoder         : Lavf54.63.104
     Duration: 00:00:05.76, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Output #0, ogg, to 'abc.ogg':
     Metadata:
       encoder         : Lavf54.63.104
       Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp
    Stream mapping:
     Stream #0:0 -> #0:0 (pcm_s16le -> libvorbis)
    Press [q] to stop, [?] for help
    size=      55kB time=00:00:05.74 bitrate=  78.5kbits/s
    video:0kB audio:51kB subtitle:0 global headers:4kB muxing overhead 0.817473%

    The file plays fine, and I can encode to WAV or any other format I like. However, when I call ffmpeg from C# with the following code :

    string tempfile = Path.GetTempFileName();
    FileStream tempfilestr = File.OpenWrite(tempfile);
    input.CopyTo(tempfilestr);

    ProcessStartInfo pstart = new ProcessStartInfo("ffmpeg", string.Format("-i \"{0}\" -v verbose -y -f wav -", tempfile));
    pstart.CreateNoWindow = true;
    pstart.ErrorDialog = false;
    pstart.RedirectStandardOutput = true;
    pstart.RedirectStandardError = true;
    pstart.UseShellExecute = false;


    Process proc = new Process();
    proc.StartInfo = pstart;
    proc.Start();
    StreamReader stdout = proc.StandardOutput;
    StreamReader stderr = proc.StandardError;

    outtempfilestr = File.OpenRead(outtempfile);
    MemoryStream output = new MemoryStream();

    stdout.BaseStream.CopyTo(output);

    try {
       proc.Kill();
    }
    catch(InvalidOperationException) { }
    catch(Win32Exception) { }

    File.Delete(tempfile);

    return output.ToArray();

    This randomly produces errors in the output :

    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on Apr  8 2013 15:10:40 with gcc 4.5.3 (GCC)
     configuration: --disable-encoder=vorbis --enable-libvorbis
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
    [wav @ 0x80053860] parser not found for codec pcm_s16le, packets or times may be invalid.
       Last message repeated 1 times
    [wav @ 0x80053860] max_analyze_duration 5000000 reached at 5015510 microseconds
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, wav, from 'C:\Users\Bevin\AppData\Local\Temp\tmp1CCE.tmp':
     Duration: 00:00:05.20, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    [graph 0 input from stream 0:0 @ 0x8011f320] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
    Output #0, wav, to 'pipe:':
     Metadata:
       ISFT            : Lavf54.63.104
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
    Press [q] to stop, [?] for help
    Multiple frames in a packet from stream 0
    [pcm_s16le @ 0x8005c160] Invalid PCM packet, data has size 3 but at least a size of 4 was expected
    Error while decoding stream #0:0: Invalid data found when processing input
    No more output streams to write to, finishing.
    size=     896kB time=00:00:05.20 bitrate=1411.3kbits/s    
    video:0kB audio:896kB subtitle:0 global headers:0kB muxing overhead 0.008719%

    Note that these errors don't always occur. Sometimes they happen for certain files, sometimes they don't. I've tried various combinations of stream redirects and temp files, none of them work. I've also verified the integrity of the temp files, and it all checks out. I've even extracted the temp file before it was deleted, and decoded it in shell without a hitch.

    Any ideas ?

    Edit : I've tried running ffmpeg from a shell script that's run through C#. It gives the same issues. Compiling ffmpeg via MinGW gives the same issue as well.

  • Desktop streaming to Wowza server using ffmpeg

    24 avril 2013, par Gergely Lukacsy

    Recently, I'm trying to utilize ffmpeg for streaming live desktop screen to a Wowza media server.

    I have partial success on the subject so far :

    I've managed to record desktop screen using the UScreenCapture directx dshow filter, and I'm also able to send this record to the server.
    However, when I'm trying to send the screen directly to the server, it fails every time. The player is buffering pretty slowly, and shows a blank screen when it's done (the counter keeps counting).

    So, here are the working methods

    for recording screen :

    ffmpeg -f dshow -i video="UScreenCapture" -r 25 -vcodec libx264 output.flv

    and for streaming video :

    ffmpeg -re -i  -map 0 -c copy -vbsf h264_mp4toannexb -f mpegts udp://stream.server.xyz:52000?pkt_size=1024

    And this is the code I'm using :

    ffmpeg -f dshow -i video="UScreenCapture" -s width x height -r framerate -vcodec libx264 -pix_fmt yuv420p -b:v bitrate -an -vbsf h264_mp4toannexb -f mpegts udp ://your.destination.url:PORTNUMBER ?pkt_size=some_bytes

    As far as I can remember, it worked well before I upgraded wowza.

    Some additional info :

    • OS : win7 sp1 64bit
    • ffmpeg N-49610-gc2dd5a1 (Zeranoe FFmpeg build 2013 Feb 5)
    • UScreenCapture : x64 Edition Version 2.0.14
    • Wowza 3.5.2 running on a Debian linux 2.6.32-5-amd64
    • Flowplayer : 3.2.15

    Looking trough the Wowza log files, something caught my attention. It seems when I'm streaming desktop screen, the server somhow gets uncomplete packets, but when I'm streaming a video file, the error doesn't occurs.

    RTPDePacketizerMPEGTS.handleRTPPacket
    WARN server comment 2013-04-11 11:26:24 - - - - - 152629.665 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:27 - - - - - 152632.782 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:31 - - - - - 152636.383 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:38 - - - - - 152643.484 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:47 - - - - - 152653.088 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:52 - - - - - 152657.587 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:26:56 - - - - - 152661.624 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472
    WARN server comment 2013-04-11 11:27:05 - - - - - 152670.805 - - - - - - - -RTPDePacketizerMPEGTS.handleRTPPacket: Incomplete packet: 1504:1472

    What causes this error ? Any ideas ?

    Thanks in advance !

  • FFmpeg error message when processing

    19 avril 2013, par FlyingCat

    Hi I am using FFmpeg to get the image from several video files.

    I got my ffmpeg codes ready but I got the following error when I exec my codes.

    ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
    built on Apr  2 2013 17:02:36 with gcc 4.6.3

    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.

    //files info...
    //files info...

    Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'

    //file info...

    [buffer @ 0x1513c40] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    Last message repeated 75 times

    [image2 @ 0x1513460] Could not open file : /test/project
    av_interleaved_write_frame(): Input/output error

    I only show the error messages that have color highlighted.

    My codes

                  $ffmpeg ="/usr/bin/ffmpeg";

                  $image_source_path = '/test/project/test.mp4';
                  $ALL_PLACE_WIDTH = 300;
                  $ALL_PLACE_HEIGHT = 300;

                  $image_cmd = " -r 1 -ss 00:00:10 -t 00:00:01 -s ".$ALL_PLACE_WIDTH."x".$ALL_PLACE_HEIGHT."   -f image2 " ;

                  $dest_image_path = '/test/project';

                  $str_command= $ffmpeg  ." -i " . $image_source_path . $image_cmd .$dest_image_path;
                  shell_exec($str_command);

    It seems my linux want to me switch avconv. I am not sure how to fix these errors. Can someone give me a hint about it ? Thanks so much !