Advanced search

Medias (91)

Other articles (85)

  • Mise à jour de la version 0.1 vers 0.2

    24 June 2013, by

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1); Installation des dépendances pour Smush; Installation de MediaInfo et FFprobe pour la récupération des métadonnées; On n’utilise plus ffmpeg2theora; On n’installe plus flvtool2 au profit de flvtool++; On n’installe plus ffmpeg-php qui n’est plus maintenu au profit de (...)

  • Ecrire une actualité

    21 June 2013, by

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Support audio et vidéo HTML5

    10 April 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 (...)

On other websites (11578)

  • ffprobe or avprove returning plain text errors in JSON output

    10 April 2013, by Justin Jenkins

    I'm running avprobe to get stream infomation about a video in JSON ...

    avprobe -loglevel quiet -show_format -show_streams file.m4v -of json

    This is basically the exact same thing as ffprobe or ffmpeg -i (and I get the same error.)

    ffprobe -loglevel quiet -show_format -show_streams file.m4v -print_format json

    The command works most of the time ... however, on occation I'll have a video that has an odd stream in it that is "unsupported" and I'll get back something like this (abbreviated.)

    Unsupported codec with id 94213 for input stream 2
    {  "format" : {
       "filename" : "file.m4v",
       "nb_streams" : 3,
       "format_name" : "mov,mp4,m4a,3gp,3g2,mj2" ...

    When I run the command I get back JSON + an error in plain text, which makes the result invalid JSON and I have to "clean it up" later.

    I'm suppressing errors from the output -loglevel quiet but the error still show up.

    How can I tell avprobe/ffprobe to not show this error and hence get back a proper JSON object?


    Longer Output Examples

    ffprobe, from source, MacOS

    ffprobe version 0.9.1-subsplash, Copyright (c) 2007-2012 the FFmpeg developers
     built on Feb  5 2012 01:35:36 with gcc 4.2.1 (Apple Inc. build 5664)
     configuration: --prefix=/Volumes/Ramdisk/sw --as=yasm --extra-version=subsplash --disable-shared --enable-static --disable-ffplay --disable-ffserver --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libfaac --enable-libvorbis --enable-libtheora --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86_64 --enable-runtime-cpudetect --enable-nonfree
     libavutil    51. 32. 0 / 51. 32. 0
     libavcodec   53. 42. 4 / 53. 42. 4
     libavformat  53. 24. 2 / 53. 24. 2
     libavdevice  53.  4. 0 / 53.  4. 0
     libavfilter   2. 53. 0 /  2. 53. 0
     libswscale    2.  1. 0 /  2.  1. 0
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.m4v':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2012-01-01 06:38:43
       encoder         : HandBrake 0.9.5 2011010300
     Duration: 00:30:47.53, start: 0.000000, bitrate: 1558 kb/s
       Chapter #0.0: start -0.066733, end 17.784433
       Metadata:
         title           : Chapter  1

    ...

       Stream #0:2(und): Subtitle: mov_text (text / 0x74786574)
       Metadata:
         creation_time   : 2012-01-01 06:38:43
         handler_name    :
    Unsupported codec with id 94213 for input stream 2
    {

    ...

    avprobe, from source, Ubuntu Linux

    avprobe version 10_alpha1-6:10~~git20130307.4be368b-1~quantal1, Copyright (c) 2007-2013 the Libav developers
     built on Mar  7 2013 22:12:44 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.m4v':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2012-01-01 06:38:43
       encoder         : HandBrake 0.9.5 2011010300
     Duration: 00:30:47.53, start: 0.000000, bitrate: 1558 kb/s
       Chapter #0.0: start -0.066733, end 17.784433
       Metadata:
         title           : Chapter  1

    ...

       Stream #0.2(und): Subtitle: text / 0x74786574
       Metadata:
         creation_time   : 2012-01-01 06:38:43
    Unsupported codec with id 94213 for input stream 2
    {

    ...
  • Damaged h264 stream not working with ffmpeg but working with vlc or mplayer

    15 April 2013, by gregoiregentil

    I have a h264 file, coming from an rtsp stream, that is slightly damaged. Some frames are altered.

    ffmpeg reports:

    ffmpeg -i stream.mpg
    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:00:59 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.

    Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
    Input #0, mpegts, from 'a.mpg':
     Duration: 00:03:18.84, start: 93370.745522, bitrate: 2121 kb/s
     Program 1
       Stream #0.0[0x44](): Video: h264 (Baseline), yuv420p, 640x480, 90k tbr, 90k tbn, 180k tbc
    At least one output file must be specified

    I can play the file with VLC or mplayer. Obviously, the damaged frames are "kind of blurred" but it's working. mplayer reports:

    mplayer stream.mpg
    MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.

    Playing stream.mpg.
    Detected file format: MPEG-2 transport stream format (libavformat)
    [lavf] stream 0: video (h264), -vid 0
    LAVF: Program 1
    VIDEO:  [H264]  640x480  0bpp  90000.000 fps    0.0 kbps ( 0.0 kbyte/s)
    Load subtitles in .
    [ass] auto-open
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Asking decoder to use 2 threads if supported.
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ==========================================================================
    Audio: no sound
    Starting playback...
    V:   0.0   0/  0 ??% ??% ??,?% 0 0
    Movie-Aspect is undefined - no prescaling applied.
    VO: [xv] 640x480 => 640x480 Planar YV12
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!
    Video pts after filters MISSING
    V:93370.7   0/  0 ??% ??% ??,?% 0 0
    No pts value from demuxer to use for frame!

    When I try to re-encode the file with:

    ffmpeg -i stream.mpg -fflags +genpts -an -vcodec mpeg4 -r 65535/2733 stream.mp4

    ffmpeg seems to jump over the altered frames. The length of stream.mp4 << length of stream.mpg

    How could I fix this problem, i.e. having ffmpeg to output something similar to what mplayer and vlc output?

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

    2 July 2013, by 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 &#39;.\sound1.wav&#39;:
     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 &#39;abc.ogg&#39;:
     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 &#39;C:\Users\Bevin\AppData\Local\Temp\tmp1CCE.tmp&#39;:
     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 &#39;pipe:&#39;:
     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.