Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (75)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (8946)

  • What causes Firefox to refuse playing one specific MP4 that plays well on other browsers, resolution being the only difference ?

    3 décembre 2014, par Faro

    I’m a developer for a PHP powered website that allows the upload of videos which get converted to MP4 using ffmpeg. This setup worked pretty well so far, however today I came across a report of a user that couldn’t play one of the files in Firefox.

    I was unable to replicate the issue on my own machine at first, but using a fresh install of Windows 7 I actually got the same issue : The file will not play in Firefox, but works fine in Chrome. If called up directly, Firefox will say "Video can’t be played because the file is corrupt".
    When downloaded, Windows will also not create a thumbnail of the video for the file and WMP will only play the audio part.

    On my own machine the file works perfectly in WMP which made me wonder if it could be a codec issue (I do have the K-Lite Codec Pack installed), however I’ve compared the file to a working one and the only difference is the resolution, filesize and the format profile which is "High@L3.1" for a working file with a 720p resolution and "High@L4.0" for the non-working one (which is 1600x1200).

    I then read through the Wikipedia article on H.264/MPEG-4 AVC and began to wonder if the level might be the issue, and the tool I used (XMedia Recode) actually did not allow me to set a height bigger than 1080 on Level 4, however when I set the level to 5 and encoded the file again, it still wouldn’t play.

    I did find a note on the MDN page of supported formats which reads :

    Firefox/Firefox for Android/Firefox OS supports the format in some cases, but only when a third-party decoder is available, and the device hardware can handle the profile used to encode the MP4.

    I’m assuming that is why the codec pack would allow Firefox to play even the ’broken’ file on my machine, I still don’t understand though why Firefox does play some files but not this one, especially when Chrome on the same machine plays all of them.

    The line in PHP that starts the conversion is as follows :

    exec("/usr/local/bin/ffmpeg '-i' '" . $file_in . "' '-qscale' '4' '-y' '-threads' '1' '-acodec' 'libvo_aacenc' '-vcodec' 'h264' '" . $file_out . "' 2>&1", $buffer, $success);

    This should produce correct files, and this is indeed the first time a file has issues.

    MediaInfo provides this data for the file stream :

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.0
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 12mn 26s
    Bit rate                                 : 77.7 Kbps
    Width                                    : 1 600 pixels
    Height                                   : 1 200 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 30.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.001
    Stream size                              : 6.92 MiB (36%)
    Writing library                          : x264 core 142 r14 956c8d8
    Encoding settings                        : 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=-2 / threads=1 / 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=25 / 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
    Language                                 : English

    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 12mn 26s
    Duration_LastFrame                       : -10ms
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 11.4 MiB (60%)
    Language                                 : English

    I’ve uploaded a zip with 3 versions of the file, the untouched one, the converted one with the same settings the website would use, and another converted one with level 5.

    Maybe I’m missing something obvious, but I couldn’t find anything wrong with it, what do I need to change in order to produce a file that will work natively in Firefox ?

    Also, this is my first question on SO, so if you see anything that I can improve, please let me know :-)

    Edit : This is the output of calling ffmpeg (with the faststart option)

    /usr/local/bin/ffmpeg '-i' '49cf594e91d0dac376aa0b2b96972ded.mp4' '-movflags' '+faststart' '-qscale' '4' '-y' '-threads' '1' '-acodec' 'libvo_aacenc' '-vcodec' 'h264' 'test.mp4'

    ffmpeg version 1.2.5-   http://johnvansickle.com/ffmpeg/    Copyright (c) 2000-2014 the FFmpeg developers
     built on Jan 22 2014 20:28:02 with gcc 4.8 (Debian 4.8.2-14)
     configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver
     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
     libpostproc    52.  2.100 / 52.  2.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '49cf594e91d0dac376aa0b2b96972ded.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf54.63.104
     Duration: 00:12:26.37, start: 0.036281, bitrate: 214 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1600x1200 [SAR 1:1 DAR 4:3], 77 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         handler_name    : SoundHandler
    Please use -q:a or -q:v, -qscale is ambiguous
    [libx264 @ 0x2802ac0] using SAR=1/1
    [libx264 @ 0x2802ac0] using cpu capabilities: MMX2 SSE2Fast LZCNT
    [libx264 @ 0x2802ac0] profile High, level 4.0
    [libx264 @ 0x2802ac0] 264 - core 142 r14 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=-2 threads=1 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=25 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:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf54.63.104
       Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1600x1200 [SAR 1:1 DAR 4:3], q=-1--1, 15360 tbn, 30 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
     Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Press [q] to stop, [?] for help
    Starting second pass: moving header on top of the file30.77 bitrate= 202.5kbits/s dup=1 drop=0
    frame=15331 fps= 13 q=29.0 Lsize=   13201kB time=00:08:31.03 bitrate= 211.6kbits/s dup=1 drop=0
    video:4673kB audio:7986kB subtitle:0 global headers:0kB muxing overhead 4.286767%
    [libx264 @ 0x2802ac0] frame I:63    Avg QP:12.37  size: 39759
    [libx264 @ 0x2802ac0] frame P:3905  Avg QP:20.36  size:   313
    [libx264 @ 0x2802ac0] frame B:11363 Avg QP:33.67  size:    93
    [libx264 @ 0x2802ac0] consecutive B-frames:  1.1%  0.1%  0.2% 98.6%
    [libx264 @ 0x2802ac0] mb I  I16..4: 48.0% 41.5% 10.5%
    [libx264 @ 0x2802ac0] mb P  I16..4:  0.1%  0.2%  0.0%  P16..4:  0.5%  0.0%  0.0%  0.0%  0.0%    skip:99.1%
    [libx264 @ 0x2802ac0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.3%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0:50.2% L1:48.9% BI: 0.8%
    [libx264 @ 0x2802ac0] 8x8 transform intra:42.4% inter:36.9%
    [libx264 @ 0x2802ac0] coded y,uvDC,uvAC intra: 6.9% 13.4% 9.4% inter: 0.0% 0.1% 0.0%
    [libx264 @ 0x2802ac0] i16 v,h,dc,p: 82% 17%  1%  0%
    [libx264 @ 0x2802ac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 20% 49%  0%  0%  0%  0%  0%  0%
    [libx264 @ 0x2802ac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 20% 18%  3%  4%  4%  4%  4%  3%
    [libx264 @ 0x2802ac0] i8c dc,h,v,p: 80% 12%  7%  1%
    [libx264 @ 0x2802ac0] Weighted P-Frames: Y:0.3% UV:0.3%
    [libx264 @ 0x2802ac0] ref P L0: 74.7%  3.8% 10.6% 10.9%  0.0%
    [libx264 @ 0x2802ac0] ref B L0: 70.3% 28.9%  0.8%
    [libx264 @ 0x2802ac0] ref B L1: 97.9%  2.1%
    [libx264 @ 0x2802ac0] kb/s:74.90
  • FFMPEG x264 MP4 Encoding all grey

    7 mars 2013, par Brianjs

    I am currently using FFMPEG v1.1 on CentOS 6.3.

    I configured FFMPEG with :

    ./configure --arch=x86_64  --enable-libmp3lame  --enable-librtmp  --enable-libtheora --enable-libvorbis  --enable-libx264 --enable-pthreads --enable-gpl --enable-runtime-cpudetect

    when I run a simple command to record live input to MP4 by :

    ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 /home/irdb/Desktop/test.mp4

    I get nothing, just a grey screen with some artifacts around the edges. However when I run the same command as .MPG it comes out fine. I need it in MP4 format however.

    On a side note I am running x264-0.120 installed through yum

    My question is, is there a problem with the way I compiled ffmpeg ? Or is it possibly something else ?

    edit :

    Output from example as requested :

    # ffmpeg -f video4linux2 -s 640x480 -t 5 -i /dev/video0 -strict 2 /home/irdb/Desktop/test.mp4
    ffmpeg version N-50546-g1f5b5b8 Copyright (c) 2000-2013 the FFmpeg developers
    built on Mar  7 2013 00:17:44 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
    configuration: --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-   libvorbis --enable-libx264 --enable-pthreads --enable-gpl --enable-runtime-cpudetect
    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
    libpostproc    52.  2.100 / 52.  2.100
    [video4linux2,v4l2 @ 0x3025120] Estimating duration from bitrate, this may be   inaccurate
    Input #0, video4linux2,v4l2, from '/dev/video0':
    Duration: N/A, start: 128.640356, bitrate: 147456 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
    [libx264 @ 0x3026f80] using cpu capabilities: MMX2 SSE2Fast SSEMisalign LZCNT
    [libx264 @ 0x3026f80] profile High 4:2:2, level 3.0, 4:2:2 8-bit
    [libx264 @ 0x3026f80] 264 - core 130 r2274 c832fe9 - 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=-2 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=25 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 '/home/irdb/Desktop/test.mp4':
    Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 15360 tbn, 30 tbc
    Stream mapping:
    Stream #0:0 -> #0:0 (rawvideo -> libx264)
    Press [q] to stop, [?] for help
    frame=   32 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=21    drframe=   46 fps= 46 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=28 drframe=    62 fps= 41 q=29.0 size=      71kB time=00:00:00.33 bitrate=1735.2kbits/frame=   76 fps=  38 q=29.0 size=     169kB time=00:00:00.80 bitrate=1731.2kbits/frame=   93 fps= 37  q=29.0 size=     311kB time=00:00:01.36 bitrate=1862.3kbits/frame=  107 fps= 35 q=29.0  size=     423kB time=00:00:01.83 bitrate=1891.0kbits/frame=  123 fps= 35 q=29.0 size=      537kB time=00:00:02.36 bitrate=1860.2kbits/frame=  139 fps= 34 q=29.0 size=     664kB  time=00:00:02.90 bitrate=1876.0kbits/frame=  150 fps= 29 q=-1.0 Lsize=    1174kB  time=00:00:04.93 bitrate=1948.7kbits/s dup=81 drop=0    
    video:1172kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.133409%
    [libx264 @ 0x3026f80] frame I:2     Avg QP:23.22  size: 28460
    [libx264 @ 0x3026f80] frame P:136   Avg QP:24.45  size:  8397
    [libx264 @ 0x3026f80] frame B:12    Avg QP:26.18  size:    42
    [libx264 @ 0x3026f80] consecutive B-frames: 88.0%  4.0%  0.0%  8.0%
    [libx264 @ 0x3026f80] mb I  I16..4: 47.1% 28.8% 24.1%
    [libx264 @ 0x3026f80] mb P  I16..4:  4.3%  1.9%  1.2%  P16..4: 29.0% 11.4%  9.2%      0.0%  0.0%    skip:43.0%
    [libx264 @ 0x3026f80] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.5%  0.0%  0.0%   direct: 0.0%  skip:98.5%  L0:16.5% L1:83.5% BI: 0.0%
    [libx264 @ 0x3026f80] 8x8 transform intra:26.4% inter:30.7%
    [libx264 @ 0x3026f80] coded y,uvDC,uvAC intra: 85.2% 95.6% 83.5% inter: 10.9% 38.6% 24.0%
    [libx264 @ 0x3026f80] i16 v,h,dc,p: 33% 19% 40%  8%
    [libx264 @ 0x3026f80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6% 12% 55%  5%  3%  4%  4%  3%  8%
    [libx264 @ 0x3026f80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15%  9% 63%  3%  2%  2%  2%  2%  2%
    [libx264 @ 0x3026f80] i8c dc,h,v,p: 66% 11% 14%  9%
    [libx264 @ 0x3026f80] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x3026f80] ref P L0: 56.6%  7.5%  8.1% 27.8%
    [libx264 @ 0x3026f80] ref B L0: 83.3% 16.7%
    [libx264 @ 0x3026f80] ref B L1: 90.7%  9.3%
    [libx264 @ 0x3026f80] kb/s:1918.95
  • Setting B frames in a video with ffmpeg

    30 juin 2013, par Robert Cantarutti

    According to ffmpeg manual, setting -g is to define space between "I" frames, and setting -bf to use "B" frames. The former I got, but the latter not.

    The goal : I'm trying to have a video with a GOP 3,12 (M= 3, N=12).
    That means : 2 "B" frames separating each "P" frames, and "I" frames with 12 frames of distance. Or simply : "IBBPBBPBBPBBI"

    I think that I got only the N=12, using the commands below :

    1. ffmpeg -s cif -r 30 -b 64000 -bt 3200 -g 12 -y -i video.yuv -vcodec mpeg4 video.m4v
    2. MP4Box -hint -mtu 1460 -fps 30 -add video.m4v video.mp4
    3. ffmpeg -y -i video.mp4 video_ref.yuv
    4. ../cmd/psnr 352 288 420 video.yuv video_ref.yuv > psnr_ref.txt
    5. ../cmd/mp4trace -f -s 192.168.0.2 12346 video.mp4 > trace
    6. head -n 20 trace

    Result :

    [robert@10-2Fontes]$ head -n 20 trace
    1   H   12002   9   0.000
    2   P   11479   8   0.034
    3   P   12021   9   0.066
    4   P   11239   8   0.099
    5   P   5407    4   0.134
    6   P   2735    2   0.166
    7   P   1014    1   0.199
    8   P   850 1   0.232
    9   P   619 1   0.265
    10  P   979 1   0.298
    11  P   813 1   0.331
    12  P   806 1   0.364
    13  H   5109    4   0.396

    *Note, the most important is the command -g 12 in ffmpeg, but I writing all the commands. The video that I'm using is the "highway", from cif page videos : http://www2.tkn.tu-berlin.de/research/evalvid/cif.html

    I don't know why the result trace is using "H" instead of "I".

    I tried to put -bf 2 in ffmpeg command, but did not worked (I think because I saw no "B" indications in the result)

    List item

    ffmpeg -s cif -r 30 -b 64000 -bt 3200 -g 12 -bf 2 -y -i video.yuv -vcodec mpeg4 video.m4v

    Result :

    [robert@10-2Fontes]$ head -n 20 trace
    1   H   12002   9   0.001
    2   P   11479   8   0.034
    3   P   12021   9   0.067
    4   P   11239   8   0.100
    5   P   5407    4   0.132
    6   P   2735    2   0.166
    7   P   1014    1   0.199
    8   P   850 1   0.232
    9   P   619 1   0.265
    10  P   979 1   0.298
    11  P   813 1   0.331
    12  P   806 1   0.363
    13  H   5109    4   0.400