0

I gathered some images from internet (in some dimension) and concatenated in a file. You may find this file here: https://s13.postimg.org/quxuzstef/catalog2.jpg

I am trying to make a sliding show effect by using ffmpeg's overlay option. The command i use basically creates a window and move an image beneath this window. Here is the command i use (drawtext part is optional)

ffmpeg -r 25 -loop 1 -i catalog2.jpg -filter_complex "\
nullsrc=size=800x320 [background]; \
[0:v] setpts=PTS-STARTPTS [tmp_catalog_file]; \
[background][tmp_catalog_file] overlay=shortest=1:x='-n*4' [out]; \
[out] drawtext=fontfile=Arial.ttf: text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099
" -f lavfi -c:v libx264 -f mp4 -t 20 -crf 0 -y out.x264.mp4

The video, for a reason, stops for a frame (or a second) and breaks smoothness at random points. I tried using python PIL and opencv2 libraries together to make a video, which gave better result but didn't eliminate this choppy effect. What could possibly be causing this?

7
  • I used your command with the same image and get no breaks in the output. I do see the motion jitter, but to the relatively fast pan and sharp demarcations in the image. You can try to smooth by adding some sort of motion blur. Try adding minterpolate=25 immediately after the overlay.
    – Gyan
    Commented Nov 15, 2016 at 3:06
  • Thanks @Mulvya, my filter_complex parameter became nullsrc=size=800x320 [background]; [0:v] setpts=PTS-STARTPTS [tmp_catalog_file]; [background][tmp_catalog_file] overlay=shortest=1:x='-n*4' [out]; [out] minterpolate=25 with minterpolate parameter. It looks to be better but i can still see a glitch in every ~3-4 second (might be different on your computer), do you think it is caused by fast pan? i reduced the movement speed but didn't help. Any other parameter which could help to fix this glitch?
    – sardok
    Commented Nov 15, 2016 at 8:28
  • I splitted the given image into multiple images (by incrementing x position in each image) to be used for frames. Created videos from those frames by ffmpeg, mencoder, shotcut, moveipy from those still images to make this moving effect, literally each video had the same glitch where frequency of it seemed to be related to the framerate. Also tried to examine the video with ffplay and observed suspucious [mjpeg @ 0x7ff234002c80] decode frame unused 0 bytes video: delay=0.017 A-V=0.026940 messages. Any idea?
    – sardok
    Commented Nov 15, 2016 at 19:23
  • Can you upload the file you created?
    – Gyan
    Commented Nov 15, 2016 at 19:46
  • Really appreciate your help @Mulvya. I put all my generated video files along with the command, here: 46.101.198.246/vids. Basically, files which have so in the filename are generated by the command given here (with and without interpolation). Files which have from-images given by using still images. Symptom is same for all, there is a stop (glitch) in random seconds.
    – sardok
    Commented Nov 15, 2016 at 20:33

0

You must log in to answer this question.

Browse other questions tagged .