Recherche avancée

Médias (91)

Autres articles (49)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4292)

  • Final Rendered Video is Sped Up Compared to Animation Played in Processing

    15 janvier 2016, par Nightlife

    Recently I made an Audio Visualizer in Processing. From there I wanted to render the animation created in Processing into a mp4 file. I am on a windows computer, and am using ffmpeg to convert my TIF files produced in Processing into mp4.

    When I do this I am able to render the images into an mp4 file, but when I playback this file the animation is sped up compared to the animation when I play it on Processing. Because of this the animation does not sync with the audio when I combine the mp4 file and audio on a video editing program.

    When I set my frame rate to 25 and have the limit on the number of frames to be 250 and render it into a mp4 file it is 10 seconds long like it should be, but it contains more than 10 seconds of the animation when compared to the animation played directly in Processing.

    I have no idea why this is so any help will be much appreciated.

    My Processing code :

    import ddf.minim.*;
    import ddf.minim.analysis.*;

    Minim minim;
    AudioPlayer player;
    PImage img;
    FFT fft;

    void setup() {
     size(728, 546);

     minim = new Minim(this);

     // this loads mysong.wav from the data folder as a stream with a internal buffer of size 1024
     player = minim.loadFile("new_years_good.mp3");
     fft = new FFT(player.bufferSize(), player.sampleRate());
     player.play();
     img= loadImage("cat-in-shades-.jpg");
     frameRate(25);
    }

    void draw() {


     image(img, 0, 0);
     //tint(0, 100, 150);
     stroke(255);

     strokeWeight(4);
     float a = 0;

     float angle = (2*PI) / 200;


     fft.forward(player.mix);


     for(int i=0; i < player.bufferSize() - 1; i++) {

      //player.mix.get(i) is a value between [-1,1]

       float x = 250 + cos(a) * (20 * player.mix.get(i) + 100);
       float x2 = 540 + cos(a) * (20 * player.mix.get(i) + 100);    

       float y = 230 + sin(a) * (20 * player.mix.get(i) + 100);
       float y2 = 240 + sin(a) * (20 * player.mix.get(i) + 100);


       float xFinal = 250 + cos(a+angle) * (20 * player.mix.get(i+1) + 100);
       float x2Final = 540 + cos(a+angle) * (20 * player.mix.get(i+1) + 100);


       float yFinal = 230 + sin(a+angle) * (20 * player.mix.get(i+1) + 100);    
       float y2Final = 240 + sin(a+angle) * (20 * player.mix.get(i+1) + 100);    


       line(x,y,xFinal,yFinal);
       line(x2,y2,x2Final,y2Final);
       a += angle;  



     }
     noStroke();  
     fill(255, 0, 0, 128);
     for(int i = 0; i < 250; i++)
     {
       float b = fft.getBand(i);
       float yAxis = random(-b, b) + 480;
       float xAxis = i*3;
       ellipse(xAxis, yAxis, b, b);
     }
     saveFrame("frame-####.tif");
     if(frameCount>250)
       {
         noLoop();
         stop();
       }

    }

    void stop() {
     player.close();
     minim.stop();

     super.stop();
    }

    What I input into the command line (as one line) on the cmd :

    C:\Users\Robert\Documents\Processing\AudioVisulizer>ffmpeg -i C:\Users\Robert\Do
    cuments\Processing\AudioVisulizer\frame-%04d.tif -r 25 -pix_fmt yuv420p smallVid
    .mp4

    What it outputted :

       ffmpeg version N-77836-g62dfe1d Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 5.2.0 (GCC)
         configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
       isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
       le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
       enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
       ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
       le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
       able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
       ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
        --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
       e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
       enable-lzma --enable-decklink --enable-zlib
         libavutil      55. 13.100 / 55. 13.100
         libavcodec     57. 22.100 / 57. 22.100
         libavformat    57. 21.101 / 57. 21.101
         libavdevice    57.  0.100 / 57.  0.100
         libavfilter     6. 23.100 /  6. 23.100
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, image2, from 'C:\Users\Robert\Documents\Processing\AudioVisulizer\fram
       e-%04d.tif':
         Duration: 00:00:10.04, start: 0.000000, bitrate: N/A
           Stream #0:0: Video: tiff, rgb24, 728x546, 25 fps, 25 tbr, 25 tbn, 25 tbc
       [libx264 @ 00000092cd5e3700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
       AVX FMA3 AVX2 LZCNT BMI2
       [libx264 @ 00000092cd5e3700] profile High, level 3.0
       [libx264 @ 00000092cd5e3700] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC cod
       ec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 r
       ef=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_pski
       p=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 deci
       mate=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=2
       5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.6
       0 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
       Output #0, mp4, to 'smallVid.mp4':
         Metadata:
           encoder         : Lavf57.21.101
           Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 728x54
       6, q=-1--1, 25 fps, 12800 tbn, 25 tbc
           Metadata:
             encoder         : Lavc57.22.100 libx264
           Side data:
             unknown side data type 10 (24 bytes)
       Stream mapping:
         Stream #0:0 -> #0:0 (tiff (native) -> h264 (libx264))
       Press [q] to stop, [?] for help
       frame=   52 fps=0.0 q=28.0 size=      77kB time=00:00:00.00 bitrate=N/A speed=
       frame=   74 fps= 65 q=28.0 size=     127kB time=00:00:00.88 bitrate=1178.0kbits/
       frame=   93 fps= 57 q=28.0 size=     164kB time=00:00:01.64 bitrate= 820.0kbits/
       frame=  113 fps= 52 q=28.0 size=     201kB time=00:00:02.44 bitrate= 676.3kbits/
       frame=  136 fps= 51 q=28.0 size=     245kB time=00:00:03.36 bitrate= 596.3kbits/
       frame=  157 fps= 49 q=28.0 size=     282kB time=00:00:04.20 bitrate= 550.2kbits/
       frame=  178 fps= 48 q=28.0 size=     324kB time=00:00:05.04 bitrate= 527.2kbits/
       frame=  199 fps= 47 q=28.0 size=     362kB time=00:00:05.88 bitrate= 504.1kbits/
       frame=  219 fps= 46 q=28.0 size=     403kB time=00:00:06.68 bitrate= 494.2kbits/
       frame=  242 fps= 46 q=28.0 size=     452kB time=00:00:07.60 bitrate= 486.8kbits/
       frame=  251 fps= 38 q=-1.0 Lsize=     623kB time=00:00:09.96 bitrate= 512.3kbits
       /s speed=1.52x
       video:619kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
       verhead: 0.607807%
       [libx264 @ 00000092cd5e3700] frame I:2     Avg QP:21.74  size: 56596
       [libx264 @ 00000092cd5e3700] frame P:66    Avg QP:23.36  size:  2523
       [libx264 @ 00000092cd5e3700] frame B:183   Avg QP:31.50  size:  1932
       [libx264 @ 00000092cd5e3700] consecutive B-frames:  0.8%  4.0%  6.0% 89.2%
       [libx264 @ 00000092cd5e3700] mb I  I16..4: 10.9% 72.6% 16.5%
       [libx264 @ 00000092cd5e3700] mb P  I16..4:  0.0%  0.0%  0.2%  P16..4:  4.4%  2.3
       %  3.3%  0.0%  0.0%    skip:89.7%
       [libx264 @ 00000092cd5e3700] mb B  I16..4:  0.0%  0.0%  0.5%  B16..8:  3.2%  2.0
       %  2.3%  direct: 1.3%  skip:90.7%  L0:50.9% L1:42.2% BI: 7.0%
       [libx264 @ 00000092cd5e3700] 8x8 transform intra:50.2% inter:10.1%
       [libx264 @ 00000092cd5e3700] coded y,uvDC,uvAC intra: 83.4% 32.6% 14.2% inter: 3
       .5% 0.2% 0.0%
       [libx264 @ 00000092cd5e3700] i16 v,h,dc,p: 22%  8%  8% 62%
       [libx264 @ 00000092cd5e3700] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 12% 19%  6%  9%
        9%  9%  9%  9%
       [libx264 @ 00000092cd5e3700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 22%  6%  9%
        8%  8%  5%  6%
       [libx264 @ 00000092cd5e3700] i8c dc,h,v,p: 74% 12% 12%  2%
       [libx264 @ 00000092cd5e3700] Weighted P-Frames: Y:0.0% UV:0.0%
       [libx264 @ 00000092cd5e3700] ref P L0: 41.8%  3.9% 24.3% 30.0%
       [libx264 @ 00000092cd5e3700] ref B L0: 64.5% 25.0% 10.5%
       [libx264 @ 00000092cd5e3700] ref B L1: 82.2% 17.8%
       [libx264 @ 00000092cd5e3700] kb/s:504.56
  • ffmpeg video conversion from webm to mp4 is adding lag to the video

    21 janvier 2016, par Hemant Kumar

    Hi I am trying to convert video from .webm extension to .mp4 extension and it is adding lags to the video, also not showing me the full video.

    I am using following video conversion command.

    "ffmpeg -i {$input} -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ".fix_video_orientation($input)."' -threads 0 -ab 64k -s {$resolution}  -movflags faststart -metadata:s:v:0 rotate=0 {$output}";

    "fix_video_orientation" function is given below. It rotate the resulting video if video while recording is rotated to certain angle.

    function fix_video_orientation($input){

    $return= ", transpose=1 ";

    $dd= exec("ffprobe -of json -show_streams  {$input}   | grep rotate");

    if(!empty($dd)){

    $dd=explode(":",$dd);
    $rotate=str_replace(",","",str_replace('"',"",$dd[1]));

    if($rotate=="90")return $return;

    else if ($rotate=="180") return ", transpose=2,transpose=2 ";

    else if($rotate == "270") return ", transpose=2 ";
    }

    Currently above script is supporting "flv","avi","mp4","mkv","mpg","wmv","asf","webm","mov","3gp","3gpp" extensions, also the script is supporting the resulting .mp4 file to play on all browsers and devices.

    For query :

    ffmpeg -i <server path="path">/g9zyy2qg54qp1l5spo2-mergedFile.webm -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ' -threads 0 -ab 64k -s 640x480 -movflags faststart -metadata:s:v:0 rotate=0 <server path="path">/g9zyy2qg54qp1l5spo2-mergedFile5.mp4
    </server></server>

    Console output :

    ffmpeg version 2.2.5 Copyright (c) 2000-2014 the FFmpeg developers
     built on Aug  1 2014 09:24:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libtheora --enable-libx264 --enable-libvpx --enable-libmp3lame
     libavutil      52. 66.100 / 52. 66.100
     libavcodec     55. 52.102 / 55. 52.102
     libavformat    55. 33.100 / 55. 33.100
     libavdevice    55. 10.100 / 55. 10.100
     libavfilter     4.  2.100 /  4.  2.100
     libswscale      2.  5.102 /  2.  5.102
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, matroska,webm, from '<server path="path">/g9zyy2qg54qp1l5spo2-mergedFile.webm':
     Metadata:
       encoder         : Lavf55.33.100
     Duration: 00:00:13.53, start: 0.000000, bitrate: 387 kb/s
       Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp
       Stream #0:1: Video: vp8, yuv420p, 320x240, SAR 1:1 DAR 4:3, 1k fps, 1k tbr, 1k tbn, 1k tbc (default)
    [libx264 @ 0x38fcf40] using SAR=1/1
    [libx264 @ 0x38fcf40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x38fcf40] profile High, level 5.2
    [libx264 @ 0x38fcf40] 264 - core 142 r2453 ea0ca51 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=24 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=1 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=500 vbv_bufsize=1000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '<server path="path">/g9zyy2qg54qp1l5spo2-mergedFile5.mp4':
     Metadata:
       encoder         : Lavf55.33.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 500 kb/s, 16k tbn, 1k tbc (default)
       Metadata:
         rotate          : 0
       Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 64 kb/s
    Stream mapping:
     Stream #0:1 -> #0:0 (vp8 -> libx264)
     Stream #0:0 -> #0:1 (vorbis -> aac)
    Press [q] to stop, [?] for help
    frame=  358 fps=0.0 q=39.0 size=      27kB time=00:00:00.74 bitrate= 295.4kbits/frame=  723 fps=691 q=41.0 size=      57kB time=00:00:01.39 bitrate= 335.1kbits/frame= 1410 fps=706 q=45.0 size=     108kB time=00:00:01.74 bitrate= 509.0kbits/frame= 1777 fps=710 q=45.0 size=     134kB time=00:00:02.13 bitrate= 512.7kbits/frame= 2126 fps=707 q=45.0 size=     164kB time=00:00:02.50 bitrate= 535.0kbits/frame= 2497 fps=710 q=45.0 size=     191kB time=00:00:02.85 bitrate= 547.8kbits/frame= 2869 fps=708 q=45.0 size=     225kB time=00:00:03.20 bitrate= 575.7kbits/frame= 3226 fps=707 q=45.0 size=     250kB time=00:00:03.59 bitrate= 568.2kbits/frame= 3586 fps=709 q=46.0 size=     282kB time=00:00:03.94 bitrate= 585.7kbits/frame= 3956 fps=710 q=45.0 size=     305kB time=00:00:04.59 bitrate= 543.8kbits/frame= 4358 fps=710 q=46.0 size=     340kB time=00:00:04.71 bitrate= 591.1kbits/frame= 4751 fps=712 q=45.0 size=     362kB time=00:00:05.10 bitrate= 581.3kbits/frame= 5133 fps=713 q=45.0 size=     393kB time=00:00:05.50 bitrate= 584.9kbits/frame= 5510 fps=715 q=45.0 size=     416kB time=00:00:05.89 bitrate= 578.5kbits/frame= 5880 fps=715 q=45.0 size=     448kB time=00:00:06.24 bitrate= 587.6kbits/frame= 6250 fps=715 q=45.0 size=     472kB time=00:00:06.64 bitrate= 582.3kbits/frame= 6651 fps=715 q=45.0 size=     501kB time=00:00:06.98 bitrate= 587.1kbits/frame= 7012 fps=713 q=50.0 size=     524kB time=00:00:07.68 bitrate= 559.0kbits/frame= 7396 fps=714 q=45.0 size=     551kB time=00:00:07.75 bitrate= 582.5kbits/frame= 7771 fps=714 q=47.0 size=     575kB time=00:00:08.10 bitrate= 581.1kbits/frame= 8139 fps=714 q=50.0 size=     604kB time=00:00:08.52 bitrate= 580.8kbits/frame= 8509 fps=715 q=46.0 size=     628kB time=00:00:08.87 bitrate= 580.4kbits/frame= 8885 fps=715 q=46.0 size=     655kB time=00:00:09.19 bitrate= 583.1kbits/frame= 9233 fps=714 q=46.0 size=     677kB time=00:00:09.54 bitrate= 581.2kbits/frame= 9603 fps=714 q=46.0 size=     706kB time=00:00:09.96 bitrate= 580.6kbits/frame= 9975 fps=714 q=46.0 size=     728kB time=00:00:10.65 bitrate= 559.8kbits/frame=10376 fps=715 q=46.0 size=     757kB time=00:00:10.75 bitrate= 577.0kbits/frame=10730 fps=714 q=46.0 size=     780kB time=00:00:11.07 bitrate= 577.1kbits/frame=11090 fps=713 q=47.0 size=     808kB time=00:00:11.42 bitrate= 579.7kbits/frame=11447 fps=713 q=46.0 size=     832kB time=00:00:11.79 bitrate= 578.0kbits/frame=11802 fps=712 q=48.0 size=     858kB time=00:00:12.14 bitrate= 578.5kbits/frame=12181 fps=713 q=46.0 size=     880kB time=00:00:12.51 bitrate= 576.3kbits/frame=12563 fps=713 q=46.0 size=     908kB time=00:00:12.95 bitrate= 573.9kbits/frame=13527 fps=715 q=46.0 size=     960kB time=-577014:-32:-22.-77 bitrate=N/A [mp4 @ 0x3912e00] Starting second pass: moving the moov atom to the beginning of the file
    frame=13527 fps=713 q=-1.0 Lsize=    1139kB time=00:00:13.52 bitrate= 689.8kbits/s dup=13036 drop=0    
    video:863kB audio:107kB subtitle:0 data:0 global headers:0kB muxing overhead 17.479137%
    [libx264 @ 0x38fcf40] frame I:55    Avg QP:33.13  size:  6072
    [libx264 @ 0x38fcf40] frame P:3409  Avg QP:32.90  size:    95
    [libx264 @ 0x38fcf40] frame B:10063 Avg QP:39.74  size:    22
    [libx264 @ 0x38fcf40] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
    [libx264 @ 0x38fcf40] mb I  I16..4: 25.7% 69.5%  4.8%
    [libx264 @ 0x38fcf40] mb P  I16..4:  0.2%  0.2%  0.0%  P16..4:  1.4%  0.1%  0.4%  0.0%  0.0%    skip:97.7%
    [libx264 @ 0x38fcf40] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.3%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0:41.0% L1:58.9% BI: 0.0%
    [libx264 @ 0x38fcf40] 8x8 transform intra:67.9% inter:94.6%
    [libx264 @ 0x38fcf40] direct mvs  spatial:86.6% temporal:13.4%
    [libx264 @ 0x38fcf40] coded y,uvDC,uvAC intra: 36.1% 36.9% 1.7% inter: 0.1% 0.1% 0.0%
    [libx264 @ 0x38fcf40] i16 v,h,dc,p: 32% 27%  9% 31%
    [libx264 @ 0x38fcf40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 13% 18%  7%  7%  8%  8%  9%  8%
    [libx264 @ 0x38fcf40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 16%  7%  7%  9% 10%  9%  7%  8%
    [libx264 @ 0x38fcf40] i8c dc,h,v,p: 73% 14%  9%  4%
    [libx264 @ 0x38fcf40] Weighted P-Frames: Y:0.6% UV:0.0%
    [libx264 @ 0x38fcf40] ref P L0: 77.5% 12.2%  9.1%  0.9%  0.2%  0.0%
    [libx264 @ 0x38fcf40] ref B L0: 86.6% 13.2%  0.2%  0.0%
    [libx264 @ 0x38fcf40] ref B L1: 89.8% 10.2%
    [libx264 @ 0x38fcf40] kb/s:522.05
    </server></server>
  • FFmpeg - mapping 4 audio channels to 1 audio track

    18 juillet 2016, par Avalon

    I have two QT MOV’s that I want to concatenate using FFmpeg, but I am having trouble understanding how to map the audio channels.

    First MOV has 2 channels, Front Left and Front Right. Second MOV has 4 channels, Front Left, Front Right, Side Left and Side Right.

    How do I create 1 audio track with 4 channels mapped as FL, FR, SL and SR ?

    MediaInfo reports the following (not desired result) :

    Audio #1
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 4mn 35s
    Bit rate mode                            : Variable
    Bit rate                                 : 126 Kbps
    Maximum bit rate                         : 160 Kbps
    Channel(s)                               : 2 channels
    Channel(s)_Original                      : 4 channels
    Channel positions                        : Front: L C R, Side: C
    Sampling rate                            : 48.0 KHz
    Frame rate                               : 46.875 fps (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 4.14 MiB (12%)
    Default                                  : Yes
    Alternate group                          : 1

    Audio #2
    ID                                       : 3
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 4mn 35s
    Bit rate mode                            : Variable
    Bit rate                                 : 127 Kbps
    Maximum bit rate                         : 160 Kbps
    Channel(s)                               : 2 channels
    Channel(s)_Original                      : 4 channels
    Channel positions                        : Front: L C R, Side: C
    Sampling rate                            : 48.0 KHz
    Frame rate                               : 46.875 fps (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 4.18 MiB (12%)
    Default                                  : No
    Alternate group                          : 1

    Audio #3
    ID                                       : 4
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 4mn 35s
    Bit rate mode                            : Variable
    Bit rate                                 : 110 Kbps
    Maximum bit rate                         : 160 Kbps
    Channel(s)                               : 2 channels
    Channel(s)_Original                      : 4 channels
    Channel positions                        : Front: L C R, Side: C
    Sampling rate                            : 48.0 KHz
    Frame rate                               : 46.875 fps (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 3.62 MiB (10%)
    Default                                  : No
    Alternate group                          : 1

    Audio #4
    ID                                       : 5
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 4mn 35s
    Bit rate mode                            : Variable
    Bit rate                                 : 110 Kbps
    Maximum bit rate                         : 160 Kbps
    Channel(s)                               : 2 channels
    Channel(s)_Original                      : 4 channels
    Channel positions                        : Front: L C R, Side: C
    Sampling rate                            : 48.0 KHz
    Frame rate                               : 46.875 fps (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 3.61 MiB (10%)
    Default                                  : No
    Alternate group                          : 1

    FFmpeg command is as follows :

    `ffmpeg -i "2chan.mov" -i "4chan.mov" -filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]; [v]scale=-1:288[v2]; [a]channelsplit=channel_layout=quad(side)[FL][FR][SL][SR]" -map "[v2]" -map "[FL]" -map "[FR]" -map "[SL]" -map "[SR]" -c:v libx264 -pix_fmt yuv420p -b:v 700k -minrate 700k -maxrate 700k -bufsize 700k -r 25 -sc_threshold 25 -keyint_min 25 -g 25 -qmin 3 -qmax 51 -threads 8 -c:a aac -strict -2 -b:a 160k -ar 48000 -async 1 -ac 4 combined.mp4`

    Console output :

     ffmpeg version N-77883-gd7c75a5 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 5.2.0 (GCC)
         configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
       isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
       le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
       enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
       ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
       le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
       able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
       ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
        --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
       e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
       enable-lzma --enable-decklink --enable-zlib
         libavutil      55. 13.100 / 55. 13.100
         libavcodec     57. 22.100 / 57. 22.100
         libavformat    57. 21.101 / 57. 21.101
         libavdevice    57.  0.100 / 57.  0.100
         libavfilter     6. 25.100 /  6. 25.100
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000575c00] ignoring 'frma' atom of 'mp4a', str
    eam format is 'mp4a'
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2chan.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2016-01-19 05:48:38
     Duration: 00:00:45.00, start: 0.000000, bitrate: 364 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte1
    70m/smpte170m/bt709), 768x576, 196 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 25 tbn
    , 50 tbc (default)
       Metadata:
         creation_time   : 2016-01-19 05:48:40
         handler_name    : Apple Alias Data Handler
         encoder         : H.264
         timecode        : 00:00:00:00
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt
    p, 159 kb/s (default)
       Metadata:
         creation_time   : 2016-01-19 05:48:42
         handler_name    : Apple Alias Data Handler
         timecode        : 00:00:00:00
       Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2016-01-19 05:49:42
         handler_name    : Apple Alias Data Handler
         timecode        : 00:00:00:00
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000005da420] ignoring 'frma' atom of 'mp4a', str
    eam format is 'mp4a'
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '4chan.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2016-01-19 04:11:52
     Duration: 00:19:58.00, start: 0.000000, bitrate: 5118 kb/s
       Stream #1:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte1
    70m/smpte170m/bt709), 768x576, 4955 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (defa
    ult)
       Metadata:
         creation_time   : 2016-01-19 04:11:52
         handler_name    : Apple Alias Data Handler
         encoder         : H.264
         timecode        : 00:28:33:21
       Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, quad, fltp,
    157 kb/s (default)
       Metadata:
         creation_time   : 2016-01-19 04:11:52
         handler_name    : Apple Alias Data Handler
       Stream #1:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
       Metadata:
         rotate          : 0
         creation_time   : 2016-01-19 04:11:52
         handler_name    : Apple Alias Data Handler
         timecode        : 00:28:33:21
    File 'Output_Complex_6.mp4' already exists. Overwrite ? [y/N] y
    -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.
    100000:first_pts=0.
       Last message repeated 1 times
    [libx264 @ 000000000057d260] using SAR=1/1
    [libx264 @ 000000000057d260] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
    SlowShuffle
    [libx264 @ 000000000057d260] profile High, level 2.1
    [libx264 @ 000000000057d260] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC cod
    ec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 r
    ef=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_pski
    p=1 chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 deci
    mate=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=25 keyint_min=13
    scenecut=25 intra_refresh=0 rc_lookahead=25 rc=cbr mbtree=1 bitrate=700 ratetol
    =1.0 qcomp=0.60 qpmin=3 qpmax=51 qpstep=4 vbv_maxrate=700 vbv_bufsize=700 nal_hr
    d=none filler=0 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'Output_Complex_6.mp4':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       title           : TestTitle
       encoder         : Lavf57.21.101
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 384x28
    8 [SAR 1:1 DAR 4:3], q=3-51, 700 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.22.100 libx264
       Side data:
         unknown side data type 10 (24 bytes)
       Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, 4.0, fltp,
    160 kb/s
       Metadata:
         encoder         : Lavc57.22.100 aac
       Stream #0:2: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, 4.0, fltp,
    160 kb/s
       Metadata:
         encoder         : Lavc57.22.100 aac
       Stream #0:3: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, 4.0, fltp,
    160 kb/s
       Metadata:
         encoder         : Lavc57.22.100 aac
       Stream #0:4: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, 4.0, fltp,
    160 kb/s
       Metadata:
         encoder         : Lavc57.22.100 aac
    Stream mapping:
     Stream #0:0 (h264) -> concat:in0:v0
     Stream #0:1 (aac) -> concat:in0:a0
     Stream #1:0 (h264) -> concat:in1:v0
     Stream #1:1 (aac) -> concat:in1:a0
     scale -> Stream #0:0 (libx264)
     channelsplit:FL -> Stream #0:1 (aac)
     channelsplit:FR -> Stream #0:2 (aac)
     channelsplit:SL -> Stream #0:3 (aac)
     channelsplit:SR -> Stream #0:4 (aac)
    Press [q] to stop, [?] for help
    frame=   85 fps=0.0 q=3.0 size=       6kB time=00:00:02.68 bitrate=  18.8kbits/s
    frame=  150 fps=148 q=3.0 size=      14kB time=00:00:05.24 bitrate=  21.3kbits/s
    frame=  198 fps=130 q=3.0 size=      65kB time=00:00:07.21 bitrate=  74.4kbits/s
    frame=  238 fps=118 q=3.0 size=     125kB time=00:00:08.78 bitrate= 116.2kbits/s
    frame=  271 fps=108 q=3.0 size=     171kB time=00:00:10.09 bitrate= 138.9kbits/s
    frame=  304 fps=100 q=3.0 size=     218kB time=00:00:11.45 bitrate= 156.0kbits/s
    frame=  339 fps= 96 q=3.0 size=     268kB time=00:00:12.84 bitrate= 171.0kbits/s
    frame=  372 fps= 93 q=-1.0 Lsize=     376kB time=00:00:14.80 bitrate= 208.0kbits
    /s speed=3.69x
    video:27kB audio:319kB subtitle:0kB other streams:0kB global headers:0kB muxing
    overhead: 8.551113%
    [libx264 @ 000000000057d260] frame I:15    Avg QP: 3.01  size:  1370
    [libx264 @ 000000000057d260] frame P:90    Avg QP: 3.00  size:    24
    [libx264 @ 000000000057d260] frame B:267   Avg QP: 3.00  size:    17
    [libx264 @ 000000000057d260] consecutive B-frames:  4.3%  0.0%  0.0% 95.7%
    [libx264 @ 000000000057d260] mb I  I16..4: 95.8%  0.0%  4.2%
    [libx264 @ 000000000057d260] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.1%  0.0
    %  0.0%  0.0%  0.0%    skip:99.9%
    [libx264 @ 000000000057d260] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0
    %  0.0%  direct: 0.0%  skip:100.0%  L0: 0.0% L1:100.0% BI: 0.0%
    [libx264 @ 000000000057d260] 8x8 transform intra:0.0% inter:50.0%
    [libx264 @ 000000000057d260] coded y,uvDC,uvAC intra: 3.1% 8.8% 8.2% inter: 0.0%
    0.0% 0.0%
    [libx264 @ 000000000057d260] i16 v,h,dc,p: 90%  5%  5%  0%
    [libx264 @ 000000000057d260] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 29% 23%  0%  0%
    0%  0%  0%  0%
    [libx264 @ 000000000057d260] i8c dc,h,v,p: 76%  7% 17%  0%
    [libx264 @ 000000000057d260] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 000000000057d260] kb/s:14.64
    [aac @ 0000000000578320] Qavg: 65394.652
    [aac @ 0000000000593020] Qavg: 65473.359
    [aac @ 0000000000593940] Qavg: 65536.000
    [aac @ 0000000000594260] Qavg: 65536.000
    Exiting normally, received signal 2.
    Terminate batch job (Y/N)? Y