Unix/Linux Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

Slideshow with ffmpeg converter

UNIX and Linux Applications


Tags
ffmpeg

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-19-2017   -   Original Discussion by worov
worov's Unix or Linux Image
worov worov is offline
Registered User
 
Join Date: Jul 2016
Last Activity: 19 June 2017, 4:40 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Slideshow with ffmpeg converter

Hi, everyone!

I'm on a Debian 9.0 GNU/Linux machine. I'm not a very experienced user, but I do my best to learn.

So, I have a bunch of images PNG files. I'm trying to make a slideshow with these using the ffmpeg video converter. I also have an audio WAVE stereo file which I'd like to merge with the video.

So I used this command :



Code:
ffmpeg -i audio.wav -framerate 1/10 -i img%3d.png -vf "scale=3840:2880:force_original_aspect_ratio=decrease,pad=3840:2880:(ow-iw)/2:(oh-ih)/2,setsar=1" -c:v libx264 -crf 14 -r 25 -acodec libfdk_aac -pix_fmt yuv420p -shortest -movflags +faststart output.mp4

It returns me :



Code:
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-mips32r2 --disable-mips32r6 --disable-mips64r6 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-libopencv --disable-podpages --disable-stripping --enable-avfilter --enable-avresample --enable-gcrypt --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opengl --enable-openssl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --disable-opencl --enable-libmfx --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'audio.wav':
  Duration: 01:54:44.14, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Input #1, image2, from 'img%3d.png':
  Duration: 00:02:30.00, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: png, rgb24(pc), 4000x3000 [SAR 7087:7087 DAR 4:3], 0.10 tbr, 0.10 tbn, 0.10 tbc
Stream mapping:
  Stream #1:0 -> #0:0 (png (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[libx264 @ 0x55bd4f94f660] using SAR=1/1
[libx264 @ 0x55bd4f94f660] frame MB size (240x180) > level limit (36864)
[libx264 @ 0x55bd4f94f660] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55bd4f94f660] profile High, level 5.2
[libx264 @ 0x55bd4f94f660] 264 - core 150 - 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=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=14.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         : Lavf57.71.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p(progressive), 3840x2880 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.89.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 139 kb/s
    Metadata:
      encoder         : Lavc57.89.100 libfdk_aac
[image2 @ 0x55bd4f94b980] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[swscaler @ 0x55bd4f968900] Warning: data is not aligned! This can lead to a speedloss
More than 1000 frames duplicated   10167kB time=00:00:37.92 bitrate=2196.5kbits/s dup=996 drop=0 speed=0.46x     
[mp4 @ 0x55bd4f94e460] Starting second pass: moving the moov atom to the beginning of the filep=0 speed=0.447x    
frame= 3749 fps= 11 q=-1.0 Lsize=   50923kB time=00:02:29.97 bitrate=2781.6kbits/s dup=3734 drop=0 speed=0.45x    
video:48253kB audio:2557kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.222267%
[libx264 @ 0x55bd4f94f660] frame I:15    Avg QP: 4.84  size:3143157
[libx264 @ 0x55bd4f94f660] frame P:944   Avg QP: 6.47  size:  1443
[libx264 @ 0x55bd4f94f660] frame B:2790  Avg QP: 9.51  size:   323
[libx264 @ 0x55bd4f94f660] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x55bd4f94f660] mb I  I16..4: 18.6% 39.1% 42.3%
[libx264 @ 0x55bd4f94f660] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  1.0%  0.0%  0.0%  0.0%  0.0%    skip:99.0%
[libx264 @ 0x55bd4f94f660] 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:14.8% L1:85.2% BI: 0.0%
[libx264 @ 0x55bd4f94f660] 8x8 transform intra:39.1% inter:93.7%
[libx264 @ 0x55bd4f94f660] coded y,uvDC,uvAC intra: 81.1% 77.6% 77.3% inter: 0.1% 0.0% 0.0%
[libx264 @ 0x55bd4f94f660] i16 v,h,dc,p: 26% 10% 42% 22%
[libx264 @ 0x55bd4f94f660] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 15% 25%  3%  3%  4%  5%  4%  6%
[libx264 @ 0x55bd4f94f660] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 20% 12%  7%  9%  8%  9%  8% 10%
[libx264 @ 0x55bd4f94f660] i8c dc,h,v,p: 53% 21% 18%  8%
[libx264 @ 0x55bd4f94f660] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55bd4f94f660] ref P L0: 99.7%  0.0%  0.2%  0.1%
[libx264 @ 0x55bd4f94f660] ref B L0: 13.9% 85.9%  0.2%
[libx264 @ 0x55bd4f94f660] ref B L1: 99.7%  0.3%
[libx264 @ 0x55bd4f94f660] kb/s:2635.92

As you can see, the audio file is 1 hour and 54 minutes long. However the output.mp4 file is only 2 minutes long. What did I do wrong ?

Thanks in advance.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -4. The time now is 04:32 PM.