Recherche avancée

Médias (91)

Autres articles (28)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (6325)

  • How to Show result after uploaded file in PHP

    23 avril 2022, par i0x4r

    I have a script that uploads the video to a server, everything is correct but there is a problem, after the upload of the video to the server is completed
it shows all the uploaded files in the (uploads) folder as array !

    


    I only want the result of the file I just uploaded, and it doesn't show me the previous files !
I need ffmpeg to improve video quality

    


    index.php

    


    &lt;?php&#xA;//index.php&#xA;&#xA;?>&#xA;&#xA;&#xA; &#xA;  &#xA;  &#xA;  <code class="echappe-js">&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js&quot;&gt;&lt;/script&gt;&#xA;        &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;        &#xA;  &#xA;  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.js&quot;&gt;&lt;/script&gt;&#xA;  &#xA; &#xA; &#xA;  
    &#xA;&#xA;
    &#xA;&#xA;

    &#xA; &#xA; &#xA; &#xA;
    &#xA;&#xA;

    &#xA;&#xA;
    &#xA;

    &#xA; &#xA;&#xA;&#xA;&lt;script&gt;&amp;#xA;&amp;#xA;$(document).ready(function(){&amp;#xA; &amp;#xA; Dropzone.options.dropzoneFrom = {&amp;#xA;  autoProcessQueue: true,&amp;#xA;  timeout: 300000,&amp;#xA;  acceptedFiles:&quot;video/*&quot;,&amp;#xA;  init: function(){&amp;#xA;   var submitButton = document.querySelector(&amp;#x27;#submit-all&amp;#x27;);&amp;#xA;   myDropzone = this;&amp;#xA;   submitButton.addEventListener(&quot;click&quot;, function(){&amp;#xA;    myDropzone.processQueue();&amp;#xA;   });&amp;#xA;   this.on(&quot;complete&quot;, function(){&amp;#xA;    if(this.getQueuedFiles().length == 0 &amp;amp;&amp;amp; this.getUploadingFiles().length == 0)&amp;#xA;    {&amp;#xA;     var _this = this;&amp;#xA;     _this.removeAllFiles();&amp;#xA;    }&amp;#xA;    list_image();&amp;#xA;   });&amp;#xA;  },&amp;#xA; };&amp;#xA;&amp;#xA; list_image();&amp;#xA;&amp;#xA; function list_image()&amp;#xA; {&amp;#xA;  $.ajax({&amp;#xA;   url:&quot;upload.php&quot;,&amp;#xA;   success:function(data){&amp;#xA;    $(&quot;#preview&quot;).html(data);&amp;#xA;   }&amp;#xA;  });&amp;#xA; }&amp;#xA;&amp;#xA; $(document).on(&amp;#x27;click&amp;#x27;, &amp;#x27;.remove_image&amp;#x27;, function(){&amp;#xA;  var name = $(this).attr(&amp;#x27;id&amp;#x27;);&amp;#xA;  $.ajax({&amp;#xA;   url:&quot;upload.php&quot;,&amp;#xA;   method:&quot;POST&quot;,&amp;#xA;   data:{name:name},&amp;#xA;   success:function(data)&amp;#xA;   {&amp;#xA;    list_image();&amp;#xA;   }&amp;#xA;  })&amp;#xA; });&amp;#xA; &amp;#xA;});&amp;#xA;&lt;/script&gt;&#xA;

    &#xA;

    upload.php

    &#xA;

        &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;if(isset($_POST["name"]))&#xA;{&#xA; $filename = $folder_name.$_POST["name"];&#xA; $imagename = $thumb_name.$_POST["name"].$imageext;&#xA; unlink($filename);&#xA; unlink($imagename);&#xA;}&#xA;&#xA;$result = array();&#xA;&#xA;$files = scandir(&#x27;upload&#x27;);&#xA;&#xA;$output = &#x27;<div class="row">&#x27;;&#xA;&#xA;if(false !== $files)&#xA;{&#xA; foreach($files as $file)&#xA; {&#xA;  if(&#x27;.&#x27; !=  $file &amp;&amp; &#x27;..&#x27; != $file)&#xA;  {&#xA;   $output .= &#x27;&#xA;   <a href="http://stackoverflow.com/view.php?file=&#38;#x27;.$file.&#38;#x27;" target="_blank"> <img src="http://stackoverflow.com/feeds/tag/thumb/&#38;#x27;.$file.&#38;#x27;.png" class="img-thumbnail" width='246' height='138' /></a>&#xA;    <button type="button" class="btn btn-link remove_image">Remove</button>&#xA;   &#x27;;&#xA;  }&#xA; }&#xA;}&#xA;$output .= &#x27;</div>&#x27;;&#xA;echo $output;&#xA;&#xA;?>&#xA;

    &#xA;

    EDIT :&#xA;I put the example on an Array, I don't want it, I just want it to show the downloaded video I just uploaded as a result.

    &#xA;

    EDIT 2 :&#xA;There are some who say type $location and it displays the downloaded file, but this does not work !!!&#xA;I just tried more than once and with several uses, there is no display where the text is empty

    &#xA;

    This is an example of that

    &#xA;

    &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;if(isset($_POST["name"]))&#xA;{&#xA; $filename = $folder_name.$_POST["name"];&#xA; $imagename = $thumb_name.$_POST["name"].$imageext;&#xA; unlink($filename);&#xA; unlink($imagename);&#xA;}&#xA;&#xA;&#xA;$output .= &#x27;Successfly file is "&#x27;.$location.&#x27;"&#x27;;&#xA;echo $output;&#xA;&#xA;?>&#xA;

    &#xA;

    Result : Successfly file is ""&#xA;no name file :(

    &#xA;

    EDIT 3 :

    &#xA;

    this code upload.php&#xA;functions not working

    &#xA;

    &lt;?php&#xA;&#xA;//upload.php&#xA;&#xA;$folder_name = &#x27;upload/&#x27;;&#xA;$tumb_name = &#x27;thumb/&#x27;;&#xA;$imageext = &#x27;.png&#x27;;&#xA;&#xA;if(!empty($_FILES))&#xA;{&#xA;&#xA; $temp_file = $_FILES[&#x27;file&#x27;][&#x27;tmp_name&#x27;];&#xA; $location = $folder_name . $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; move_uploaded_file($temp_file, $location);&#xA; $upload = $_FILES[&#x27;file&#x27;][&#x27;name&#x27;];&#xA; $uploadStr = str_replace(" ", "\ ",$upload);&#xA; $locationStr = str_replace(" ","\ ",$location);&#xA; $cmd  = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&amp;1";&#xA; echo shell_exec($cmd);&#xA;}&#xA;&#xA;&#xA;echo "The file " . $location . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $upload . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $uploadStr . " has been uploaded";&#xA;// not working&#xA;echo "<br />";&#xA;echo "The file " . $locationStr . " has been uploaded";&#xA;// not working&#xA;&#xA;?>&#xA;

    &#xA;

    Result upload.php in EDIT 3

    &#xA;

    this error :&#xA;[23-Apr-2022 12:31:56 Asia/Riyadh] PHP Notice : Undefined variable : location in /home/prdix/public_html/test/upload.php on line 38

    &#xA;

    line 38 : echo $location ;

    &#xA;

    About the developer solution Markus AO

    &#xA;

    I did the experiment and it is quite good, but dropzone is still missing, because I will upload a large video and the normal upload compresses the video before uploading, here is a picture from my mobile while uploading, but this does not happen with dropzone&#xA;enter image description here

    &#xA;

    I want to implement this in dropzone as well, because this library does not compress the video, but upload it in full size.

    &#xA;

    Thank you bro.

    &#xA;

  • Video conversion (using ffmpeg) fails only on server

    22 avril 2022, par wb.waldemar

    I'm trying to convert a video using latest static build of ffmpeg and following command :

    &#xA;

    ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4&#xA;

    &#xA;

    This works actually fine on Ubuntu (desktop) and the same command works also on Win 10 but not on the server (Debian GNU/Linux 10) where it should actually work. I can't install or build ffmpeg directly so I've to use a static build. Also simple remux works on the server but not the converion and I do not understand why. I've also read and tried different approaches and suggestions, but none of them could solve the problem.

    &#xA;

    Does someone have an idea what goes wrong ?

    &#xA;

    ffmpeg started on 2022-04-22 at 13:02:44&#xA;Report written to "ffmpeg-20220422-130244.log"&#xA;Log level: 48&#xA;Command line:&#xA;/dev/tools/ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4&#xA;ffmpeg version N-60837-ge81242bb13-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg&#xA;  libavutil      57. 22.100 / 57. 22.100&#xA;  libavcodec     59. 21.103 / 59. 21.103&#xA;  libavformat    59. 17.102 / 59. 17.102&#xA;  libavdevice    59.  5.100 / 59.  5.100&#xA;  libavfilter     8. 27.100 /  8. 27.100&#xA;  libswscale      6.  5.100 /  6.  5.100&#xA;  libswresample   4.  4.100 /  4.  4.100&#xA;  libpostproc    56.  4.100 / 56.  4.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-report&#x27; ... matched as option &#x27;report&#x27; (generate a report) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-y&#x27; ... matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;info&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;en--story-video.mp4&#x27;.&#xA;Reading option &#x27;-c:v&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;libx264&#x27;.&#xA;Reading option &#x27;-preset&#x27; ... matched as AVOption &#x27;preset&#x27; with argument &#x27;slow&#x27;.&#xA;Reading option &#x27;-crf&#x27; ... matched as AVOption &#x27;crf&#x27; with argument &#x27;22&#x27;.&#xA;Reading option &#x27;-c:a&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;copy&#x27;.&#xA;Reading option &#x27;en--story-video-out.mp4&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option report (generate a report) with argument 1.&#xA;Applying option y (overwrite output files) with argument 1.&#xA;Applying option loglevel (set logging level) with argument info.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url en--story-video.mp4.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: en--story-video.mp4.&#xA;[NULL @ 0xb9b3b80] Opening &#x27;en--story-video.mp4&#x27; for reading&#xA;[file @ 0xb9b41c0] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] ISO: File Type Major Brand: isom&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 0, edit list 0 - media time: 512, duration: 522240&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Offset DTS by 512 to make first pts zero.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Setting codecpar->delay to 2 for stream st: 0&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 1, edit list 0 - media time: 0, duration: 1502222&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Before avformat_find_stream_info() pos: 15666151 bytes read:88959 seeks:1 nb_streams:2&#xA;[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 6(SEI), nal_ref_idc: 0&#xA;[h264 @ 0xb9b6380] nal_unit_type: 5(IDR), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] Format yuv420p chosen by get_format().&#xA;[h264 @ 0xb9b6380] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[h264 @ 0xb9b6380] no picture &#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] All info found&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] After avformat_find_stream_info() pos: 43534 bytes read:155045 seeks:2 frames:4&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;en--story-video.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf59.17.102&#xA;  Duration: 00:00:34.06, start: 0.000000, bitrate: 3679 kb/s&#xA;  Stream #0:0[0x1](und), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3544 kb/s, 60 fps, 60 tbr, 15360 tbn (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.&#xA;      vendor_id       : [0][0][0][0]&#xA;Successfully opened the file.&#xA;Parsing a group of options: output url en--story-video-out.mp4.&#xA;Applying option c:v (codec name) with argument libx264.&#xA;Applying option c:a (codec name) with argument copy.&#xA;Successfully parsed a group of options.&#xA;Opening an output file: en--story-video-out.mp4.&#xA;[file @ 0xb9fbec0] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;Successfully opened the file.&#xA;detected 20 logical cores&#xA;[h264 @ 0xba04680] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xba04680] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba04680] nal_unit_type: 6(SEI), nal_ref_idc: 0&#xA;[h264 @ 0xba04680] nal_unit_type: 5(IDR), nal_ref_idc: 3&#xA;[h264 @ 0xba04680] Format yuv420p chosen by get_format().&#xA;[h264 @ 0xba04680] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[h264 @ 0xba04680] no picture &#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;[h264 @ 0xbaa3b80] no picture &#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba067c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba9c2c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba21fc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbab8e80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbac7b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbad6840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbae5580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbaf42c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb03000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb11d40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb20a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb2f7c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb3e500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb4d240] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba04680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;video_size&#x27; to value &#x27;1920x1080&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;pix_fmt&#x27; to value &#x27;0&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;time_base&#x27; to value &#x27;1/15360&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;pixel_aspect&#x27; to value &#x27;1/1&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;frame_rate&#x27; to value &#x27;60/1&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1&#xA;[format @ 0xbaa0540] Setting &#x27;pix_fmts&#x27; to value &#x27;yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le&#x27;&#xA;[AVFilterGraph @ 0xba16380] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed&#xA;[libx264 @ 0xba03c80] using mv_range_thread = 24&#xA;[libx264 @ 0xba03c80] using SAR=1/1&#xA;[libx264 @ 0xba03c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;[AVIOContext @ 0xb9fba00] Statistics: 0 bytes written, 0 seeks, 0 writeouts&#xA;[AVIOContext @ 0xb9b4480] Statistics: 220581 bytes read, 2 seeks&#xA;Conversion failed!&#xA;

    &#xA;

  • Video conversion (using ffmpeg) fails only on server

    22 avril 2022, par wb.waldemar

    I'm trying to convert a video using latest static build of ffmpeg and following command :

    &#xA;

    ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4&#xA;

    &#xA;

    This works actually fine on Ubuntu (desktop) and the same command works also on Win 10 but not on the server (Debian GNU/Linux 10) where it should actually work. I can't install or build ffmpeg directly so I've to use a static build. Also simple remux works on the server but not the converion and I do not understand why. I've also read and tried different approaches and suggestions, but none of them could solve the problem.

    &#xA;

    Does someone have an idea what goes wrong ?

    &#xA;

    ffmpeg started on 2022-04-22 at 13:02:44&#xA;Report written to "ffmpeg-20220422-130244.log"&#xA;Log level: 48&#xA;Command line:&#xA;/dev/tools/ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4&#xA;ffmpeg version N-60837-ge81242bb13-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg&#xA;  libavutil      57. 22.100 / 57. 22.100&#xA;  libavcodec     59. 21.103 / 59. 21.103&#xA;  libavformat    59. 17.102 / 59. 17.102&#xA;  libavdevice    59.  5.100 / 59.  5.100&#xA;  libavfilter     8. 27.100 /  8. 27.100&#xA;  libswscale      6.  5.100 /  6.  5.100&#xA;  libswresample   4.  4.100 /  4.  4.100&#xA;  libpostproc    56.  4.100 / 56.  4.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-report&#x27; ... matched as option &#x27;report&#x27; (generate a report) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-y&#x27; ... matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;info&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;en--story-video.mp4&#x27;.&#xA;Reading option &#x27;-c:v&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;libx264&#x27;.&#xA;Reading option &#x27;-preset&#x27; ... matched as AVOption &#x27;preset&#x27; with argument &#x27;slow&#x27;.&#xA;Reading option &#x27;-crf&#x27; ... matched as AVOption &#x27;crf&#x27; with argument &#x27;22&#x27;.&#xA;Reading option &#x27;-c:a&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;copy&#x27;.&#xA;Reading option &#x27;en--story-video-out.mp4&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option report (generate a report) with argument 1.&#xA;Applying option y (overwrite output files) with argument 1.&#xA;Applying option loglevel (set logging level) with argument info.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url en--story-video.mp4.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: en--story-video.mp4.&#xA;[NULL @ 0xb9b3b80] Opening &#x27;en--story-video.mp4&#x27; for reading&#xA;[file @ 0xb9b41c0] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] ISO: File Type Major Brand: isom&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 0, edit list 0 - media time: 512, duration: 522240&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Offset DTS by 512 to make first pts zero.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Setting codecpar->delay to 2 for stream st: 0&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 1, edit list 0 - media time: 0, duration: 1502222&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Before avformat_find_stream_info() pos: 15666151 bytes read:88959 seeks:1 nb_streams:2&#xA;[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] nal_unit_type: 6(SEI), nal_ref_idc: 0&#xA;[h264 @ 0xb9b6380] nal_unit_type: 5(IDR), nal_ref_idc: 3&#xA;[h264 @ 0xb9b6380] Format yuv420p chosen by get_format().&#xA;[h264 @ 0xb9b6380] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[h264 @ 0xb9b6380] no picture &#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] All info found&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] After avformat_find_stream_info() pos: 43534 bytes read:155045 seeks:2 frames:4&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;en--story-video.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf59.17.102&#xA;  Duration: 00:00:34.06, start: 0.000000, bitrate: 3679 kb/s&#xA;  Stream #0:0[0x1](und), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3544 kb/s, 60 fps, 60 tbr, 15360 tbn (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.&#xA;      vendor_id       : [0][0][0][0]&#xA;Successfully opened the file.&#xA;Parsing a group of options: output url en--story-video-out.mp4.&#xA;Applying option c:v (codec name) with argument libx264.&#xA;Applying option c:a (codec name) with argument copy.&#xA;Successfully parsed a group of options.&#xA;Opening an output file: en--story-video-out.mp4.&#xA;[file @ 0xb9fbec0] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;Successfully opened the file.&#xA;detected 20 logical cores&#xA;[h264 @ 0xba04680] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0xba04680] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba04680] nal_unit_type: 6(SEI), nal_ref_idc: 0&#xA;[h264 @ 0xba04680] nal_unit_type: 5(IDR), nal_ref_idc: 3&#xA;[h264 @ 0xba04680] Format yuv420p chosen by get_format().&#xA;[h264 @ 0xba04680] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[h264 @ 0xba04680] no picture &#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;[h264 @ 0xbaa3b80] no picture &#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba067c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba9c2c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba21fc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbab8e80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbac7b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbad6840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbae5580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbaf42c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb03000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb11d40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb20a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb2f7c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb3e500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xbb4d240] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)&#xA;[h264 @ 0xba04680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0&#xA;[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;video_size&#x27; to value &#x27;1920x1080&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;pix_fmt&#x27; to value &#x27;0&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;time_base&#x27; to value &#x27;1/15360&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;pixel_aspect&#x27; to value &#x27;1/1&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] Setting &#x27;frame_rate&#x27; to value &#x27;60/1&#x27;&#xA;[graph 0 input from stream 0:0 @ 0xba9f800] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1&#xA;[format @ 0xbaa0540] Setting &#x27;pix_fmts&#x27; to value &#x27;yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le&#x27;&#xA;[AVFilterGraph @ 0xba16380] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed&#xA;[libx264 @ 0xba03c80] using mv_range_thread = 24&#xA;[libx264 @ 0xba03c80] using SAR=1/1&#xA;[libx264 @ 0xba03c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;[AVIOContext @ 0xb9fba00] Statistics: 0 bytes written, 0 seeks, 0 writeouts&#xA;[AVIOContext @ 0xb9b4480] Statistics: 220581 bytes read, 2 seeks&#xA;Conversion failed!&#xA;

    &#xA;