Recherche avancée

Médias (91)

Autres articles (33)

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

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

Sur d’autres sites (4645)

  • Error using ffmpeg image2pipe with phantomjs to render video from webpage screenshots

    14 novembre 2016, par user1690179

    I am trying to use phantomjs with ffmpeg to complie videos from screenshots of a webpage as described here :
    https://groups.google.com/forum/# !msg/phantomjs/wluVGGjhL90/oGBXqh7QP44J

    I have the following test.js file :

    var page = require('webpage').create();

    page.clipRect = { top: 0, left: 0, width: 900, height: 800};
    page.viewportSize = { width: 900, height: 800};

    var url = 'http://dl.dropbox.com/u/621993/voronoi/voronoi.html';
    var frames = 100;

    page.open(url, function(){
       setInterval(function(){
           page.render('/dev/stdout');

           if( frames == 0 ){
               phantom.exit();
           }

           frames--;

       }, 100);
    });

    Then I run this command, taken from the link above :

    $ phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -sameq -i - -y test.mp4

    Including -sameq causes an error in ffmpeg, so I took it out and ran :

    $ phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -i - -y test.mp4

    I get the following output from ffmpeg :

    ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
     built on Jul 22 2013 09:14:18 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect
     libavutil      52. 38.100 / 52. 38.100
     libavcodec     55. 18.102 / 55. 18.102
     libavformat    55. 12.100 / 55. 12.100
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 79.101 /  3. 79.101
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, image2pipe, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: png, rgba, 900x800 [SAR 2835:2835 DAR 9:8], 10 fps, 10 tbr, 10 tbn, 10 tbc
    No pixel format specified, yuv444p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x7f8973803800] using SAR=1/1
    [libx264 @ 0x7f8973803800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7f8973803800] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
    [libx264 @ 0x7f8973803800] 264 - core 133 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'test.mp4':
     Metadata:
       encoder         : Lavf55.12.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 900x800 [SAR 1:1 DAR 9:8], q=-1--1, 10240 tbn, 10 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (png -> libx264)
    pipe:: Input/output error0 size=      65kB time=00:00:04.10 bitrate= 130.5kbits/s    
    frame=   93 fps= 15 q=-1.0 Lsize=      71kB time=00:00:09.10 bitrate=  63.8kbits/s    
    video:69kB audio:0kB subtitle:0 global headers:0kB muxing overhead 2.696543%
    [libx264 @ 0x7f8973803800] frame I:1     Avg QP:15.17  size: 50212
    [libx264 @ 0x7f8973803800] frame P:24    Avg QP: 8.91  size:   575
    [libx264 @ 0x7f8973803800] frame B:68    Avg QP: 9.69  size:    87
    [libx264 @ 0x7f8973803800] consecutive B-frames:  2.2%  0.0%  3.2% 94.6%
    [libx264 @ 0x7f8973803800] mb I  I16..4: 64.2% 19.6% 16.1%
    [libx264 @ 0x7f8973803800] mb P  I16..4:  2.8%  0.2%  0.1%  P16..4:  0.5%  0.0%  0.0%  0.0%  0.0%    skip:96.3%
    [libx264 @ 0x7f8973803800] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  3.1%  0.0%  0.0%  direct: 0.0%  skip:96.9%  L0:76.4% L1:23.6% BI: 0.0%
    [libx264 @ 0x7f8973803800] 8x8 transform intra:13.9% inter:54.0%
    [libx264 @ 0x7f8973803800] coded y,u,v intra: 7.4% 4.8% 5.2% inter: 0.1% 0.1% 0.1%
    [libx264 @ 0x7f8973803800] i16 v,h,dc,p: 68% 31%  2%  0%
    [libx264 @ 0x7f8973803800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 48% 20% 32%  0%  0%  0%  0%  0%  0%
    [libx264 @ 0x7f8973803800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 31% 20%  3%  3%  3%  5%  3%  4%
    [libx264 @ 0x7f8973803800] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7f8973803800] ref P L0: 91.9%  0.0%  7.4%  0.7%
    [libx264 @ 0x7f8973803800] ref B L0: 20.5% 79.5%
    [libx264 @ 0x7f8973803800] ref B L1: 99.9%  0.1%
    [libx264 @ 0x7f8973803800] kb/s:60.16

    The output test.mp4 file is a blank 10 second video - just a black screen. From what i can tell, I am getting a pipe: : Input/output error from ffmpeg.

    I am pretty new to ffmpeg and I have tried changing some parameters and video codecs in the ffmpeg call, but have not found a solution yet. Can anyone advise ?

  • FFmpeg audio dont work in converted videos

    28 octobre 2013, par Bar Cumberworth

    NOTICE : when i convert videos via terminal and download them from ftp into pc the audio works fine. I use :

    if($ext == "avi" && $convert_avi == true)
               {
                   $convert_source = _VIDEOS_DIR_PATH.$new_name;
                   $conv_name = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
                   $converted_file  = _VIDEOS_DIR_PATH.$conv_name;
                   $ffmpeg_command = 'ffmpeg -i '.$convert_source.' -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 '.$converted_file;
                   echo exec($ffmpeg_command);
                   $sql = "UPDATE pm_temp SET url = '".$conv_name."' WHERE url = '".$new_name."' LIMIT 1";
                   $result = @mysql_query($sql);
                   unlink($convert_source);    
               }

    This code to convert avi to mp4 ffmpeg concole output :

    root@1tb:~# ffmpeg -i sample.avi -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 goodsample.mp4
    ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb 22 2013 07:18:58 with gcc 4.4.5
     configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger -                                                                                                                                                             s
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    [mp3 @ 0x191d4100] Header missing
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    Input #0, avi, from 'sample.avi':
     Metadata:
       encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
     Duration: 00:01:01.81, start: 0.000000, bitrate: 1194 kb/s
       Stream #0.0: Video: mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 23.98 tbr,
       Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    [buffer @ 0x191d1c80] w:640 h:352 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
    [scale @ 0x191d6880] w:640 h:352 fmt:yuv420p -> w:1280 h:720 fmt:yuv420p flags:0
    [libx264 @ 0x191ce5a0] Default settings detected, using medium profile
    [libx264 @ 0x191ce5a0] using SAR=45/44
    [libx264 @ 0x191ce5a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle S
    [libx264 @ 0x191ce5a0] profile High, level 3.1
    [libx264 @ 0x191ce5a0] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft 2003-2                                                                                                                                                             6 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_off                                                                                                                                                             1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_l
    Output #0, mp4, to 'goodsample.mp4':
     Metadata:
       encoder         : Lavf52.111.0
       Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 45:44 DAR 20:11], q=2-31
       Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    [mp3 @ 0x191d4100] Header missing
    Error while decoding stream #0.1
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    [mp3 @ 0x191d4100] incomplete frame 9467kB time=00:01:00.32 bitrate=1285.5kbits/
    Error while decoding stream #0.1
    frame= 1852 fps= 20 q=29.0 Lsize=    9652kB time=00:01:01.72 bitrate=1280.9kbits
    video:9121kB audio:483kB global headers:0kB muxing overhead 0.499688%
    frame I:11    Avg QP:16.78  size: 51456
    [libx264 @ 0x191ce5a0] frame P:784   Avg QP:20.81  size:  8954
    [libx264 @ 0x191ce5a0] frame B:1057  Avg QP:26.06  size:  1659
    [libx264 @ 0x191ce5a0] consecutive B-frames: 22.0%  3.1%  7.5% 67.4%
    [libx264 @ 0x191ce5a0] mb I  I16..4: 31.1% 59.8%  9.1%
    [libx264 @ 0x191ce5a0] mb P  I16..4:  1.8%  2.6%  0.2%  P16..4: 24.3%  7.0%  4.0
    [libx264 @ 0x191ce5a0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 22.7%  0.8%  0.2
    [libx264 @ 0x191ce5a0] 8x8 transform intra:57.0% inter:72.6%
    [libx264 @ 0x191ce5a0] coded y,uvDC,uvAC intra: 44.4% 33.3% 10.3% inter: 7.6% 5.
    [libx264 @ 0x191ce5a0] i16 v,h,dc,p: 68% 14%  8% 10%
    [libx264 @ 0x191ce5a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 27%  5%  7%  7%  6
    [libx264 @ 0x191ce5a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 14% 14%  6% 10%  9%  7
    [libx264 @ 0x191ce5a0] i8c dc,h,v,p: 67% 13% 17%  3%
    [libx264 @ 0x191ce5a0] Weighted P-Frames: Y:1.9% UV:0.4%
    [libx264 @ 0x191ce5a0] ref P L0: 62.2% 12.8% 10.3% 14.5%  0.2%
    [libx264 @ 0x191ce5a0] ref B L0: 88.1%  5.5%  6.4%
    [libx264 @ 0x191ce5a0] ref B L1: 95.7%  4.3%
    [libx264 @ 0x191ce5a0] kb/s:1209.03

    I know there is couple errors tough, but i dont know hot to fix it. Also i would be very thankfull if someone can help reduce video size but is not main problem video weights as original avi but sill.

  • FFmpeg audio doesnt work in converted videos but in pc it does

    28 octobre 2013, par Dirk Swarz

    I use :

    if($ext == "avi" && $convert_avi == true)
                       {
                           $convert_source = _VIDEOS_DIR_PATH.$new_name;
                           $conv_name = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
                           $converted_file  = _VIDEOS_DIR_PATH.$conv_name;
                           $ffmpeg_command = 'ffmpeg -i '.$convert_source.' -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 '.$converted_file;
                           echo exec($ffmpeg_command);
                           $sql = "UPDATE pm_temp SET url = '".$conv_name."' WHERE url = '".$new_name."' LIMIT 1";
                           $result = @mysql_query($sql);
                           unlink($convert_source);    
                       }

    This code to convert avi to mp4
    ffmpeg concole output :

    root@1tb:~# ffmpeg -i sample.avi -acodec libmp3lame -vcodec libx264 -s 1280x720 -ar 44100 -async 44100 -r 29.970 -ac 2 -qscale 5 goodsample.mp4
    ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers
     built on Feb 22 2013 07:18:58 with gcc 4.4.5
     configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger -                                                                                                                                                             s
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    [mp3 @ 0x191d4100] Header missing
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    Input #0, avi, from 'sample.avi':
     Metadata:
       encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
     Duration: 00:01:01.81, start: 0.000000, bitrate: 1194 kb/s
       Stream #0.0: Video: mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 23.98 tbr,
       Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
    [buffer @ 0x191d1c80] w:640 h:352 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
    [scale @ 0x191d6880] w:640 h:352 fmt:yuv420p -> w:1280 h:720 fmt:yuv420p flags:0
    [libx264 @ 0x191ce5a0] Default settings detected, using medium profile
    [libx264 @ 0x191ce5a0] using SAR=45/44
    [libx264 @ 0x191ce5a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle S
    [libx264 @ 0x191ce5a0] profile High, level 3.1
    [libx264 @ 0x191ce5a0] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft 2003-2                                                                                                                                                             6 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_off                                                                                                                                                             1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_l
    Output #0, mp4, to 'goodsample.mp4':
     Metadata:
       encoder         : Lavf52.111.0
       Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 45:44 DAR 20:11], q=2-31
       Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    [mp3 @ 0x191d4100] Header missing
    Error while decoding stream #0.1
    [mpeg4 @ 0x191d1dc0] Invalid and inefficient vfw-avi packed B frames detected
    [mp3 @ 0x191d4100] incomplete frame 9467kB time=00:01:00.32 bitrate=1285.5kbits/
    Error while decoding stream #0.1
    frame= 1852 fps= 20 q=29.0 Lsize=    9652kB time=00:01:01.72 bitrate=1280.9kbits
    video:9121kB audio:483kB global headers:0kB muxing overhead 0.499688%
    frame I:11    Avg QP:16.78  size: 51456
    [libx264 @ 0x191ce5a0] frame P:784   Avg QP:20.81  size:  8954
    [libx264 @ 0x191ce5a0] frame B:1057  Avg QP:26.06  size:  1659
    [libx264 @ 0x191ce5a0] consecutive B-frames: 22.0%  3.1%  7.5% 67.4%
    [libx264 @ 0x191ce5a0] mb I  I16..4: 31.1% 59.8%  9.1%
    [libx264 @ 0x191ce5a0] mb P  I16..4:  1.8%  2.6%  0.2%  P16..4: 24.3%  7.0%  4.0
    [libx264 @ 0x191ce5a0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 22.7%  0.8%  0.2
    [libx264 @ 0x191ce5a0] 8x8 transform intra:57.0% inter:72.6%
    [libx264 @ 0x191ce5a0] coded y,uvDC,uvAC intra: 44.4% 33.3% 10.3% inter: 7.6% 5.
    [libx264 @ 0x191ce5a0] i16 v,h,dc,p: 68% 14%  8% 10%
    [libx264 @ 0x191ce5a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 27%  5%  7%  7%  6
    [libx264 @ 0x191ce5a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 14% 14%  6% 10%  9%  7
    [libx264 @ 0x191ce5a0] i8c dc,h,v,p: 67% 13% 17%  3%
    [libx264 @ 0x191ce5a0] Weighted P-Frames: Y:1.9% UV:0.4%
    [libx264 @ 0x191ce5a0] ref P L0: 62.2% 12.8% 10.3% 14.5%  0.2%
    [libx264 @ 0x191ce5a0] ref B L0: 88.1%  5.5%  6.4%
    [libx264 @ 0x191ce5a0] ref B L1: 95.7%  4.3%
    [libx264 @ 0x191ce5a0] kb/s:1209.03

    I know there is couple errors tough, but i dont know hot to fix it. Also i would be very thankfull if someone can help reduce video size but is not main problem video weights as original avi but sill.