Recherche avancée

Médias (91)

Autres articles (56)

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

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (10028)

  • Lossless avi encoding on linux

    31 août 2012, par JohnSavage

    I am trying to write video using opencv. It is important for me to do this precisely - so it has to be a lossless codec. I am working with OpenCV 2.4.1 on Ubuntu 12.04

    Previously, I was using the fourcc code 0. This gave me the exact result I wanted, and I was able to recover the images perfectly.

    I am not sure what happened, but as of a recent update (around Jul 20th 2012), something went wrong and I am no longer able to write files with this fourcc code. I really don't remember what it was, but it could have come from doing an update, removing some software from my software center, and some other things I did during general cleaning...

    When I check an older file with mediainfo (http://www.fourcc.org/identifier/) I see the following result :

    Complete name                            : oldsample.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    Format profile                           : OpenDML
    File size                                : 1.07 GiB
    Duration                                 : 41s 467ms
    Overall bit rate                         : 221 Mbps
    Writing application                      : Lavf53.5.0
    Video
    ID                                       : 0
    Format                                   : RGB
    Codec ID                                 : 0x00000000
    Codec ID/Info                            : Basic Windows bitmap format. 1, 4 and 8 bpp     versions are palettised. 16, 24 and 32bpp contain raw RGB samples
    Duration                                 : 41s 467ms
    Bit rate                                 : 221 Mbps
    Width                                    : 640 pixels
    Height                                   : 4294966 816 pixels
    Display aspect ratio                     : 0.000
    Frame rate                               : 30.000 fps
    Bit depth                                : 8 bits
    Stream size                              : 1.07 GiB (100%)

    Now, I see that when I write using the 0 fourcc codec, the program actually defaults to the i420 codec. Here is the output from one of the files I try to write now :

    Complete name                            : newsample.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 73.0 MiB
    Duration                                 : 5s 533ms
    Overall bit rate                         : 111 Mbps
    Writing application                      : Lavf54.6.100
    Video
    ID                                       : 0
    Format                                   : YUV
    Codec ID                                 : I420
    Codec ID/Info                            : 8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes.
    Duration                                 : 5s 533ms
    Bit rate                                 : 111 Mbps
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate                               : 30.000 fps
    Compression mode                         : Lossless
    Bits/(Pixel*Frame)                       : 12.000
    Stream size                              : 72.9 MiB (100%)

    This format, and other formats I try to use (like huffyuv HFYU), do not work for me because I end up with effects like this http://imgur.com/a/0OC4y - you see the bright artifacts coming in due to what I assume is either lossy compression or chroma subsampling in the case of HFYU which is supposed to be lossless. What you are looking at is the red channel from one of my videos. The perceptual effect is negligible when you look at all 3 channels simultaneously but it is essential that I reconstruct the images exactly.

    Furthermore, while I am able to play my old files in media players like vlc, I suddenly find them to be completely incompatible with opencv. When I try to open the older files with a videocapture, the open step works fine, but trying to do a read operation results in a segfault. Furthermore, When I try to write with either :

    CV_FOURCC(0,0,0,0)
    0

    Opencv defaults to I420 for some reason.

    Next, I tried using some alternate codecs. 'DIB ' seems like something that should work for me, and on the opencv website (http://opencv.willowgarage.com/wiki/VideoCodecs) it is listed as a 'recommended' codec. However, trying to use this results in the following message :

    OpenCV-2.4.1/modules/highgui/src/cap_gstreamer.cpp:483: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open

    Aborted (core dumped)

    I checked the opencv source for this codec, and stumbled across the following :

    cd OpenCV-2.4.1/modules
    grep -i -r "CV_FOURCC" ./*
    ...
    ./highgui/src/cap_qt.cpp:    /*if( fourcc == CV_FOURCC( 'D', 'I', 'B', ' ' ))
    ./highgui/include/opencv2/highgui/highgui_c.h:#define CV_FOURCC_DEFAULT CV_FOURCC('I', 'Y', 'U', 'V') /* Use default codec for specified filename (Linux only) */

    I tried installing qt4 and reconfiguring with the WITH_QT flag, but that did not change anything. I also tried uncommenting that part of the code and reinstalling opencv, but that also did not work.

    My ultimate goal is for any way to efficiently store and retrieve a video stream with 16 bits for every pixel (like 32float would work fine, and then it wouldn't need to be perfect). Right now I am unpacking the 16 bits into the red and green channels, which is why I need it to be perfect - since an error of 1 in the red channel is multiplied by 256 in the final result. I am not having success with any of the fourcc codes available to me.

  • How to change metadata with ffmpeg/avconv without creating a new file ?

    15 avril 2014, par tampis

    I am writing a python script for producing audio and video podcasts. There are a bunch of recorded media files (audio and video) and text files containing the meta information.

    Now I want to program a function which shall add the information from the meta data text files to all media files (the original and the converted ones). Because I have to handle many different file formats (wav, flac, mp3, mp4, ogg, ogv...) it would be great to have a tool which add meta data to arbitrary formats.

    My Question :

    How can I change the metadata of a file with ffmpeg/avconv without changing the audio or video of it and without creating a new file ? Is there another commandline/python tool which would do the job for me ?

    What I tried so far :

    I thought ffmpeg/avconv could be such a tool, because it can handle nearly all media formats. I hoped, that if I set -i input_file and the output_file to the same file, ffmpeg/avconv will be smart enough to leave the file unchanged. Then I could set -metadata key=value and just the metadata will be changed.

    But I noticed, that if I type avconv -i test.mp3 -metadata title='Test title' test.mp3 the audio test.mp3 will be reconverted in another bitrate.

    So I thought to use -c copy to copy all video and audio information. Unfortunately also this does not work :

    :~$ du -h test.wav # test.wav is 303 MB big
    303M    test.wav

    :~$ avconv -i test.wav -c copy -metadata title='Test title' test.wav
    avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the
    Libav    developers
    built on Jun 12 2012 16:37:58 with gcc 4.6.3
    [wav @ 0x846b260] max_analyze_duration reached
    Input #0, wav, from 'test.wav':
    Duration: 00:29:58.74, bitrate: 1411 kb/s
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    File 'test.wav' already exists. Overwrite ? [y/N] y
    Output #0, wav, to 'test.wav':
    Metadata:
       title           : Test title
       encoder         : Lavf53.21.0
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, 1411 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press ctrl-c to stop encoding
    size=     896kB time=5.20 bitrate=1411.3kbits/s    
    video:0kB audio:896kB global headers:0kB muxing overhead 0.005014%

    :~$ du -h test.wav # file size of test.wav changed dramatically
    900K    test.wav

    You see, that I cannot use -c copy if input_file and output_file are the same. Of course I could produce a temporarily file :

    :-$ avconv -i test.wav -c copy -metadata title='Test title' test_temp.mp3
    :-$ mv test_tmp.mp3 test.mp3

    But this solution would create (temporarily) a new file on the filesystem and is therefore not preferable.

  • Shared Hosting + Static FFMPEG + PHP (or other scripting language) == failure on finding codec

    7 juillet 2012, par Ethan Allen

    here is the following environment :

    1. 1and1 shared hosting (they do not have ffmpeg installed, all good)
    2. i built a static ffmpeg binary that does not require dynamic loading of shared libaries (i built this on an Ubuntu system)
    3. ffmpeg binary is fully accessible and is able to get access
    4. executing the same command terminal or executing a php/perl script via terminal works fine...however, both scripts through a browser/web request fails with the following :

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

    array
    0 => string 'ffmpeg version git-2012-07-06-6936111 Copyright (c) 2000-2012 the FFmpeg developers' (length=83)
    1 => string ' built on Jul 5 2012 23:04:34 with gcc 4.4.3' (length=46)
    2 => string ' configuration : —prefix=' /ffmpeg' —enable-gpl —enable-libfaac —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libtheora —enable-libvorbis —enable-libvpx —enable-libx264 —enable-nonfree —enable-version3 —enable-static —disable-shared —extra-libs=-static —extra-cflags=-static' (length=323)
    3 => string ' libavutil 51. 64.100 / 51. 64.100' (length=40)
    4 => string ' libavcodec 54. 33.100 / 54. 33.100' (length=40)
    5 => string ' libavformat 54. 15.100 / 54. 15.100' (length=40)
    6 => string ' libavdevice 54. 1.100 / 54. 1.100' (length=40)
    7 => string ' libavfilter 3. 0.101 / 3. 0.101' (length=40)
    8 => string ' libswscale 2. 1.100 / 2. 1.100' (length=40)
    9 => string ' libswresample 0. 15.100 / 0. 15.100' (length=40)
    10 => string ' libpostproc 52. 0.100 / 52. 0.100' (length=40)
    11 => string 'Input #0, image2, from 'http://axiomchurch.co/main/wp-content/plugins/video-embed-thumbnail-generator/flash/skin/images/PlayNormal.png':' ; (length=136)
    12 => string ' Duration : 00:00:00.04, start : 0.000000, bitrate : N/A' (length=54)
    13 => string ' Stream #0:0 : Video : png, rgba, 100x100, 25 tbr, 25 tbn, 25 tbc' (length=66)
    14 => string '[graph 0 input from stream 0:0 @ 0x9482000] w:100 h:100 pixfmt:rgba tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2' (length=109)
    15 => string '[output stream 0:0 @ 0x948ccc0] No opaque field provided' (length=56)
    16 => string '[auto-inserted scaler 0 @ 0x948d160] w:100 h:100 fmt:rgba sar:0/1 -> w:100 h:100 fmt:yuvj420p sar:0/1 flags:0x4' (length=111)
    17 => string '[mjpeg @ 0x948c760] ff_frame_thread_encoder_init failed' (length=55)
    18 => string 'Output #0, image2, to '/homepages/17/d411786663/htdocs/main/wp-content/uploads/2012/07/ffmpeg_exists_test%d.jpg' :' (length=113)
    19 => string ' Stream #0:0 : Video : mjpeg, yuvj420p, 100x100, q=2-31, 200 kb/s, 90k tbn, 25 tbc' (length=83)
    20 => string 'Stream mapping :' (length=15)
    21 => string ' Stream #0:0 -> #0:0 (png -> mjpeg)' (length=36)
    22 => string 'Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height' (length=119)

    The command being executed :

    /kunden/homepages/17/.../htdocs/bin/ffmpeg -i http://....co/main/wp-content/plugins/video-embed-thumbnail-generator/flash/skin/images/PlayNormal.png -ac 2 /homepages/17/.../htdocs/main/wp-content/uploads/2012/07/ffmpeg_exists_test.jpg

    You can see i have the full path of my ffmpeg binary and that it is executing. Here is what it looks like successfully via terminal :

    ffmpeg version git-2012-07-06-6936111 Copyright (c) 2000-2012 the FFmpeg developers
    built on Jul 5 2012 23:04:34 with gcc 4.4.3
    configuration : —prefix=' /ffmpeg' —enable-gpl —enable-libfaac —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libtheora —enable-libvorbis —enable-libvpx —enable-libx264 —enable-nonfree —enable-version3 —enable-static —disable-shared —extra-libs=-static —extra-cflags=-static
    libavutil 51. 64.100 / 51. 64.100
    libavcodec 54. 33.100 / 54. 33.100
    libavformat 54. 15.100 / 54. 15.100
    libavdevice 54. 1.100 / 54. 1.100
    libavfilter 3. 0.101 / 3. 0.101
    libswscale 2. 1.100 / 2. 1.100
    libswresample 0. 15.100 / 0. 15.100
    libpostproc 52. 0.100 / 52. 0.100
    Input #0, image2, from 'http://axiomchurch.co/main/wp-content/plugins/video-embed-thumbnail-generator/flash/skin/images/PlayNormal.png':
    Duration : 00:00:00.04, start : 0.000000, bitrate : N/A
    Stream #0:0 : Video : png, rgba, 100x100, 25 tbr, 25 tbn, 25 tbc
    [graph 0 input from stream 0:0 @ 0x9482000] w:100 h:100 pixfmt:rgba tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
    [output stream 0:0 @ 0x948ccc0] No opaque field provided
    [auto-inserted scaler 0 @ 0x948d160] w:100 h:100 fmt:rgba sar:0/1 -> w:100 h:100 fmt:yuvj420p sar:0/1 flags:0x4
    Output #0, image2, to '/homepages/17/d411786663/htdocs/main/wp-content/uploads/2012/07/ffmpeg_exists_test.jpg' :
    Metadata :
    encoder : Lavf54.15.100
    Stream #0:0 : Video : mjpeg, yuvj420p, 100x100, q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream mapping :
    Stream #0:0 -> #0:0 (png -> mjpeg)
    Press [q] to stop, [?] for help
    frame= 1 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.04 bitrate= 0.0kbits/s
    video:2kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000000%

    The user running the script at terminal AND the apache user are the same user...i have verified this.

    Something about the environment apache is running through is killing me...i dont have access to apache error logs unfortunately.

    As a side note...i am trying to utilize the Video Embed & Thumbnail Generator for wordpress.

    Any help appreciated, thanks !