[libav-tools] Replacing video with a still image at specific points

Chris Angelico rosuav at gmail.com
Wed Jul 15 14:31:14 CEST 2015


On Wed, Jul 15, 2015 at 8:30 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
>>> Could you please give me the output of the mpegts avconv with -v debug ?
>>> that part sounds quite fishy.
>>
>> Oh? You mean this?
>
> The line that returns an error =)

Oh. Duh. I'm an idiot sometimes :)

rosuav at sikorsky:~/Videos/overlay$ avconv -v debug -i part2B.mkv -i
partD.png -filter_complex overlay partD.ts
avconv version 11.4-6:11.4-1~deb8u1, Copyright (c) 2000-2014 the Libav
developers
  built on Jun  4 2015 19:39:02 with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --arch=amd64 --enable-pthreads
--enable-runtime-cpudetect --extra-version='6:11.4-1~deb8u1'
--libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --disable-avserver
--enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r
--enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp
--enable-libopencv --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis
--enable-libvpx --enable-zlib --enable-gpl --enable-swscale
--enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid
--shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil     54.  3. 0 / 54.  3. 0
  libavcodec    56.  1. 0 / 56.  1. 0
  libavformat   56.  1. 0 / 56.  1. 0
  libavdevice   55.  0. 0 / 55.  0. 0
  libavfilter    5.  0. 0 /  5.  0. 0
  libavresample  2.  1. 0 /  2.  1. 0
  libswscale     3.  0. 0 /  3.  0. 0
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'part2B.mkv'.
Reading option '-i' ... matched as input file with argument 'partD.png'.
Reading option '-filter_complex' ... matched as option
'filter_complex' (create a complex filtergraph) with argument
'overlay'.
Reading option 'partD.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument debug.
Applying option filter_complex (create a complex filtergraph) with
argument overlay.
Successfully parsed a group of options.
Parsing a group of options: input file part2B.mkv.
Successfully parsed a group of options.
Opening an input file: part2B.mkv.
[matroska,webm @ 0x15a3160] Probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[h264 @ 0x15bbc60] no picture
    Last message repeated 1 times
[matroska,webm @ 0x15a3160] All info found
Input #0, matroska,webm, from 'part2B.mkv':
  Metadata:
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: isommp42
    CREATION_TIME   : 2015-07-15 05:46:14
    ENCODER         : Lavf56.1.0
  Duration: 00:00:17.06, start: 0.000000, bitrate: N/A
    Stream #0.0(eng), 40, 1/1000: Video: h264 (High), yuv420p,
1280x720 [PAR 1:1 DAR 16:9], 1/180000, 30 fps, 1k tbn, 180k tbc
(default)
    Metadata:
      CREATION_TIME   : 2015-07-15 05:46:14
      LANGUAGE        : eng
      ENCODER         : MOTO
    Stream #0.1(eng), 66, 1/1000: Audio: vorbis, 48000 Hz, stereo,
fltp (default)
    Metadata:
      CREATION_TIME   : 2015-07-15 05:46:14
      LANGUAGE        : eng
      ENCODER         : Lavc56.1.0 libvorbis
Successfully opened the file.
Parsing a group of options: input file partD.png.
Successfully parsed a group of options.
Opening an input file: partD.png.
Input #1, image2, from 'partD.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #1.0, 1, 1/25: Video: png, rgb24, 1280x720, 0/1, 25 tbn
Successfully opened the file.
Parsing a group of options: output file partD.ts.
Successfully parsed a group of options.
Opening an output file: partD.ts.
Detected 4 logical cores.
[buffer @ 0x20d0520] w:1280 h:720 pixfmt:yuv420p
[buffer @ 0x1ef6840] w:1280 h:720 pixfmt:rgb24
Successfully opened the file.
[overlay @ 0x1b35840] auto-inserting filter 'auto-inserted fifo 0'
between the filter 'graph 0 input from stream 0:0' and the filter
'Parsed filter 0 overlay'
[overlay @ 0x1b35840] auto-inserting filter 'auto-inserted fifo 1'
between the filter 'graph 0 input from stream 1:0' and the filter
'Parsed filter 0 overlay'
[buffersink @ 0x2334ee0] auto-inserting filter 'auto-inserted fifo 2'
between the filter 'format' and the filter 'output stream 0:0'
[fifo @ 0x23450e0] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'graph 0 input from stream 1:0' and the filter
'auto-inserted fifo 1'
[scale @ 0x2348ea0] w:1280 h:720 fmt:rgb24 -> w:1280 h:720
fmt:yuva420p flags:0x2
[overlay @ 0x1b35840] main w:1280 h:720 fmt:yuv420p overlay x:0 y:0
w:1280 h:720 fmt:yuva420p eof_action:repeat
Detected 4 logical cores.
[abuffer @ 0x2356380] tb:1/48000 samplefmt:fltp samplerate: 48000 ch layout:0x3
[abuffersink @ 0x2348b00] auto-inserting filter 'auto-inserted fifo 0'
between the filter 'audio format for output stream 0:1' and the filter
'output stream 0:1'
[aformat @ 0x2355ec0] auto-inserting filter 'auto-inserted resampler
0' between the filter 'Parsed filter 0 anull' and the filter 'audio
format for output stream 0:1'
[AVAudioResampleContext @ 0x15a6d80] audio_convert: found function:
fltp to s16  (C)
[AVAudioResampleContext @ 0x15a6d80] audio_convert: found function:
fltp to s16  (SSE2)
[AVAudioResampleContext @ 0x15a6d80] audio_convert: found function:
fltp to s16  (SSSE3)
[resample @ 0x15c1520] fmt:fltp srate:48000 cl:stereo -> fmt:s16
srate:48000 cl:stereo
[mpeg2video @ 0x23442a0] detected 4 logical cores
[mpeg2video @ 0x23442a0] MPEG1/2 does not support 1000/1 fps
Output #0, mpegts, to 'partD.ts':
  Metadata:
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: isommp42
    CREATION_TIME   : 2015-07-15 05:46:14
    ENCODER         : Lavf56.1.0
    Stream #0.0, 0, 0/0: Video: mpeg2video, q=2-31, 200 kb/s, PAR 1:1
DAR 0:0, 30 fps (default)
    Metadata:
      encoder         : Lavc56.1.0 mpeg2video
    Stream #0.1(eng), 0, 0/0: Audio: mp2, 0 channels, 200 kb/s (default)
    Metadata:
      CREATION_TIME   : 2015-07-15 05:46:14
      LANGUAGE        : eng
      ENCODER         : Lavc56.1.0 libvorbis
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #1:0 (png) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (mpeg2video)
  Stream #0:1 -> #0:1 (vorbis (native) -> mp2 (native))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height



Is the 'fifo' interfering with the detection? I don't know how this works.

ChrisA


More information about the libav-tools mailing list