Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (32)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • 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

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (7792)

  • ffmpeg concat with video using image background

    16 janvier 2018, par ant-C

    Ffmpeg does not concat the media files correctly using various testing. One of the videos is a .mp4 (h264 codec) video generated previously using a .mp3 and a jpeg background. I’ve tried testing with various flags, closest I’ve gotten is below for the final output.

    My main issue is the final video with the current test, the audio is about 3 seconds delayed once the two videos are stitched together.

    Here are all the files I’m using :

    Input Files :

    Output Files :

    files.txt

    file ’/tmp/new_image_video.mp4’

    file ’/tmp/main_video.mp4’

    Image Video Creation :

    ffmpeg -loop 1 -i /tmp/image.jpg -i /tmp/audio.mp3 -acodec libfdk_aac -framerate 30 -vcodec libx264 -shortest /tmp/new_image_video_raw.mp4

    Part two :

    ffmpeg -threads 0 -i /tmp/new_image_video_raw.mp4 -vf "scale=w=560:h=320:force_original_aspect_ratio=decrease, pad=560:320:(560-iw*min(560/iw\,320/ih))/2:(320-ih*min(560/iw\,320/ih))/2" -acodec libfdk_aac -af aresample=resampler=soxr -qp 20 -ar 44100 -r 30 -ab 128k -ac 1 -vcodec libx264 -max_muxing_queue_size 9999 -shortest -movflags +faststart /tmp/new_image_video.mp4 -y

    Main Video Transcode :

    ffmpeg -i /tmp/main_video_raw.mp4 -vf "scale=iw*min(560/iw\,320/ih):ih*min(560/iw\,320/ih), pad=560:320:(560-iw*min(560/iw\,320/ih))/2:(320-ih*min(560/iw\,320/ih))/2" -acodec libfdk_aac -af aresample=resampler=soxr -ar 44100 -aspect 16:9 -qp 20  -framerate 30 -ab 128k -ac 1 -vcodec libx264 -max_muxing_queue_size 9999 -movflags +faststart /tmp/main_video.mp4 -y

    Concat Video :

    ffmpeg -threads 0 -f concat -safe 0 -i /tmp/files.txt -vf "scale=iw*min(560/iw\,320/ih):ih*min(560/iw\,320/ih), pad=560:320:(560-iw*min(560/iw\,320/ih))/2:(320-ih*min(560/iw\,320/ih))/2" -preset veryslow -crf 15 -acodec libfdk_aac -af aresample=resampler=soxr -ar 44100 -aspect 16:9 -qp 20  -framerate 30 -ab 128k -ac 1 -vcodec libx264 -max_muxing_queue_size 9999 -movflags +faststart /tmp/final_output_video.mp4 -y

    Output for new_image_video.mp4

    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
     Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [libx264 @ 0x150ce00] using SAR=1/1
    [libx264 @ 0x150ce00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x150ce00] profile High, level 2.1
    [libx264 @ 0x150ce00] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:-3:-3 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=2.00:0.70 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-4 threads=10 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=1 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.20
    Output #0, mp4, to '/tmp/new_image_video.mp4':
     Metadata:
       encoder         : Lavf57.76.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 560x320 [SAR 1:1 DAR 7:4], q=-1--1, 1 fps, 16384 tbn, 1 tbc
       Metadata:
         encoder         : Lavc57.102.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1: Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, s16p, 157 kb/s
       Metadata:
         encoder         : Lavc56.41
    frame=   73 fps=0.0 q=17.0 Lsize=     362kB time=00:00:16.00 bitrate= 185.3kbits/s speed=88.6x
    video:49kB audio:308kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166542%
    [libx264 @ 0x150ce00] frame I:1     Avg QP: 4.09  size: 38729
    [libx264 @ 0x150ce00] frame P:18    Avg QP: 5.77  size:   843
    [libx264 @ 0x150ce00] frame B:54    Avg QP: 0.64  size:    49
    [libx264 @ 0x150ce00] consecutive B-frames:  1.4%  0.0%  0.0% 98.6%
    [libx264 @ 0x150ce00] mb I  I16..4: 54.6% 18.9% 26.6%
    [libx264 @ 0x150ce00] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  9.1%  0.1%  0.5%  0.0%  0.0%    skip:90.3%
    [libx264 @ 0x150ce00] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  2.6%  0.0%  0.0%  direct: 0.0%  skip:97.4%  L0:69.1% L1:30.9% BI: 0.0%
    [libx264 @ 0x150ce00] 8x8 transform intra:18.9% inter:59.9%
    [libx264 @ 0x150ce00] coded y,uvDC,uvAC intra: 44.1% 45.3% 45.0% inter: 1.4% 0.0% 0.0%
    [libx264 @ 0x150ce00] i16 v,h,dc,p: 91%  2%  6%  1%
    [libx264 @ 0x150ce00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 18% 18%  8%  5%  6%  7%  9%  7%
    [libx264 @ 0x150ce00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 16%  8%  7% 10%  9% 10%  9%  9%
    [libx264 @ 0x150ce00] i8c dc,h,v,p: 71% 12% 12%  5%
    [libx264 @ 0x150ce00] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x150ce00] ref P L0: 79.3%  0.1% 19.5%  1.1%
    [libx264 @ 0x150ce00] ref B L0: 68.3% 30.5%  1.2%
    [libx264 @ 0x150ce00] ref B L1: 98.4%  1.6%
    [libx264 @ 0x150ce00] kb/s:6.20

    Output for new_image_video.mp4 (Part 2)

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/new_image_video_raw.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.76.100
     Duration: 00:00:19.00, start: 0.000000, bitrate: 156 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 560x320 [SAR 1:1 DAR 7:4], 21 kb/s, 1 fps, 1 tbr, 16384 tbn, 2 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, s16p, 157 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (mp3 (native) -> aac (libfdk_aac))
    Press [q] to stop, [?] for help
    [libx264 @ 0x2175560] using SAR=1/1
    [libx264 @ 0x2175560] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x2175560] profile High, level 3.0
    [libx264 @ 0x2175560] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=10 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=cqp mbtree=0 qp=20 ip_ratio=1.40 pb_ratio=1.30 aq=0
    Output #0, mp4, to '/tmp/new_image_video.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.76.100
       Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 560x320 [SAR 1:1 DAR 7:4], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc57.102.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, mono, s16, 128 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc57.102.100 libfdk_aac
    [mp4 @ 0x2150cc0] Starting second pass: moving the moov atom to the beginning of the file drop=0 speed=31.6x
    frame=  569 fps=0.0 q=-1.0 Lsize=     351kB time=00:00:18.86 bitrate= 152.3kbits/s dup=579 drop=0 speed=32.5x
    video:81kB audio:251kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.851973%
    [libx264 @ 0x2175560] frame I:3     Avg QP:17.00  size: 23393
    [libx264 @ 0x2175560] frame P:143   Avg QP:20.00  size:    26
    [libx264 @ 0x2175560] frame B:423   Avg QP:21.67  size:    19
    [libx264 @ 0x2175560] consecutive B-frames:  0.9%  0.0%  0.0% 99.1%
    [libx264 @ 0x2175560] mb I  I16..4: 54.7% 26.0% 19.4%
    [libx264 @ 0x2175560] 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 @ 0x2175560] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.2%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0:23.7% L1:76.3% BI: 0.0%
    [libx264 @ 0x2175560] 8x8 transform intra:26.0% inter:14.0%
    [libx264 @ 0x2175560] coded y,uvDC,uvAC intra: 39.8% 44.1% 43.4% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0x2175560] i16 v,h,dc,p: 91%  3%  5%  1%
    [libx264 @ 0x2175560] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 17% 15%  8%  6%  9%  6%  8%  8%
    [libx264 @ 0x2175560] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17%  6%  7% 10%  9% 11% 10%  9%
    [libx264 @ 0x2175560] i8c dc,h,v,p: 71% 11% 13%  5%
    [libx264 @ 0x2175560] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x2175560] ref P L0: 95.4%  0.7%  3.9%
    [libx264 @ 0x2175560] ref B L0: 44.6% 55.4%
    [libx264 @ 0x2175560] ref B L1: 98.3%  1.7%
    [libx264 @ 0x2175560] kb/s:34.62

    Output for main_video.mp4

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/main_video_raw.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 1970-01-01T00:00:00.000000Z
       encoder         : Lavf53.24.2
     Duration: 00:01:02.32, start: 0.000000, bitrate: 1347 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
    Press [q] to stop, [?] for help
    [libx264 @ 0x758900] using SAR=64/63
    [libx264 @ 0x758900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x758900] profile High, level 2.1
    [libx264 @ 0x758900] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=10 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=cqp mbtree=0 qp=20 ip_ratio=1.40 pb_ratio=1.30 aq=0
    Output #0, mp4, to '/tmp/main_video.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.76.100
       Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 560x320 [SAR 64:63 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : VideoHandler
         encoder         : Lavc57.102.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, mono, s16, 128 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : SoundHandler
         encoder         : Lavc57.102.100 libfdk_aac
    [mp4 @ 0x755900] Starting second pass: moving the moov atom to the beginning of the file11.1x
    frame= 1557 fps=275 q=-1.0 Lsize=    5144kB time=00:01:02.32 bitrate= 676.1kbits/s speed=  11x
    video:4119kB audio:975kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.989500%
    [libx264 @ 0x758900] frame I:13    Avg QP:17.00  size: 34937
    [libx264 @ 0x758900] frame P:657   Avg QP:20.00  size:  3546
    [libx264 @ 0x758900] frame B:887   Avg QP:21.69  size:  1615
    [libx264 @ 0x758900] consecutive B-frames: 18.9% 12.6%  8.1% 60.4%
    [libx264 @ 0x758900] mb I  I16..4: 12.5% 51.8% 35.7%
    [libx264 @ 0x758900] mb P  I16..4:  0.2%  1.9%  1.0%  P16..4: 17.9%  9.3%  8.4%  0.0%  0.0%    skip:61.3%
    [libx264 @ 0x758900] mb B  I16..4:  0.1%  0.3%  0.3%  B16..8: 18.0%  5.6%  2.4%  direct: 2.8%  skip:70.6%  L0:33.9% L1:42.5% BI:23.6%
    [libx264 @ 0x758900] 8x8 transform intra:55.4% inter:56.4%
    [libx264 @ 0x758900] coded y,uvDC,uvAC intra: 84.0% 93.3% 75.0% inter: 12.6% 14.9% 3.3%
    [libx264 @ 0x758900] i16 v,h,dc,p:  8% 38%  3% 51%
    [libx264 @ 0x758900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 20%  8%  7%  9%  9% 10% 10% 11%
    [libx264 @ 0x758900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 20%  9%  8% 11% 10% 10%  9%  9%
    [libx264 @ 0x758900] i8c dc,h,v,p: 41% 26% 17% 16%
    [libx264 @ 0x758900] Weighted P-Frames: Y:0.2% UV:0.0%
    [libx264 @ 0x758900] ref P L0: 72.3% 14.4%  9.7%  3.6%  0.0%
    [libx264 @ 0x758900] ref B L0: 89.9%  7.7%  2.4%
    [libx264 @ 0x758900] ref B L1: 97.1%  2.9%
    [libx264 @ 0x758900] kb/s:541.66

    Outupt for concat :

    ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
     configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-version3 --disable-debug --enable-shared --enable-runtime-cpudetect --enable-postproc --enable-pic --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libass --enable-libvidstab --enable-libsoxr --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libwebp --enable-fontconfig --enable-libspeex --enable-nonfree
     libavutil      55. 73.100 / 55. 73.100
     libavcodec     57.102.100 / 57.102.100
     libavformat    57. 76.100 / 57. 76.100
     libavdevice    57.  7.100 / 57.  7.100
     libavfilter     6. 98.100 /  6. 98.100
     libswscale      4.  7.102 /  4.  7.102
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/main_video.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 1970-01-01T00:00:00.000000Z
       encoder         : Lavf53.24.2
     Duration: 00:01:02.32, start: 0.000000, bitrate: 1347 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
    Press [q] to stop, [?] for help
    [libx264 @ 0x1563900] using SAR=64/63
    [libx264 @ 0x1563900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x1563900] profile High, level 2.1
    [libx264 @ 0x1563900] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=10 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=cqp mbtree=0 qp=20 ip_ratio=1.40 pb_ratio=1.30 aq=0
    Output #0, mp4, to '/tmp/new_image_video.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.76.100
       Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 560x320 [SAR 64:63 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : VideoHandler
         encoder         : Lavc57.102.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(und): Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 44100 Hz, mono, s16, 128 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : SoundHandler
         encoder         : Lavc57.102.100 libfdk_aac
    [mp4 @ 0x1560900] Starting second pass: moving the moov atom to the beginning of the file1.2x
    frame= 1557 fps=277 q=-1.0 Lsize=    5144kB time=00:01:02.32 bitrate= 676.1kbits/s speed=11.1x
    video:4119kB audio:975kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.989500%
    [libx264 @ 0x1563900] frame I:13    Avg QP:17.00  size: 34937
    [libx264 @ 0x1563900] frame P:657   Avg QP:20.00  size:  3546
    [libx264 @ 0x1563900] frame B:887   Avg QP:21.69  size:  1615
    [libx264 @ 0x1563900] consecutive B-frames: 18.9% 12.6%  8.1% 60.4%
    [libx264 @ 0x1563900] mb I  I16..4: 12.5% 51.8% 35.7%
    [libx264 @ 0x1563900] mb P  I16..4:  0.2%  1.9%  1.0%  P16..4: 17.9%  9.3%  8.4%  0.0%  0.0%    skip:61.3%
    [libx264 @ 0x1563900] mb B  I16..4:  0.1%  0.3%  0.3%  B16..8: 18.0%  5.6%  2.4%  direct: 2.8%  skip:70.6%  L0:33.9% L1:42.5% BI:23.6%
    [libx264 @ 0x1563900] 8x8 transform intra:55.4% inter:56.4%
    [libx264 @ 0x1563900] coded y,uvDC,uvAC intra: 84.0% 93.3% 75.0% inter: 12.6% 14.9% 3.3%
    [libx264 @ 0x1563900] i16 v,h,dc,p:  8% 38%  3% 51%
    [libx264 @ 0x1563900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 20%  8%  7%  9%  9% 10% 10% 11%
    [libx264 @ 0x1563900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 20%  9%  8% 11% 10% 10%  9%  9%
    [libx264 @ 0x1563900] i8c dc,h,v,p: 41% 26% 17% 16%
    [libx264 @ 0x1563900] Weighted P-Frames: Y:0.2% UV:0.0%
    [libx264 @ 0x1563900] ref P L0: 72.3% 14.4%  9.7%  3.6%  0.0%
    [libx264 @ 0x1563900] ref B L0: 89.9%  7.7%  2.4%
    [libx264 @ 0x1563900] ref B L1: 97.1%  2.9%
    [libx264 @ 0x1563900] kb/s:541.66
  • FFmpeg : Green images from TS file

    5 septembre 2017, par Tatsiana

    I use ffmpeg to generate images from a TS file and at some places it generates green images. I checked a couple of ffmpeg versions. The issue reproduces on
    3.3.3, 2.8.11, 2.7.7, but doesn’t on 2.6.9.
    What might be the reason ?

    For example, the output of 2.8.11 :

        $ ffmpeg -ss 00:42:20 -i video.ts -frames:v 1 out_42_20.jpg -loglevel debug
        ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
          built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1 16.04.4) 20160609
          configuration : —prefix=/usr —extra-version=0ubuntu0.16.04.1 —build-suffix=-ffmpeg —toolchain=hardened —libdir=/usr/lib/x86_64-linux-=/usr/include/x86_64-linux-gnu —cc=cc —cxx=g++ —enable-gpl —enable-shared —disable-stripping —disable-decoder=libopenjpeg —disable-dhroedinger —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enab-enable-libcdio —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable—enable-libmp3lame —enable-libopenjpeg —enable-libopus —enable-libpulse —enable-librtmp —enable-libschroedinger —enable-libshine —enpy —enable-libsoxr —enable-libspeex —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvorbis —enable-libvpx —enable-linable-libwebp —enable-libx265 —enable-libxvid —enable-libzvbi —enable-openal —enable-opengl —enable-x11grab —enable-libdc1394 —enab83 —enable-libzmq —enable-frei0r —enable-libx264 —enable-libopencv
          libavutil      54. 31.100 / 54. 31.100
          libavcodec     56. 60.100 / 56. 60.100
          libavformat    56. 40.101 / 56. 40.101
          libavdevice    56.  4.100 / 56.  4.100
          libavfilter     5. 40.101 /  5. 40.101
          libavresample   2.  1.  0 /  2.  1.  0
          libswscale      3.  1.101 /  3.  1.101
          libswresample   1.  2.101 /  1.  2.101
          libpostproc    53.  3.100 / 53.  3.100
        Splitting the commandline.
        Reading option ’-ss’ ... matched as option ’ss’ (set the start time offset) with argument ’00:42:20’.
        Reading option ’-i’ ... matched as input url with argument ’video.ts’.
        Reading option ’-frames:v’ ... matched as option ’frames’ (set the number of frames to output) with argument ’1’.
        Reading option ’out_42_20.jpg’ ... matched as output url.
        Reading option ’-loglevel’ ... matched as option ’loglevel’ (set logging level) with argument ’debug’.
        Finished splitting the commandline.
        Parsing a group of options : global .
        Applying option loglevel (set logging level) with argument debug.
        Successfully parsed a group of options.
        Parsing a group of options : input url video.ts.
        Applying option ss (set the start time offset) with argument 00:42:20.
        Successfully parsed a group of options.
        Opening an input file : video.ts.
        [mpegts @ 0x22ba400] Format mpegts probed with size=2048 and score=100
        [mpegts @ 0x22ba400] stream=0 stream_type=1b pid=1e1 prog_reg_desc=
        [mpegts @ 0x22ba400] stream=1 stream_type=f pid=1e2 prog_reg_desc=
        [mpegts @ 0x22ba400] stream=2 stream_type=6 pid=1e3 prog_reg_desc=
        [mpegts @ 0x22ba400] Before avformat_find_stream_info() pos : 0 bytes read:32768 seeks:0
        [h264 @ 0x22be840] no picture
        [mpegts @ 0x22ba400] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
        [mpegts @ 0x22ba400] stream 0 : no PTS found at end of file, duration not set
        [mpegts @ 0x22ba400] After avformat_find_stream_info() pos : 0 bytes read:4026800 seeks:3 frames:550
        Input #0, mpegts, from ’video.ts’ :
          Duration : 02:15:27.97, start : 1.079989, bitrate : 4983 kb/s
          Program 1
            Stream #0:0[0x1e1], 216, 1/90000 : Video : h264 (High), 4 reference frames ([27][0][0][0] / 0x001B), yuv420p(left), 1920x1080 (1920x1088)R 16:9], 1/50, 25 fps, 50 tbr, 90k tbn, 50 tbc
            Stream #0:1[0x1e2](und), 203, 1/90000 : Audio : aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 127 kb/s
            Stream #0:2[0x1e3](und), 131, 1/90000 : Audio : ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side), fltp, 384 kb/s
        Successfully opened the file.
        Parsing a group of options : output url out_42_20.jpg.
        Applying option frames:v (set the number of frames to output) with argument 1.
        Successfully parsed a group of options.
        Opening an output file : out_42_20.jpg.
        Successfully opened the file.
        detected 1 logical cores
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’video_size’ to value ’1920x1080’
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’pix_fmt’ to value ’0’
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’time_base’ to value ’1/90000’
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’pixel_aspect’ to value ’1/1’
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’sws_param’ to value ’flags=2’
        [graph 0 input from stream 0:0 @ 0x22ba280] Setting ’frame_rate’ to value ’25/1’
        [graph 0 input from stream 0:0 @ 0x22ba280] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:1/1 sws_param:flags=2
        [format @ 0x2328360] compat : called with args=[yuvj420p|yuvj422p|yuvj444p]
        [format @ 0x2328360] Setting ’pix_fmts’ to value ’yuvj420p|yuvj422p|yuvj444p’
        [auto-inserted scaler 0 @ 0x2326600] Setting ’flags’ to value ’bicubic’
        [auto-inserted scaler 0 @ 0x2326600] w:iw h:ih flags :’bicubic’ interl:0
        [format @ 0x2328360] auto-inserting filter ’auto-inserted scaler 0’ between the filter ’Parsed_null_0’ and the filter ’format’
        [AVFilterGraph @ 0x2327ba0] query_formats : 5 queried, 3 merged, 1 already done, 0 delayed
        [auto-inserted scaler 0 @ 0x2326600] picking yuvj420p out of 3 ref:yuv420p alpha:0
        [swscaler @ 0x2310660] deprecated pixel format used, make sure you did set range correctly
        [auto-inserted scaler 0 @ 0x2326600] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1920 h:1080 fmt:yuvj420p sar:1/1 flags:0x4
        [mjpeg @ 0x2327620] Forcing thread count to 1 for MJPEG encoding, use -thread_type slice or a constant quantizer if you want to use multipl
        [mjpeg @ 0x2327620] intra_quant_bias = 96 inter_quant_bias = 0
        Output #0, image2, to ’out_42_20.jpg’ :
          Metadata :
            encoder : Lavf56.40.101
            Stream #0:0, 0, 1/25 : Video : mjpeg, 1 reference frame, yuvj420p(pc, left), 1920x1080 [SAR 1:1 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 fps tbc
            Metadata :
              encoder : Lavc56.60.100 mjpeg
        Stream mapping :
          Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
        Press [q] to stop, [?] for help
        [h264 @ 0x232a040] Missing reference picture, default is 0
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 0
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 0
        [h264 @ 0x232a040] decode_slice_header error
        timestamp discontinuity 0, new offset= -2541079989
        [h264 @ 0x232a040] no picture
        [h264 @ 0x232a040] illegal short term buffer state detected
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] Missing reference picture, default is 65537
        [h264 @ 0x232a040] decode_slice_header error
        [h264 @ 0x232a040] no picture
        *** 0 dup !
        [AVIOContext @ 0x2448c00] Statistics : 0 seeks, 2 writeouts
        No more output streams to write to, finishing.
        frame=    1 fps=0.0 q=2.2 Lsize=N/A time=00:00:00.04 bitrate=N/A dup=1 drop=1
        video:32kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : unknown
        Input file #0 (video.ts) :
          Input stream #0:0 (video) : 9 packets read (261340 bytes) ; 3 frames decoded ;
          Input stream #0:1 (audio) : 0 packets read (0 bytes) ;
          Input stream #0:2 (audio) : 0 packets read (0 bytes) ;
          Total : 9 packets (261340 bytes) demuxed
        Output file #0 (out_42_20.jpg) :
          Output stream #0:0 (video) : 1 frames encoded ; 1 packets muxed (33209 bytes) ;
          Total : 1 packets (33209 bytes) muxed
        3 frames successfully decoded, 0 decoding errors
        [AVIOContext @ 0x22c2e40] Statistics : 8798032 bytes read, 36 seeks
    
  • FFMPEG results in a silent video when trying to combine video and audio tracks

    23 septembre 2017, par Stuart Clarke

    I’m using the following command to combine a video and an audio track.

    ffmpeg -y -i /var/www/temp/merged.mp4 -i /var/www/temp/combined.mp3 -strict -2 /var/www/temp/videoExtouiulbjryzxlehjj2.mp4

    Edit :

    Here is the output from the first command

    ffmpeg version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     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
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/merged.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.15.102
     Duration: 00:02:31.80, start: 0.000000, bitrate: 2384 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2381 kb/s, 25.43 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 0 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #1, mp3, from '/var/www/temp/audioTrack.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.94, start: 0.011995, bitrate: 128 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavf
    [libx264 @ 0x1e903a0] using SAR=1/1
    [libx264 @ 0x1e903a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
    [libx264 @ 0x1e903a0] profile High, level 4.0
    [libx264 @ 0x1e903a0] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 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 '/var/www/temp/videoExtvzxvphotsyfpcbkd.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.15.102
       Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc56.13.100 libx264
       Stream #0:1(und): Audio: mp3 (libmp3lame) (i[0][0][0] / 0x0069), 48000 Hz, stereo, fltp (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc56.13.100 libmp3lame
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    frame=   31 fps=0.0 q=0.0 size=       0kB time=00:00:01.05 bitrate=   0.4kbits/s dup=1 drop=0frame=   46 fps= 41 q=0.0 size=       0kB time=00:00:01.56 bitrate=   0.2kbits/s dup=1 drop=0frame=   52 fps= 32 q=29.0 size=     149kB time=00:00:01.75 bitrate= 698.4kbits/s dup=1 drop=frame=   64 fps= 28 q=29.0 size=     258kB time=00:00:02.16 bitrate= 977.2kbits/s dup=1 drop=frame=   74 fps= 26 q=29.0 size=     389kB  
    video:39673kB audio:211kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.143487%
    [libx264 @ 0x1e903a0] frame I:27    Avg QP:18.78  size: 58834
    [libx264 @ 0x1e903a0] frame P:2202  Avg QP:23.67  size: 14187
    [libx264 @ 0x1e903a0] frame B:2323  Avg QP:25.75  size:  3356
    [libx264 @ 0x1e903a0] consecutive B-frames: 24.7% 18.7%  9.0% 47.5%
    [libx264 @ 0x1e903a0] mb I  I16..4: 18.8% 74.7%  6.5%
    [libx264 @ 0x1e903a0] mb P  I16..4:  2.1%  5.0%  0.3%  P16..4: 22.2%  6.0%  1.9%  0.0%  0.0%    skip:62.5%
    [libx264 @ 0x1e903a0] mb B  I16..4:  0.1%  0.3%  0.0%  B16..8: 19.9%  1.0%  0.1%  direct: 0.3%  skip:78.3%  L0:42.3% L1:55.3% BI: 2.4%
    [libx264 @ 0x1e903a0] 8x8 transform intra:68.2% inter:86.5%
    [libx264 @ 0x1e903a0] coded y,uvDC,uvAC intra: 35.8% 52.3% 4.5% inter: 5.2% 7.4% 0.0%
    [libx264 @ 0x1e903a0] i16 v,h,dc,p: 28% 23%  8% 40%
    [libx264 @ 0x1e903a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 20% 22%  3%  6%  6%  7%  5%  4%
    [libx264 @ 0x1e903a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 21% 14%  4%  8%  7%  7%  4%  3%
    [libx264 @ 0x1e903a0] i8c dc,h,v,p: 56% 18% 20%  6%
    [libx264 @ 0x1e903a0] Weighted P-Frames: Y:0.9% UV:0.2%
    [libx264 @ 0x1e903a0] ref P L0: 73.4% 13.0% 10.0%  3.6%  0.0%
    [libx264 @ 0x1e903a0] ref B L0: 92.2%  6.7%  1.1%
    [libx264 @ 0x1e903a0] ref B L1: 96.6%  3.4%
    [libx264 @ 0x1e903a0] kb/s:2139.74

    End Edit

    I know this should work since the exact line does work for other files. But the result with these is a silent video.

    I checked the audio file being used and it seemed fine when played. but I did get a weird warning when creating it. Basically I have 2 audio tracks, one is overlay music and the other is talking. I create the combined audio with this command.

    ffmpeg -y -i /var/www/temp/audioTrack.mp3 -i /var/www/temp/musicTrack.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 /var/www/temp/combined.mp3

    Here is the output from the second command.

    ffmpeg version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     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
    Input #0, mp3, from '/var/www/temp/audioTrack.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavc56.13
    Input #1, mp3, from '/var/www/temp/musicTrack.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavc56.13
    [Parsed_amerge_0 @ 0x15e3760] No channel layout for input 1
    [Parsed_amerge_0 @ 0x15e3760] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
    Output #0, mp3, to '/var/www/temp/combined.mp3':
     Metadata:
       TSSE            : Lavf56.15.102
       Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p (default)
       Metadata:
         encoder         : Lavc56.13.100 libmp3lame
    Stream mapping:
     Stream #0:0 (mp3) -> amerge:in0
     Stream #1:0 (mp3) -> amerge:in1
     amerge -> Stream #0:0 (libmp3lame)
    Press [q] to stop, [?] for help
    [libmp3lame @ 0x1601000] Trying to remove 1152 samples, but the queue is empty
    size=    2001kB time=00:02:08.88 bitrate= 127.2kbits/s    
    video:0kB audio:2001kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.012350%

    Of note is these sections (I believe).

    [Parsed_amerge_0 @ 0x15e3760] No channel layout for input 1
    [Parsed_amerge_0 @ 0x15e3760] Input channel layouts overlap: output layout will be determined by the number of distinct input channels

    and

    [libmp3lame @ 0x1601000] Trying to remove 1152 samples, but the queue is empty

    As I said the output audio file sounds correct.

    The Music and Audio tracks are created with AudioSegment in python from the pydub library. I’ve used this before with no issues. The code for this is as follows.

    sound = AudioSegment.from_mp3(audio)
    introSilence = AudioSegment.silent(duration=introLength)
    creditsSilence = AudioSegment.silent(duration=creditsLength)
    increasedAudio = sound + 12
    talking = introSilence + increasedAudio + creditsSilence
    talking.export(audioTrack, format="mp3")
    mus = AudioSegment.from_mp3(music)
    introMusic = mus[ : introLength]
    videoMusic = mus[introLength - crossFade : introLength + videoLength + crossFade]
    creditsMusic = mus[totalLength - creditsLength : totalLength]
    lowerMusic = videoMusic - 6
    totalMusic = introMusic.append(lowerMusic, crossfade=crossFade).append(creditsMusic, crossfade=crossFade).fade_out(fadeOut)
    totalMusic.export(musicTrack, format="mp3")

    Here is the output of ffprobe on the 2 audio files.

    for audioTrack

    ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     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
    Input #0, mp3, from 'temp/audioTrack.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavc56.13

    and for musicTrack

    ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     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
    Input #0, mp3, from 'temp/musicTrack.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavc56.13

    I can’t see any issues with these.

    For completeness here is the ffprobe result for the combined audio track.

    ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     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
    Input #0, mp3, from 'temp/combined.mp3':
     Metadata:
       encoder         : Lavf56.15.102
     Duration: 00:02:08.91, start: 0.025057, bitrate: 127 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 127 kb/s
       Metadata:
         encoder         : Lavc56.13

    Any help would be much appreciated.

    Thanks,

    Stu.