[FFmpeg-user] Please release me from despair: multiple overlay images with fade in + out

2015-01-20 Thread Dog Film
Hi,

I really tried hard, I did not succeed, so I am asking here, if it is
possible at all and if yes, how to do it...

ok, I would like to generate a movie with several images overlayed,
like one image at a time, but the images are changing. So essentially
like an image sequence which is overlayed on top of a video. Imagine
slides overlayed  on the video of a speaker.

I found several ways of doing quite complex overlays, however the
resulting video would look much nicer if the image overlays had a fade
in and fade out.

This way I made the overlays without fades:

# WORKS: A LITTLE SUCCESS! THIS SHOWS ALL PIC_x IN A SEQUENCE, BUT NO
FADE IN OR OUT
FILENAME=${DIR_OUT}Lecture-16-Overlay-Fade-Trans-04.mov
${FFMPEG} -y -i ${VID_A} -i ${png_1} -i ${png_2} -i ${png_3} -i
${png_4} -i ${png_5} -i ${png_6} -filter_complex "
[0:v][1:v] overlay=10:10:enable='between(t,2,4)' [tmp];
[tmp][2:v] overlay=30:30:enable='between(t,6,8)' [tmp];
[tmp][3:v] overlay=50:50:enable='between(t,10,12)' [tmp];
[tmp][4:v] overlay=70:70:enable='between(t,14,16)' [tmp];
[tmp][5:v] overlay=90:90:enable='between(t,18,20)' [tmp];
[tmp][6:v] overlay=120:120:enable='between(t,22,24)' " ${FILENAME}

But I can not find a way to apply a fade-in and fade-out to each of
these images. The filter syntax just kills me, sorry.

Finally, I 'hardcoded' the fades and generated movies, like this:

 for png in $DIR_SLIDE*.png
 do
 # ${FFMPEG} -y -loop 1 -i $png -t 3 -c qtrle -vf 'fade=in:1:25,
fade=out:50:25' ${png%%png}mov
 ${FFMPEG} -y -loop 1 -i $png -t 3 -c png -vf 'fade=in:1:25,
fade=out:50:25' ${png%%png}mov
 done

I found this extra step not a perfect solution, but ok, I was sure it
would work - BUT you know what - it did NOT. All the *.mov files have
a fade-in and out, I checked this, but when I try to overlay them with
the same approach as above only the first movie is shown as expected,
it fades in and fades out, but then there is no second movie anymore.
It "feels" like some alpha-channel had to be reset or anything like
this, but I did not find any solution.

I actually used the same command as above, only replaced the png
variables with the mov files.

I also tried several different variations building a valid filter
chain, but it was only darkness, frustration and no positive results,
so I will not post my 120 not working variations of how not to build a
ffmpeg filter chain...

However, I am starting to wonder if this is possible at all? If yes,
how is this trick working?

Anybody, please release me from my pain!


thank you very much for your attention,
have a nice day,
John
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Image Conversion TIFF > JPEG with yuv422 chroma subsampling

2015-01-20 Thread Moritz Barsnick
On Tue, Jan 20, 2015 at 17:16:47 +0100, Andrea Rastelli wrote:
> I'm sorry but even with your help seems impossible to properly convert 
> my images.

It may depend heavily on the input, but at least I can successfully
create JPEG from a TIFF, and it can be read by many programs:

$ ffmpeg -i /usr/share/doc/tesseract-3.02.02/eurotext.tif -pix_fmt yuv422p -q 1 
eurotext.jpg -y
ffmpeg version 2.5.git Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 11 2015 15:42:28 with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/2015-01-10 
--enable-gpl --enable-version3 --enable-nonfree --disable-shared 
--enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 
--enable-libmp3lame --enable-openal --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp 
--enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac 
--enable-libsmbclient --enable-libquvi --cc=icc --cxx=icpc 
--extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib 
-L/usr/new/tools/video/install/fdk-aac/current/lib' 
--extra-cflags='-I/usr/new/tools/video/install/x264/current/include 
-I/usr/new/tools/video/install/fdk-aac/current/include'
  libavutil  54. 16.100 / 54. 16.100
  libavcodec 56. 20.100 / 56. 20.100
  libavformat56. 18.100 / 56. 18.100
  libavdevice56.  3.100 / 56.  3.100
  libavfilter 5.  7.100 /  5.  7.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Input #0, tiff_pipe, from '/usr/share/doc/tesseract-3.02.02/eurotext.tif':
  Duration: N/A, bitrate: N/A
Stream #0:0: Video: tiff, monob, 1024x800 [SAR 1:1 DAR 32:25], 25 tbr, 25 
tbn, 25 tbc
Incompatible pixel format 'yuv422p' for codec 'mjpeg', auto-selecting format 
'yuvj422p'
[swscaler @ 0xb6962c0] deprecated pixel format used, make sure you did set 
range correctly
Output #0, image2, to 'eurotext.jpg':
  Metadata:
encoder : Lavf56.18.100
Stream #0:0: Video: mjpeg, yuvj422p(pc), 1024x800 [SAR 1:1 DAR 32:25], 
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.20.100 mjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (tiff (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame=1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
video:180kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: unknown

Note the warning about the pixel format.

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Image Conversion TIFF > JPEG with yuv422 chroma subsampling

2015-01-20 Thread Andrea Rastelli

On 19/01/2015 22:10, Moritz Barsnick wrote:

To add to Werner's comments:

On Mon, Jan 19, 2015 at 18:05:34 +0100, Andrea Rastelli wrote:

Also, the only codec that works is the MJPEG, any other codec produces
unreadable images or extremely slow-to-process images (libopenjpeg)..

I can't comment on slow-to-process images, but there's a section on the
readability. It's not obvious, so thanks for asking. ;-)

https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#mjpeg2jpeg

So please check whether adding "-bsf:v mjpeg2jpeg" (after the input
file, before the output file - just saying this to be sure) solves that
issue.

Moritz
I'm sorry but even with your help seems impossible to properly convert 
my images.
Actually I'm using ImageMagick with success for both quality 
(non-blocky) and chroma-subsampling 4:4:4 (or 4:2:2).


Thanks a lot for your help to better understand ffmpeg :-)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user