Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (75)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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" (...)

Sur d’autres sites (9409)

  • where to put the watermark png file in this code ?

    15 août 2017, par asif

    this is a line from ffmpeg video converter php script ;

    $ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format."

    where :

    .$video_to_convert. = input file

    .$converted_vids.$name. = output file

    .$new_format. ; = file extention format

    now i want to add watermark.png file, if i put any where i got error conversion
    as i added the line logo.png -filter_complex 'overlay in video quality line, i got error

    Error ;

    ffmpeg version N-71954-gbc6f84f Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --prefix=/usr --enable-version3 --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-postproc --enable-nonfree --enable-pthreads --enable-x11grab --enable-libfaac --enable-libopenjpeg --enable-zlib --disable-doc
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 37.101 / 56. 37.101
     libavformat    56. 31.102 / 56. 31.102
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'uploaded/1502801111_21.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.31.102
     Duration: 00:02:27.32, start: 0.023220, bitrate: 635 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x320 [SAR 1:1 DAR 3:2], 476 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Please use -b:a or -b:v, -b is ambiguous
    Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_0

    This is index.php file scipt of conversion :

       v<?php include("templates/header.php");?>

    <div>



    &lt;?php

    require_once('languages/en.php');
    include ("includes/settings.php");
    include("includes/functions.php");
    include("includes/LIB_parse.php");
    include("classes/other.php");
    cron(); // to run cron job to delete all files
    if(isset($_POST['uploader_0_name']) or isset ($_GET['uploaded_name']))
       {
       if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    list($_SESSION['original_name'], $ext) = explode('.',$_GET['uploaded_name']);
    $_SESSION['original_name']= return_between($_GET['uploaded_name'], '_', "$ext", 'EXCL') ;
    $_SESSION['original_name']= str_replace(".","",$_SESSION['original_name']);
    }
    if(isset($_POST['uploader_0_name']))
       {  
    $fullname=  $_POST['uploader_0_tmpname'];
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    $ext= pathinfo($fullname, PATHINFO_EXTENSION);
    $_SESSION['name']=RemoveExtension($fullname);
    $store_dir="uploaded/";
    $_SESSION['converted_vids']=$converted_vids;
    $_SESSION['temp_dir']=$store_dir;
    // if those directotires don't exist - create them and give them read/write permissions
    if(!is_dir($store_dir)) mkdir($store_dir, 0777);
    if(!is_dir($converted_vids)) mkdir($converted_vids, 0777);
    $extension = substr($fullname, strrpos($fullname, "."));
    $extension = strtolower($extension);
    $video_to_convert=$store_dir.$_SESSION['name'];
    $_SESSION['video_to_convert']=$video_to_convert;
    $_SESSION['extension']=$extension;
    /*******************************
    check extenxions
    ***************************************************/    
                     if (!in_array($ext, $allowedExtensions))
                     {
                       echo '<div style="text-align:center"><strong>'.$ext."</strong><br /> is an invalid file type!<br />Supported files are:<br /><strong>";
                       foreach ($allowedExtensions as $value) { echo $value . "<br />"; }
                       echo "</strong><br />";
           echo "<a href="http://stackoverflow.com/feeds/tag/\&#034;index.php\&#034;">"."<img src="http://stackoverflow.com/feeds/tag/\&#034;images/red-back.png\&#034;" border="\&quot;0\&quot;" style='max-width: 300px; max-height: 300px' /></a></div>";
            include("templates/footer.php");
                          exit;
                     }


               ?>

               <center>
    <form action="index.php" method="post" target="_self">
                   <br />
                                   <fieldset>
                               <legend class="show_legend">Convert To</legend>

                   <div class="radio_buttons">
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/flv.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" class="blue_font" value="flv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp4.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp4" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/wmv.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="wmv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/avi.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="avi" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp3.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp3" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/ogg.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="ogg" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/webm.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="webm" />
                   </div>
                   </fieldset>
                       <fieldset>
                               <legend class="show_legend">Optional settings</legend>

                   <div class="radio_buttons" style="display:inline;padding:10px">
                   <br />Video quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="2000000">high</option>
                     <option value="logo.png -filter_complex 'overlay' ">medium</option>

                     <option value="-i seen.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,15\,25)' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Seen</option>
                     <option value="-i logo2.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,10\,20)'">HD Watermark</option>
                     <option value="-i logo.png -filter_complex 'overlay'">Watermark</option>
                     <option value="-vf drawtext='fontsize=20:y=h-line_h-10:x=(2*n)-tw:fontfile='op.ttf':text='DesiBombs.com'' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Watermark</option>
                   </select>
                   </div>

                   <div class="radio_buttons" style="display:inline;padding:10px">Audio quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="44100">high</option>
                     <option value="22050">medium</option>
                     <option value="11025">low</option>
                   </select>




                   <div class="radio_buttons" style="display:inline;padding:10px">Video size:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="320x240">320x240</option>
                     <option value="512x384" selected="selected">512x384</option>
                     <option value="640x360">640x360</option>
                     <option value="854x480">854x480</option>
                     <option value="1280x720">1280x720</option>
                   </select>
                   </div>

                   </div></fieldset>
                   <div class="radio_buttons">


                      <input type="submit" disabled="disabled" value="" style="display:none" />
                   </div>
     

     </form></center>
    &lt;?php
       }
       elseif(isset($_POST['type']))
           {


           $new_format=htmlspecialchars($_POST['type']); // read output format from form
           $name=$_SESSION['name'];
           //$_SESSION['extension'];
           $video_to_convert=$store_dir.$_SESSION['name'].$_SESSION['extension'];


           if (isset($_POST['size'])) {$size=$_POST['size'];}
           if (isset($_POST['quality'])) {$quality=$_POST['quality'];}
           if (isset($_POST['audio'])) {$audio=$_POST['audio'];}

           if($new_format=="webm" &amp;&amp; $audio=="11025"){$audio="22050";$new_format="webm"; }// for webm  and ogg audio can not be 11050
           if($new_format=="ogg" &amp;&amp; $audio=="11025"){$audio="22050"; $new_format="ogg"; }// for webm  and ogg audio can not be 11050

           $_SESSION['type']=$new_format;


           if($new_format=="flv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


       if($new_format=="avi"){ $call=$ffmpeg." -i ".$video_to_convert."  -vcodec mjpeg -f avi -acodec libmp3lame -b ".$quality." -s ".$size." -r 30 -g 12 -qmin 3 -qmax 13 -ab 224 -ar ".$audio." -ac 2 ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp3"){ $call=$ffmpeg." -i ".$video_to_convert." -vn -acodec libmp3lame -ac 2 -ab 128000 -ar ".$audio."  ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp4"){ $call=$ffmpeg." -i ".$video_to_convert." -vf logo.png -vcodec mpeg4 -r 30 -b ".$quality." -acodec libmp3lame -ab 126000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="wmv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec wmv1 -r 30 -b ".$quality." -acodec wmav2 -ab 128000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="ogg"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libtheora -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="webm"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libvpx  -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


    /* START CONVERTING The Video */

       require_once("includes/ffmpeg_cmd.php");

       $convert = (popen($convert_call, "r"));

       pclose($convert);
       flush();    
    // define sessions


       $_SESSION['dest_file']=$converted_vids.$name.".".$new_format;

        echo "<code class="echappe-js">&lt;script&gt;\n&quot;;<br />
        echo &quot;counter = 5\n&quot;;<br />
         echo &quot;var redirect = 0; \n&quot;;<br />
         echo &quot;$(document).ready(function()\n&quot;;<br />
     echo &quot;{\n&quot;;<br />
       echo &quot;var refreshId = setInterval(function() \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;if(redirect == 0) \n { \n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php');\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;else \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php?counter='+ counter--);\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;}, 1000);\n&quot;;<br />
       echo &quot;});\n&quot;;   <br />
       echo &quot;&lt;/script&gt;

    \n" ;

    //
    /************************* for debug *************************************
    echo "

    " ;
        print_r ($_SESSION) ;
        echo "
    " ;
        **********************************************************************************/
    

     ?>

    wait please

    < ?php

    else if(isset($_GET[’finished’]))

    echo "

    " ; if(!isset($_SESSION[’name’])) echo "please convert new video" ;include("templates/footer.php") ; ;exit ; $filepath=$converted_vids."./".$_SESSION[’name’].".".$_SESSION[’type’] ;

    echo " " ;

    require_once"video_duration.php" ;

    $_SESSION[’duration’]=$hours." :".$minutes." :".$seconds ;

    $vid_name=$_SESSION[’name’] ;
    $vid_src=$_SESSION[’extension’] ;
    $vid_new=$_SESSION[’type’] ;
    if (isset($_SESSION[’duration’])) $duration=$_SESSION[’duration’] ;else $duration="unknown" ;
    if(file_exists($converted_vids.$vid_name.".".$vid_new))

    $vid_size=get_size($converted_vids.$vid_name.".".$vid_new) ;
    else $vid_size=0 ;

     ?>

    your video information
    Video duration < ?php echo $hours." :".$minutes." :".$seconds ; ?>
    original video name < ?php if(isset($_SESSION[’original_name’]))echo $_SESSION[’original_name’] ; ?>
    video size < ?php echo $vid_size." MB
    " ; ?>
    source extension < ?php echo str_replace(".","","$vid_src") ; ?>
    new extension < ?php echo $vid_new ; ?>

    < ?php

    echo "

    " ;

    session_unset() ;

    else

     ?>

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
    // Convert divs to queue widgets when the DOM is ready<br />
    $(function() {<br />
       $(&quot;#uploader&quot;).pluploadQueue({<br />
           // General settings<br />
           runtimes : 'flash',<br />
           url : 'upload.php',<br />
           max_file_size : '&amp;lt;?php echo $max_file_size ;?&gt;mb',<br />
           chunk_size : '1mb',<br />
           unique_names : true,<br />
    <br />
           // Resize images on clientside if we can<br />
           resize : {width : 320, height : 240, quality : 90},<br />
    init : {<br />
                 FilesAdded: function(up, files) {<br />
                   plupload.each(files, function(file) {<br />
                     if (up.files.length &gt; 1) {<br />
                       up.removeFile(file);<br />
                     }<br />
                   });<br />
                   if (up.files.length &gt;= 1) {<br />
                     $('#pickfiles').hide('slow');<br />
                   }<br />
                 },<br />
                 FilesRemoved: function(up, files) {<br />
                   if (up.files.length &lt; 1) {<br />
                     $('#pickfiles').fadeIn('slow');<br />
                   }<br />
                 }<br />
               },<br />
               multi_selection: false,<br />
           // Specify what files to browse for<br />
           filters : [<br />
               {title : &quot;Video files&quot;, extensions : &quot;&amp;lt;?php foreach ($allowedExtensions as $value) { echo $value . &quot;,&quot;; }?&gt;&quot;}<br />
    <br />
           ],<br />
    <br />
           // Flash settings<br />
           flash_swf_url : 'js/plupload.flash.swf',<br />
    <br />
           // Silverlight settings<br />
           silverlight_xap_url : 'js/plupload.silverlight.xap'<br />
       });<br />
    <br />
       // Client side form validation<br />
       $('form').submit(function(e) {<br />
           var uploader = $('#uploader').pluploadQueue();<br />
    <br />
           // Files in queue upload them first<br />
           if (uploader.files.length &gt; 0) {<br />
               // When all files are uploaded submit form<br />
               uploader.bind('StateChanged', function() {<br />
                   if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {<br />
                       $('form')[0].submit();<br />
                   }<br />
               });<br />
    <br />
               uploader.start();<br />
           } else {<br />
               alert('You must queue at least one video.');<br />
           }<br />
    <br />
           return false;<br />
       });<br />
    });<br />
    &lt;/script&gt;

    You browser doesn’t have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

    Maximum upload size < ?php echo $max_file_size ; ?> MB

    < ?php include("templates/info.php") ; ?>
    < ?php

    //End Body Area/

     ?>

  • Ffmpeg/Fluent-Ffmpeg : Output file #0 does not contain any stream

    16 août 2017, par Code Sherpa

    Use Case

    When a user records an audio file and uploads to firebase storage, run a trigger that crops a clip of that file and saves it to a "preview" directory.

    Problem

    Getting Output file #0 does not contain any stream after static .AAC file is downloaded to temp directory and ffmpeg command is run.

    Environment

    • mac client / firebase storage
    • node v8.1.0
    • ffmpeg v3.2.2
    • fluent-ffmpeg v2.1.2

    Node Code

     var command = new ffmpeg({ source: tempFilePath, timeout: 0 })
         .setFfmpegPath(ffmpegPath)
         .setFfprobePath(ffprobePath)
         .inputOption('-t', '10')
         .inputOption('-ss', '10')
         .outputOption('-acodec', 'copy')
         .on('start', function(commandLine) {
               console.log('Spawned Ffmpeg with command: ', commandLine);
          })
         .on('end', function() {
             console.log('Preview file cropping done successfully');
          })
         .on('error', function(err, stdout, stderr) {
             var build = err;
             if (!stdout === '') { build = build + '\n' + stdout; }
             build = build + '\n' + stderr;

             console.log(build);
          }).save(tempFilePath);

    Ffmpeg Command

    Spawned Ffmpeg with command : ffmpeg -t 10 -ss 10 -i
    /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac -y -acodec
    copy /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac

    Debug Output From Firebase

    Error : ffmpeg exited with code 1 : Output #0, adts, to
    ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Output
    file #0 does not contain any stream

    ffmpeg version 3.2.2-static http://johnvansickle.com/ffmpeg/
    Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.1
    (Debian 5.4.1-4) 20161202 configuration : —enable-gpl
    —enable-version3 —enable-static —disable-debug —disable-ffplay —disable-indev=sndio —disable-outdev=sndio —cc=gcc-5 —enable-fontconfig —enable-frei0r —enable-gnutls —enable-gray —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libvidstab —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libzimg libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x3a00e60] Format aac detected only with low score of 1, misdetection possible ! [aac @ 0x3a00e60] Could
    not find codec parameters for stream 0 (Audio : aac, 0 channels, fltp) :
    unspecified sample rate Consider increasing the value for the
    ’analyzeduration’ and ’probesize’ options
    /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac : could not
    seek to position 10.000 Input #0, aac, from
    ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ :
    Duration : N/A, bitrate : N/A
    Stream #0:0 : Audio : aac, 0 channels, fltp Output #0, adts, to ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Output
    file #0 does not contain any stream

    Console Output

    | $ ffmpeg -t 10 -ss 10 -i 2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac -y -acodec aac
    output_file.aac

    ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
    FFmpeg developers built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
    configuration : —prefix=/Volumes/Ramdisk/sw —enable-gpl
    —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x7fac6c800a00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from
    ’2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Duration :
    00:01:07.71, bitrate : 223 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 277 kb/s Output #0, adts, to ’output_file.aac’ : Metadata :
    encoder : Lavf57.56.100
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata :
    encoder : Lavc57.64.101 aac Stream mapping : Stream #0:0 -> #0:0 (aac (native) -> aac (native)) Press [q] to stop, [?] for help size= 159kB time=00:00:10.00 bitrate= 130.5kbits/s
    speed=12.7x video:0kB audio:156kB subtitle:0kB other streams:0kB
    global headers:0kB muxing overhead : 1.887004% [aac @ 0x7fac6d004600]
    Qavg : 383.548

    Origin File Format

    $ ffprobe -show_format
    2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac

    ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
    built with llvm-gcc 4.2.1 (LLVM build 2336.11.00) configuration :
    —prefix=/Volumes/Ramdisk/sw —enable-gpl —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x7fefbd001400] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from
    ’2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Duration :
    00:01:07.71, bitrate : 223 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 223 kb/s [FORMAT]
    filename=2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac
    nb_streams=1 nb_programs=0 format_name=aac format_long_name=raw ADTS
    AAC (Advanced Audio Coding) start_time=N/A duration=67.706333
    size=1892392 bit_rate=223599 probe_score=51 [/FORMAT]

    Output File Format

    $ ffprobe -show_format output_file.aac ffprobe version 3.2.2 Copyright
    (c) 2007-2016 the FFmpeg developers built with llvm-gcc 4.2.1 (LLVM
    build 2336.11.00) configuration : —prefix=/Volumes/Ramdisk/sw
    —enable-gpl —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 /
    57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 /
    54. 1.100 [aac @ 0x7fa904802a00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from ’output_file.aac’ :
    Duration : 00:00:09.45, bitrate : 138 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 138 kb/s [FORMAT] filename=output_file.aac nb_streams=1 nb_programs=0
    format_name=aac format_long_name=raw ADTS AAC (Advanced Audio Coding)
    start_time=N/A duration=9.454635 size=163278 bit_rate=138156
    probe_score=51 [/FORMAT]

    Comments & Observations

    • I am able to run the ffmpeg command (provided above) locally and get the results I want.

    • The origin file is AAC. I have verified that it is, indeed, an AAC file and not a different file type masquerading as an AAC.

    • The output file format appears as audio/x-aac in firebase. I would expect it to be the same as the origin file - audio/aac.

  • avconv on debian jessie throws error when trying to convert raw video to mp4

    20 août 2017, par Vinay Divakar

    I am trying to convert a raw video captured using a Logitech USB Cam(YUYV) to mp4 using avconv. I have tried the below to do so :

    avconv -i out.raw -c copy output.mp4
    avconv -i out.raw -vcodec copy -acodec copy output.mp4

    but I get an error as shown below.

    root@beaglebone:~/BBB_CV/boneCV# avconv -i out.raw -c copy output.mp4
    avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav developersbuilt on Apr 23 2017 23:00:54 with gcc 4.9.2 (Debian 4.9.2-10)
    out.raw: Invalid data found when processing input

    I have checked here, but did not find any relevant examples for the above purpose.

    Edit : Added more details—

    I tried doing the below by adding the infile options as suggested :

    root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4

    This got me rid of the previous error and some new ones popped up as shown below.

    root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4
    avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav
    developers built on Apr 23 2017 23:00:54 with gcc 4.9.2 (Debian 4.9.2-10)
    [rawvideo @ 0x17e21c0] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'out.raw':
    Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: rawvideo, yuyv422, 640x480, 30 tbn
    [mp4 @ 0x17eb840] Codec for stream 0 does not use global headers but
    container format requires global headers
    [mp4 @ 0x17eb840] track 0: could not find tag, codec not currently
    supported in container
    Output #0, mp4, to 'output.mp4':
    Metadata:
    encoder         : Lavf56.1.0
    Stream #0.0: Video: rawvideo, yuyv422, 640x480, q=2-31, 30 tbn, 30 tbc
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Could not write header for output file #0 (incorrect codec parameters ?):
    Operation not permitted

    The output.mp4 is being generated but when tried to open it throws an error.

    Edit : I ran a "sudo apt-get install libav-tools" an then tried. This is what I got.

    root@beaglebone:~/BBB_CV/boneCV# avconv -s 640x480 -framerate 30 -pix_fmt
    yuyv422 -f rawvideo -i out.raw -c copy output.mp4
    ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.9.2 (Debian 4.9.2-10)
    configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-
    strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro'
      -cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-
       nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-
       libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-
       libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
       libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-
       libvpx --enable-libschroedinger --disable-encoder=libschroedinger --
       enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter -
       enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-
      libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabihf -
      -disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-
      frei0r --enable-openssl --enable-libass --enable-libopus --enable-
      fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --
      disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample
      --disable-htmlpages --disable-podpages --enable-libutvideo --enable-
      libfdk-aac --enable-libx265 --enable-libiec61883 --enable-libdc1394 --
      disable-altivec --shlibdir=/usr/lib/arm-linux-gnueabihf
      libavutil      54. 20.100 / 54. 20.100
      libavcodec     56. 26.100 / 56. 26.100
      libavformat    56. 25.101 / 56. 25.101
      libavdevice    56.  4.100 / 56.  4.100
      libavfilter     5. 11.102 /  5. 11.102
      libavresample   2.  1.  0 /  2.  1.  0
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  1.100 /  1.  1.100
      libpostproc    53.  3.100 / 53.  3.100
     [rawvideo @ 0x18465e0] Estimating duration from bitrate, this may be
      inaccurate
      Input #0, rawvideo, from 'out.raw':
      Duration: 00:00:00.10, start: 0.000000, bitrate: 146626 kb/s
      Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456
      kb/s, 30 tbr, 30 tbn, 30 tbc
      [mp4 @ 0x184f790] Could not find tag for codec rawvideo in stream #0,
      codec not currently supported in container
      Output #0, mp4, to 'output.mp4':
      Metadata:
      encoder         : Lavf56.25.101
      Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, q=2-
      31, 147456 kb/s, 30 tbr, 30 tbn, 30 tbc
      Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Could not write header for output file #0 (incorrect codec parameters ?):
      Invalid argument

    I ran "ffmpeg -s 640x480 -framerate 30 -pix_fmt yuv420p -f rawvideo -i out.raw output.mp4" and below is what I got.

    root@beaglebone:~/BBB_CV/boneCV# ffmpeg -s 640x480 -framerate 30 -pix_fmt yuv420p -f rawvideo -i out.raw output.mp4
    ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Debian 4.9.2-10)
     configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabihf --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/arm-linux-gnueabihf
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    [rawvideo @ 0x1d55e0] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from 'out.raw':
     Duration: 00:00:00.13, start: 0.000000, bitrate: 109969 kb/s
       Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 110592 kb/s, 30 tbr, 30 tbn, 30 tbc
    [libx264 @ 0x1df6c0] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x1df6c0] profile High, level 3.0
    [libx264 @ 0x1df6c0] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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 'output.mp4':
     Metadata:
       encoder         : Lavf56.25.101
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc56.26.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [rawvideo @ 0x1de3a0] Invalid buffer size, packet size 450428 &lt; expected frame_size 460800
    Error while decoding stream #0:0: Invalid argument
    frame=    3 fps=1.7 q=29.0 Lsize=     263kB time=00:00:00.03 bitrate=64692.6kbits/s    
    video:262kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.318205%
    [libx264 @ 0x1df6c0] frame I:1     Avg QP:33.09  size:100676
    [libx264 @ 0x1df6c0] frame P:2     Avg QP:32.99  size: 83672
    [libx264 @ 0x1df6c0] mb I  I16..4:  0.0% 95.4%  4.6%
    [libx264 @ 0x1df6c0] mb P  I16..4:  0.0% 45.7%  3.0%  P16..4: 35.9% 10.7%  4.8%  0.0%  0.0%    skip: 0.0%
    [libx264 @ 0x1df6c0] 8x8 transform intra:94.6% inter:86.1%
    [libx264 @ 0x1df6c0] coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0% inter: 53.6% 100.0% 100.0%
    [libx264 @ 0x1df6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 12% 24%  2%  0%  1%  1%  2%  3%
    [libx264 @ 0x1df6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 82% 11%  4%  0%  0%  0%  1%  0%  1%
    [libx264 @ 0x1df6c0] i8c dc,h,v,p: 48% 30% 14%  7%
    [libx264 @ 0x1df6c0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x1df6c0] ref P L0: 83.5%  7.9%  8.6%
    [libx264 @ 0x1df6c0] kb/s:21441.60
  • Boussole SPIP

    SPIP.net-La documentation officielle et téléchargement de (...) SPIP Code-La documentation du code de SPIP Programmer SPIP-La documentation pour développer avec (...) Traduire SPIP-Espace de traduction de SPIP et de ses (...) Plugins SPIP-L'annuaire des plugins SPIP SPIP-Contrib-L'espace des contributions à SPIP Forge SPIP-L'espace de développement de SPIP et de ses (...) Discuter sur SPIP-Les nouveaux forums de la communauté (...) SPIP Party-L'agenda des apéros et autres rencontres (...) Médias SPIP-La médiathèque de SPIP SPIP Syntaxe-Tester l'édition de texte dans SPIP