Advanced search

Medias (9)

Tag: - Tags -/soundtrack

Other articles (74)

  • Problèmes fréquents

    10 March 2010, by

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 February 2011, by

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 February 2011, by

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

On other websites (12022)

  • ffmpeg conversion using libx264 looks terrible - interlaced

    17 June 2016, by justin

    I’m in the process of converting some files from my set-top box (.ASF) format to something more portable that will work with plex and roku more readily. In doing so I’m using ffmpeg, but having unsatisfying results. Whereas the original doesn’t have ANY notable interlacing defects, the converted file does. I think it has something to do with the libx264 converter because of the following experiment:

    Running this command:

    ffmpeg -i file.asf -vcodec copy -acodec copy -bsf:a aac_adtstoasc -ss 150 -t 15 short.mp4

    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 7.3.0 (clang-703.0.29)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-vda
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [asf @ 0x7f9f84000000] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, asf, from 'file.asf':
     Metadata:
       title           : Slingbox
       artist          : Sling Media
       comment         : test
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (High) (h264 / 0x34363268), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 30.30 fps, 30 tbr, 1k tbn, 59.94 tbc
       Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 32000 Hz, stereo, fltp, 96 kb/s
       Stream #0:2: Unknown: none
    File 'short.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'short.mp4':
     Metadata:
       title           : Slingbox
       artist          : Sling Media
       comment         : test
       encoder         : Lavf57.25.100
       Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30.30 fps, 30 tbr, 16k tbn, 1k tbc
       Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 32000 Hz, stereo, 96 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 0x7f9f8388c200] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 0x7f9f8388c200] pts has no value
       Last message repeated 449 times
    frame=  450 fps=0.0 q=-1.0 Lsize=    9002kB time=00:00:15.02 bitrate=4907.9kbits/s speed=92.1x    
    video:8817kB audio:173kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.125406%

    Which produces a file which has no interlacing artifact and appears to be same exact file size as the original (if run without the -ss and -t commands).

    But running this command (without any options):

    ffmpeg -i test.asf -ss 150 -t 15 short2.mp4

    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 7.3.0 (clang-703.0.29)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-vda
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [asf @ 0x7fec32801400] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, asf, from 'test.asf':
     Metadata:
       title           : Slingbox
       artist          : Sling Media
       comment         : test
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0: Video: h264 (High) (h264 / 0x34363268), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 30.30 fps, 30 tbr, 1k tbn, 59.94 tbc
       Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 32000 Hz, stereo, fltp, 96 kb/s
       Stream #0:2: Unknown: none
    [libx264 @ 0x7fec32102800] using SAR=1/1
    [libx264 @ 0x7fec32102800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fec32102800] profile High, level 4.0
    [libx264 @ 0x7fec32102800] 264 - core 148 r2668 fd2c324 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - - 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=12 lookahead_threads=2 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 'short2.mp4':
     Metadata:
       title           : Slingbox
       artist          : Sling Media
       comment         : test
       encoder         : Lavf57.25.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.24.102 libx264
       Side data:
         unknown side data type 10 (24 bytes)
       Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 32000 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc57.24.102 aac
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    frame=  450 fps= 20 q=-1.0 Lsize=    6732kB time=00:00:15.00 bitrate=3674.9kbits/s speed=0.657x    
    video:6481kB audio:240kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.168370%
    [libx264 @ 0x7fec32102800] frame I:12    Avg QP:18.85  size: 39804
    [libx264 @ 0x7fec32102800] frame P:291   Avg QP:21.40  size: 17543
    [libx264 @ 0x7fec32102800] frame B:147   Avg QP:22.61  size:  7167
    [libx264 @ 0x7fec32102800] consecutive B-frames: 42.9% 36.9% 11.3%  8.9%
    [libx264 @ 0x7fec32102800] mb I  I16..4: 43.2% 52.0%  4.8%
    [libx264 @ 0x7fec32102800] mb P  I16..4: 11.9% 16.0%  1.0%  P16..4: 30.2%  3.0%  1.7%  0.0%  0.0%    skip:36.2%
    [libx264 @ 0x7fec32102800] mb B  I16..4:  0.6%  0.9%  0.1%  B16..8: 25.7%  1.4%  0.2%  direct: 4.6%  skip:66.6%  L0:49.0% L1:49.4% BI: 1.6%
    [libx264 @ 0x7fec32102800] 8x8 transform intra:55.1% inter:92.0%
    [libx264 @ 0x7fec32102800] coded y,uvDC,uvAC intra: 22.5% 38.6% 6.6% inter: 6.5% 17.3% 0.5%
    [libx264 @ 0x7fec32102800] i16 v,h,dc,p: 28% 47%  8% 17%
    [libx264 @ 0x7fec32102800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 15% 42%  1%  1%  2%  1%  2%  1%
    [libx264 @ 0x7fec32102800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 78%  6%  1%  1%  1%  1%  1%  1%
    [libx264 @ 0x7fec32102800] i8c dc,h,v,p: 59% 19% 19%  3%
    [libx264 @ 0x7fec32102800] Weighted P-Frames: Y:14.4% UV:3.8%
    [libx264 @ 0x7fec32102800] ref P L0: 65.5%  6.6% 19.0%  8.4%  0.4%
    [libx264 @ 0x7fec32102800] ref B L0: 89.6%  8.9%  1.5%
    [libx264 @ 0x7fec32102800] ref B L1: 98.6%  1.4%
    [libx264 @ 0x7fec32102800] kb/s:3539.34
    [aac @ 0x7fec32103a00] Qavg: 573.580

    Produces a file which has quite a bit of interlacing defect when playing on my HD projector thru Roku via Plex (direct play enabled, apparently no transcoding).

    still frame from second transcode showing visual defect

    Lest I be overly picky, I engaged my wife in this test, showing her the two files and she agreed that the one that used libx264 was significantly worse and unwatchable. Can’t figure out how to shrink this file down without causing these interlacing defects — it happens even when I don’t try to shrink it! Any thoughts?

    Video files:

    https://dl.dropboxusercontent.com/u/23091/m1/short.mp4
    https://dl.dropboxusercontent.com/u/23091/m1/short2.mp4

    Update: Additionally, I tried a few settings to generate a MPEG4 (.AVI) file and had similar lack of success. Similar interlacing defects.

  • php ffmpeg flv conversion error

    8 July 2013, by arjun

    I am trying to convert mp4 file to flv but i am getting 0 size flv files,

    can you please help me out on this

    array(45)  [0]=string(72) "FFmpeg version SVN-r26402, Copyright (c)
    2000-2011 the FFmpeg developers" [1]=string(74) " built on Jan 12
    2012 16:07:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)" [2]=>
    string(98) " configuration: —enable-libmp3lame —enable-gpl
    
    — enable-libvorbis —disable-mmx —enable-shared" [3]=string(35) " libavutil 50.36. 0 / 50.36. 0" [4]=string(35) " libavcore 0.16. 1 / 0.16. 1" [5]=string(37) " libavcodec 52.108. 0 / 52.108. 0" [6]=string(35) " libavformat 52.93. 0 / 52.93. 0" [7]=string(35) " libavdevice 52. 2. 3 / 52. 2. 3" [8]=string(35) " libavfilter 1.74. 0 / 1.74. 0" [9]=string(35) " libswscale 0.12. 0 / 0.12. 0" [10]=> string(0) "" [11]=string(101) "Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -15.00 (15/1)" [12]=string(106) "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '16112007069.mp4':" [13]=string(11) " Metadata:" [14]=string(26) " major_brand : mp42" [15]=string(23) " minor_version : 0" [16]=string(35) " compatible_brands: mp423gp4isom" [17]=string(41) " creation_time : 2007-11-16 15:44:57" [18]=string(59) " Duration: 00:00:32.64, start: 0.000000, bitrate: 562 kb/s" [19]=string(115) " Stream #0.0(und): Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 512 kb/s, 15 fps, 15 tbr, 30k tbn, 30k tbc" [20]=string(13) " Metadata:" [21]=> string(43) " creation_time : 2007-11-16 15:44:57" [22]=string(62) " Stream #0.1(und): Audio: aac, 16000 Hz, mono, s16, 48 kb/s" [23]=> string(13) " Metadata:" [24]=string(43) " creation_time : 2007-11-16 15:44:58" [25]=string(87) "WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s" [26]=string(47) "[buffer @ 0x94a9de0] w:352 h:288 pixfmt:yuv420p" [27]=string(98) "[libmp3lame @ 0x94a9560] flv does not support that sample rate, choose from (44100, 22050, 11025)." [28]=string(85) "Output #0, flv, to '16112007069.flv':" [29]=string(11) " Metadata:" [30]=string(26) " major_brand : mp42" [31]=string(23) " minor_version : 0" [32]=string(35) " compatible_brands: mp423gp4isom" [33]=string(41) " creation_time : 2007-11-16 15:44:57" [34]=string(33) " encoder : Lavf52.93.0" [35]=> string(103) " Stream #0.0(und): Video: flv, yuv420p, 352x288 [PAR 1:1 DAR 11:9], q=2-31, 200 kb/s, 1k tbn, 15 tbc" [36]=string(13) " Metadata:" [37]=string(43) " creation_time : 2007-11-16 15:44:57" [38]=string(68) " Stream #0.1(und): Audio: libmp3lame, 16000 Hz, mono, s16, 0 kb/s" [39]=string(13) " Metadata:" [40]=string(43) " creation_time : 2007-11-16 15:44:58" [41]=string(15) "Stream mapping:" [42]=string(21) " Stream #0.0 -#0.0" [43]=string(21) " Stream #0.1 -#0.1" [44]=string(72) "Could not write header for output file #0 (incorrect codec parameters ?)"
     

    ffmpeg: /usr/local/bin/ffmpeg file

    path: 16112007069.mp4

    srcAR: 16000

    srcAB:48

    dimention: 352 x 288 destFile: 16112007069.flv

    coding part: :)

    $srcFile = "/file destination/16112007069.mp4";  
    $destFile = "/file destination/16112007069.flv";
    $ffmpegPath = "/usr/local/bin/ffmpeg";

    $ffmpegObj = new ffmpeg_movie($srcFile);

    $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());  
    $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
    $srcFPS = $ffmpegObj->getFrameRate();  
    $srcAB = intval($ffmpegObj->getAudioBitRate());  
    $srcAR => $ffmpegObj->getAudioSampleRate();  

    exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . " 2>&1", $output);

    var_dump($output);

    print "<br />ffmpeg: $ffmpegPath<br />"; print "file path: $srcFile<br />"; print "srcAR: $srcAR<br />"; print "srcAB: $srcAB<br />"; print
    "dimention: $srcWidth x $srcHeight<br />"; print "destFile:
    $destFile<br />";


    function makeMultipleTwo ($value)  {
       $sType = gettype($value/2);
       if($sType == "integer")
       {
           return $value;
       } else {
           return ($value-1);
       }  
    }

    Note I added:

    if($srcAR&lt;41000){ $srcAR = "41000"; }

    Above and its working!

  • Compiling tutorial programs on FFMPEG

    29 January 2012, by iwant2learn

    How do i compile the sample programs given in FFMPEG. i am not able to compile as i get
    error as CODEC_TYPE_VIDEO undeclared. Can any one please suggest me how to compile the programs. I am using ubuntu 11.

    This is the first example:

    $ gcc -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz

    This is the output I got:

    tutorial01.c: In function ‘main’: tutorial01.c:77:3: warning: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1462)
    tutorial01.c:82:51: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    tutorial01.c:82:51: note: each undeclared identifier is reported only once for each function it appears in

    Version info:

    ffmpeg version git-N-30430-ga52f598, Copyright (c) 2000-2011 the FFmpeg developers
     built on May 31 2011 14:21:08 with gcc 4.5.2
     configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
     libavutil    51.  3. 0 / 51.  3. 0
     libavcodec   53.  6. 1 / 53.  6. 1
     libavformat  53.  2. 0 / 53.  2. 0
     libavdevice  53.  1. 0 / 53.  1. 0
     libavfilter   2. 11. 0 /  2. 11. 0
     libswscale    0. 14. 0 /  0. 14. 0
     libpostproc  51.  2. 0 / 51.  2. 0