Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (70)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • 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

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

  • AFTER PHP-FFMpeg not converting (error with ffmpeg)

    15 juin 2018, par Magurean Dan Sergiu

    I have installed ffmpeg server side with all the dependencies, updated it. And then installed PHP-FFMpeg with Composer. Tested that ffmpeg is instaled with a ssh conexion.

    root@host [/opt/ffmpeg]# ffmpeg
    ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
    configuration: --disable-yasm
    libavutil      55. 28.100 / 55. 28.100
    libavcodec     57. 51.100 / 57. 51.100
    libavformat    57. 46.100 / 57. 46.100
    libavdevice    57.  0.102 / 57.  0.102
    libavfilter     6. 51.100 /  6. 51.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]     outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    But when I try to convert a video file with a php script it throws me a very long error.
    PHP Code :

    <?PHP
    include($_SERVER['DOCUMENT_ROOT']."/vendors/install/vendor/autoload.php");
    $ffmpeg = FFMpeg\FFMpeg::create();
    $video = $ffmpeg->open($_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv');
    $video
          ->filters()
          ->synchronize();
    $format = new FFMpeg\Format\Video\X264();
    $format->on('progress', function ($video, $format, $percentage) {
       echo "$percentage % transcoded";});
    $video
         ->save($format,$_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4');
    ?>

    Error displayed :

    <b>Fatal error</b>:  Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutionFailureException' with message 'ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'' in /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100↵Stack trace:↵#0 /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner-&amp;gt;doExecutionFailure(''/usr/bin/ffmpe...')↵#1 / in <b>/home/user/working/vendors/install/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php</b> on line <b>168</b><br />↵"

    Then I have took the basic code displayed upwards and ran it directly through ssh.

    '/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'

    And this is the response I get :

    ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
     configuration: --disable-yasm
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 51.100 / 57. 51.100
     libavformat    57. 46.100 / 57. 46.100
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 51.100 /  6. 51.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, asf, from '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv':
     Metadata:
       SfOriginalFPS   : 299700
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
       title           : Wildlife in HD
       copyright       : © 2008 Microsoft Corporation
       IsVBR           : 0
       DeviceConformanceTemplate: AP@L3
     Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
       Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 192 kb/s
       Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
    Unknown encoder 'libx264'

    My question is what to do next ? I have wasted 3 days to make this work and this is the furthest I have come. How can I test if libx264 is installed corectly ? And if it is not installed corectly how cand I reinstal or make it work ?

    After a few modifications

    I have used an already installed ffmpeg, and removed a few commands (that were by default the same) and this time I used only the command line.

    The request

    '/home/user/working/vendors/install/ffmpeg-git-20160813-64bit-static/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-vcodec' 'libx264' '-c:a' 'aac' '-b:v' '1000k' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57b053ce14a12ljm8a/pass-57b053ce14ad3' '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4'

    The new result :

    ffmpeg version N-81328-gceab04f-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.1 (Debian 5.4.1-1) 20160803
     configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc-5
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 51.102 / 57. 51.102
     libavformat    57. 46.101 / 57. 46.101
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 51.100 /  6. 51.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, asf, from '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv':
     Metadata:
       SfOriginalFPS   : 299700
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
       title           : Wildlife in HD
       copyright       : © 2008 Microsoft Corporation
       IsVBR           : 0
       DeviceConformanceTemplate: AP@L3
     Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
       Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 192 kb/s
       Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
    -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
    [libx264 @ 0x442f5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x442f5c0] ratecontrol_init: can't open stats file
    Output #0, mp4, to '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4':
     Metadata:
       SfOriginalFPS   : 299700
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
       title           : Wildlife in HD
       copyright       : © 2008 Microsoft Corporation
       IsVBR           : 0
       DeviceConformanceTemplate: AP@L3
       Stream #0:0(eng): Unknown: none
       Metadata:
         start_time      : 0
         encoder         : Lavc57.51.102 libx264
       Stream #0:1(eng): Unknown: none
       Metadata:
         encoder         : Lavc57.51.102 aac
    Stream mapping:
     Stream #0:1 -> #0:0 (vc1 (native) -> h264 (libx264))
     Stream #0:0 -> #0:1 (wmav2 (native) -> aac (native))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
  • No accelerated colorspace conversion found from yuv420p to argb

    11 juillet, par Zac Chan

    I am a novice at ffmpeg and have recently taken over a code base built by a previous engineer. The FFmpeg code is on an app engine that will edit the videos when they are uploaded.

    &#xA;

    This code generated a title animation that will later be used as an overlay.

    &#xA;

    exports.generateTitleAnimation = function(metadata, destPath, options = {}) {&#xA;const peeqLogoPath = "/app/assets/peeq-logo.png";&#xA;const whiteBarMovPath = "/app/assets/whiteBar.mov";&#xA;const titleFontPath = "/app/assets/Sofia-Pro-Black.otf";&#xA;const dateStrFontPath = "/app/assets/Sofia-Pro-Medium.otf";&#xA;const outputDuration = 5.52;&#xA;const src01 = "color=c=white:s=1920x1080:duration=" &#x2B; outputDuration;&#xA;const src02 = "color=c=white@0.0:s=1920x1080:r=120:duration=" &#x2B; outputDuration;&#xA;&#xA;var dateStrXOffset = "(92";&#xA;var filterComplexStr = "[1]";&#xA;&#xA;if (metadata.title) {&#xA;    const title = metadata.title.toUpperCase();&#xA;    filterComplexStr &#x2B;= "drawtext=fontfile=" &#x2B; titleFontPath &#x2B; ":text=&#x27;" &#x2B; title &#x2B; "&#x27;:x=&#x27;floor(92*(min((t-1.75)^29,0)&#x2B;max((t-3.75)^29,0)&#x2B;1))&#x27;:y=622&#x2B;30&#x2B;2:fontsize=70:fontcolor=black:ft_load_flags=render,";&#xA;}&#xA;if (metadata.subTitle) {&#xA;    const subTitle = metadata.subTitle.toUpperCase();&#xA;    filterComplexStr &#x2B;= "drawtext=fontfile=" &#x2B; titleFontPath &#x2B; ":text=&#x27;" &#x2B; subTitle &#x2B; "&#x27;:x=&#x27;floor(92*(min((t-2.0)^29,0.0)&#x2B;max((t-3.8)^29,0.0)&#x2B;1.0))&#x27;:y=622&#x2B;184-20-60&#x2B;9:fontsize=46:fontcolor=black:ft_load_flags=render,";&#xA;&#xA;    dateStrXOffset &#x2B;= "&#x2B;30*" &#x2B; (subTitle.length &#x2B; 1);&#xA;}&#xA;if (metadata.dateStr) {&#xA;    filterComplexStr &#x2B;= "drawtext=fontfile=" &#x2B; dateStrFontPath &#x2B; ":text=&#x27;" &#x2B; metadata.dateStr &#x2B; "&#x27;:x=&#x27;floor(" &#x2B; dateStrXOffset &#x2B; ")*(min((t-2.0)^29,0.0)&#x2B;max((t-3.8)^29,0.0)&#x2B;1.0))&#x27;:y=622&#x2B;184-20-60&#x2B;9:fontsize=46:fontcolor=black:ft_load_flags=render,";&#xA;}&#xA;console.log("generateTitleAnimation generating")&#xA;filterComplexStr &#x2B;= "split=10[t01][t02][t03][t04][t05][t06][t07][t08][t09][t10];[t02]setpts=PTS&#x2B;0.0166/TB[d02];[t03]setpts=PTS&#x2B;0.033/TB[d03];[t04]setpts=PTS&#x2B;0.05/TB[d04];[t05]setpts=PTS&#x2B;0.0666/TB[d05];[t06]setpts=PTS&#x2B;0.083/TB[d06];[t07]setpts=PTS&#x2B;0.1/TB[d07];[t08]setpts=PTS&#x2B;0.1166/TB[d08];[t09]setpts=PTS&#x2B;0.133/TB[d09];[t10]setpts=PTS&#x2B;0.15/TB[d10];[d10][d09]blend=average,[d08]blend=darken,[d07]blend=average,[d06]blend=darken,[d05]blend=average,[d04]blend=darken,[d03]blend= average,[d02]blend=darken,[t01]blend=average,colorkey=white:0.2:0.0,perspective=y1=W*0.176327:y3=H&#x2B;W*0.176327[text01];[2][3]overlay=x=(W-w)*0.5:y=(H-h)*0.5:enable=&#x27;between(t,0,3.0)&#x27;[logo01];[logo01][text01]overlay[outv]";&#xA;&#xA;var args = ["-y", "-f", "lavfi", "-i", src01, "-f", "lavfi", "-i", src02, "-i", whiteBarMovPath, "-i", peeqLogoPath, "-filter_complex", filterComplexStr, "-vcodec", "qtrle", "-crf:v", "28", "-codec:a", "aac", "-ac", "2", "-ar", "44100", "-ab", "128k", "-map", "[outv]", destPath];&#xA;&#xA;//console.log("args", args);&#xA;return childProcess.spawn(&#x27;ffmpeg&#x27;, args).then((ffResult) => {&#xA;    return destPath;&#xA;}, (err) => {&#xA;    //console.error(new Error("generateTitleAnimation:" &#x2B; err));&#xA;    console.error(err);&#xA;    return Promise.reject(err);&#xA;});};&#xA;

    &#xA;

    destPath is a .mov file

    &#xA;

    Up till a few days ago, the backend started throwing up this error

    &#xA;

    stderr: &#x27;ffmpeg version 3.4.2-1~16.04.york0.2 Copyright (c) 2000-2018&#xA; the FFmpeg developers\n built with gcc 5.4.0 (Ubuntu 5.4.0-&#xA;6ubuntu1~16.04.9) 20160609\n configuration: --prefix=/usr --extra-&#xA;version=\&#x27;1~16.04.york0.2\&#x27; --toolchain=hardened --&#xA;libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --&#xA;enable-gpl --disable-stripping --enable-avresample --enable-avisynth --&#xA;enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --&#xA;enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --&#xA;enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-&#xA;libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-&#xA;libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --&#xA;enable-librubberband --enable-librsvg --enable-libshine --enable-&#xA;libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-&#xA;libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --&#xA;enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 -&#xA;-enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-&#xA;openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --&#xA;enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-&#xA;libopencv --enable-libx264 --enable-shared\n libavutil 55. 78.100 / 55.&#xA; 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 /&#xA; 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter &#xA;6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4.&#xA; 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54.&#xA; 7.100 / 54. 7.100\nInput #0, lavfi, from &#xA;\&#x27;color=c=white:s=1920x1080:duration=5.52\&#x27;:\n Duration: N/A, start: &#xA;0.000000, bitrate: N/A\n Stream #0:0: Video: rawvideo (I420 / &#xA;0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25&#xA; tbc\nInput #1, lavfi, from &#xA;\&#x27;color=c=white@0.0:s=1920x1080:r=120:duration=5.52\&#x27;:\n Duration: N/A,&#xA; start: 0.000000, bitrate: N/A\n Stream #1:0: Video: rawvideo (I420 /&#xA; 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 120 fps, 120 tbr,&#xA; 120 tbn, 120 tbc\nInput #2, mov,mp4,m4a,3gp,3g2,mj2, from &#xA;\&#x27;/app/assets/whiteBar.mov\&#x27;:\n Metadata:\n major_brand : qt \n &#xA;minor_version : 537199360\n compatible_brands: qt \n creation_time : &#xA;2018-04-27T15:55:18.000000Z\n Duration: 00:00:05.52, start: 0.000000, &#xA;bitrate: 54847 kb/s\n Stream #2:0(eng): Video: qtrle (rle / &#xA;0x20656C72), bgra(progressive), 1920x1080, 53326 kb/s, SAR 1:1 DAR 16:9, 60 &#xA;fps, 60 tbr, 60 tbn, 60 tbc (default)\n Metadata:\n creation_time : &#xA;2018-04-27T15:55:18.000000Z\n handler_name : Apple Alias Data Handler\n&#xA; encoder : Animation\n timecode : 00:00:00:00\n Stream #2:1(eng): Data:&#xA; none (tmcd / 0x64636D74), 0 kb/s (default)\n Metadata:\n creation_time&#xA; : 2018-04-27T15:55:18.000000Z\n handler_name : Apple Alias Data&#xA; Handler\n timecode : 00:00:00:00\nInput #3, png_pipe, from &#xA;\&#x27;/app/assets/peeq-logo.png\&#x27;:\n Duration: N/A, bitrate: N/A\n Stream &#xA;#3:0: Video: png, rgba(pc), 452x207 [SAR 2834:2834 DAR 452:207], 25 &#xA;tbr, 25 tbn, 25 tbc\nCodec AVOption crf (Select the quality for &#xA;constant quality mode) specified for output file #0 (/tmp/972967.mov) &#xA;has not been used for any stream. The most likely reason is either &#xA;wrong type (e.g. a video option with no video streams) or that it is a &#xA;private option of some encoder which was not actually used for any &#xA;stream.\nCodec AVOption b (set bitrate (in bits/s)) specified for &#xA;output file #0 (/tmp/972967.mov) has not been used for any stream. The &#xA;most likely reason is either wrong type (e.g. a video option with no &#xA;video streams) or that it is a private option of some encoder which was &#xA;not actually used for any stream.\nStream mapping:\n Stream #1:0 &#xA;(rawvideo) -> drawtext\n Stream #2:0 (qtrle) -> overlay:main\n Stream &#xA;#3:0 (png) -> overlay:overlay\n overlay -> Stream #0:0 (qtrle)\nPress &#xA;[q] to stop, [?] for help\n[swscaler @ 0x56080b828180] No accelerated &#xA;colorspace conversion found from yuv420p to argb.\n[swscaler @ &#xA;0x56080b8b5f40] No accelerated colorspace conversion found from yuva420p to argb.\n&#x27;,&#xA;

    &#xA;

    However, this error only occurs on the app engine. Running nom test on my Mac generates the title perfectly.

    &#xA;

  • FFmpeg error : Output file is empty, nothing was encoded

    25 mai 2018, par Morteza M

    I am using the following command ffmpeg command and execute it in Python. It used to work for at least a month finely. However, its two days it stopped working and generates different errors. The most important one is "Output file is empty, nothing was encoded"

    PS : I checked the connectivity to Camera and is healthy. I am able to see the Camera output on my screen using its software.

    The Command :

    ffmpeg -i rtsp ://username:pass@ip_add:port/videoMain -b 1920k -f image2 -r fps -strftime 1 %Y-%m-%d_%H-%M-%S.jpg

    PS : fps is taken from input. I mainly used 1 for that.

    I would be gratfful if anyone can help with this. Thank you.