On Wed, Jul 15, 2015 at 7:42 PM, Luca Barbato <[email protected]> wrote:
> On 15/07/15 05:23, Chris Angelico wrote:
>> I have a video of a talking head, which I wish to replace at certain
>> points with still images (slides, if you like), for X seconds. The
>> 'overlay' filter seems to be most of what I want, and I can ensure
>> that all the images are the same size as the video itself (which means
>> they completely cover the image). But after poking around in the man
>> page and on the internet, the best I can come up with is this:
>
> probably you can take the two inputs, one for the image with continuous
> loop and the other for the video and use overlay and select filters (see
> https://libav.org/documentation/avconv.html#select)
>
> The input image would be a constant stream and you use select to decide
> when to insert it and for how long.
Sounds interesting. I'd have to have one for each image - the example
I posted was placing one still image at one location, but the purpose
was to expand that to N images, each at its correct location.
> Could you please give me the output of the mpegts avconv with -v debug ?
> that part sounds quite fishy.
Oh? You mean this?
$ avconv -v debug -i part2B.mkv part2B.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 'part2B.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.
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 @ 0xa2f0c0] Probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[h264 @ 0xa42420] no picture
Last message repeated 1 times
[matroska,webm @ 0xa2f0c0] 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: output file part2B.ts.
Successfully parsed a group of options.
Opening an output file: part2B.ts.
File 'part2B.ts' already exists. Overwrite ? [y/N] y
Successfully opened the file.
Detected 4 logical cores.
[buffer @ 0x1553fe0] w:1280 h:720 pixfmt:yuv420p
[fps @ 0x17c7820] fps=30/1
[buffersink @ 0x15570e0] auto-inserting filter 'auto-inserted fifo 0'
between the filter 'fps for output stream 0:0' and the filter 'output
stream 0:0'
Detected 4 logical cores.
[abuffer @ 0x17ce880] tb:1/48000 samplefmt:fltp samplerate: 48000 ch layout:0x3
[abuffersink @ 0x17c7ea0] 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 @ 0x17cadc0] 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 @ 0xa45000] audio_convert: found function:
fltp to s16 (C)
[AVAudioResampleContext @ 0xa45000] audio_convert: found function:
fltp to s16 (SSE2)
[AVAudioResampleContext @ 0xa45000] audio_convert: found function:
fltp to s16 (SSSE3)
[resample @ 0x17dc000] fmt:fltp srate:48000 cl:stereo -> fmt:s16
srate:48000 cl:stereo
[mpeg2video @ 0x17bada0] detected 4 logical cores
[h264 @ 0xa43fe0] detected 4 logical cores
[mpegts @ 0x17ba460] muxrate VBR, pcr every 3 pkts, sdt every 200,
pat/pmt every 40 pkts
Output #0, mpegts, to 'part2B.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(eng), 0, 1/90000: Video: mpeg2video, yuv420p, 1280x720
[PAR 1:1 DAR 16:9], 1/30, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
(default)
Metadata:
CREATION_TIME : 2015-07-15 05:46:14
LANGUAGE : eng
ENCODER : MOTO
Stream #0.1(eng), 0, 1/90000: Audio: mp2, 48000 Hz, stereo, s16,
384 kb/s (default)
Metadata:
CREATION_TIME : 2015-07-15 05:46:14
LANGUAGE : eng
ENCODER : Lavc56.1.0 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (vorbis (native) -> mp2 (native))
Press ctrl-c to stop encoding
[h264 @ 0xb4c620] no picture
[h264 @ 0xb4d720] no picture
No more output streams to write to, finishing.e=12.93 bitrate=1735.6kbits/s
frame= 511 fps=255 q=31.0 Lsize= 3526kB time=17.03 bitrate=1695.8kbits/s
video:2387kB audio:799kB other streams:0kB global headers:0kB muxing
overhead: 10.679529%
Input file #0 (part2B.mkv):
Input stream #0:0 (video): 511 packets read (5077317 bytes); 511
frames decoded;
Input stream #0:1 (audio): 948 packets read (221195 bytes); 947
frames decoded (816960 samples);
Total: 1459 packets (5298512 bytes) demuxed
Output file #0 (part2B.ts):
Output stream #0:0 (video): 511 frames encoded; 511 packets muxed
(2444237 bytes);
Output stream #0:1 (audio): 710 frames encoded (816960 samples); 710
packets muxed (817920 bytes);
Total: 1221 packets (3262157 bytes) muxed
[fps @ 0x17c7820] 511 frames in, 511 frames out; 0 frames dropped, 0
frames duplicated.
Not sure what to learn from that.
ChrisA
_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools