Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (54)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (5220)

  • Create thumbnail from video using ffmpeg

    27 novembre 2014, par hitesh

    I need to create a thumbnail from video while uploading it to CDN.

    I have been searching for this found this but I am not able to get the screen shot even after following steps.

    I am using jwplayer for playing video

    Can someone help me to create thumbnail while uploading video using ffmpeg

  • php ffmpeg flv conversion error

    8 juillet 2013, par 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 !

  • OpenCV Reporting TBR instead of FPS when using capture.get(CV_CAP_PROP_FPS)

    22 février 2012, par Malife

    I have several videos that I am trying to process using OpenCV and Qt 4.7.4 on Mac OS 10.6.8 (Snow Leopard). If I create a cv::VideoCapture object and then query for the frame rate related to such video, what I get back is the TBR and not FPS.

    For instance if use ffprobe Video1.mp4 what I get is :

    >> ffprobe Video1.mp4      
    ffprobe version 0.7.8, Copyright (c) 2007-2011 the FFmpeg developers
    built on Nov 24 2011 14:31:00 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
    configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --  
    enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-
    libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264
    --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --
    enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
    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

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#39;Video1.mp4&#39;:
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1qt  
    creation_time   : 2012-01-09 23:09:43
    encoder         : vlc 1.1.3 stream output
    encoder-eng     : vlc 1.1.3 stream output
    Duration: 00:10:10.22, start: 0.000000, bitrate: 800 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuvj420p, 704x480 [PAR 10:11 DAR 4:3], 798
    kb/s, 27.71 fps, 1001 tbr, 1001 tbn, 2002 tbc
    Metadata:
     creation_time   : 2012-01-09 23:09:43

    Which correctly reports FPS = 27.71 and TBR = 1001. Nevertheless if I use the following OpenCV code to query for the FPS :

    QString filename = QFileDialog::getOpenFileName(this,
                                           "Open Video",
                                           "Video Files (*.mp4, *.mpg)");

    capture.release();
    capture.open(filename.toAscii().data());

    if (!capture.isOpened()){
       qDebug() &lt;&lt;"Error when opening the video!";
       return;
    }


    qDebug() &lt;&lt; "Frame Rate:" &lt;&lt; capture.get(CV_CAP_PROP_FPS);
    qDebug() &lt;&lt; "Num of Frames:" &lt;&lt; capture.get(CV_CAP_PROP_FRAME_COUNT);
    qDebug() &lt;&lt; "OpenCV Version" &lt;&lt; CV_VERSION;

    The output I get is :

    Frame Rate: 1001
    Num of Frames: 610832
    OpenCV Version 2.3.1

    Which reports the TBR instead of the FPS. This behavior is consistent when I try to open different videos.

    I checked OpenCV's bug tracker and I also found this stack overflow question to be a similar but not quite the same problem, so I am at a loss to what to do next. Any hint or idea is most welcome since I've tried lots of things and seem to be getting nowhere.