I’m searching for a possibility to make a movie from a very long panorama. I could do this manually with gimp. But that’s a quite exhausting. Is there a simple possibility to make a pan shot over the panorama and to save it as a mkv?
I’m pretty sure Kdenlive would be capable.
Probably as other post, a video editor such as kdenlive or maybe Openshot. ffmpeg as well if command line is your thing.
I will throw a possible into the hat, Photofilmstrip https://www.photofilmstrip.org
It is there in the ubuntu repo and there is a Windows portable. Mostly for those photo slideshows that you try and avoid but if you set it up with a single image and set the (resizable) windows you can pan across a panorama.
and as an example, a very much compressed for imgur
https://i.imgur.com/RRXLKa7.mp4
Although maybe not FOSS
PhotoFilmStrip looks very good indeed and I can get what I want really easily. It’s in the Debian repositories as well. So that’s really nice. Thanx a lot.
Kdenlive I had in mind, but I have no clue how to do it. I just used it so far for cutting vids.
Here is my ffmpeg command to produce a from-left-to-right pan 1 frame per pixel.
- Takes
input.jpg
, and givesout.mkv
using the rate for fps=pixels per second.
rate=60; y=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1:nk=1 input.jpg); x=$(($y*16/9)); ffmpeg -loop 1 -i input.jpg -framerate $rate -filter_complex "[0:v]crop=$x:$y:($rate*t):ih,scale=$(echo $x)x$(echo $y),trim=duration=$((($(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=nw=1:nk=1 input.jpg)-$x)/$rate))" -c:a copy out.mkv
Great, will give it try as well. Thanx a lot.
In case it’s too hectic to adapt from, here’s a brief summary:
rate=60;
Give the frame rate which will be pixels per second
y=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1:nk=1 input.jpg);
Probe the input image for it’s height.
x=$(($y*16/9));
Set’s the video output width according to 16:9 aspect ratio from the image’s height.
ffmpeg -loop 1 -i input.jpg -framerate $rate -filter_complex \
Start a loop with the input file and the given framerate.
"[0:v]crop=$x:$y:($rate*t):ih,\
Set the crop filter to see our X Y window, and advance horizontally at the framerate, keeping the vertical dimention the same.
scale=$(echo $x)x$(echo $y),\
Scales the output video maybe redundantly to our X & Y.
trim=duration=$((($(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=nw=1:nk=1 input.jpg)\
Cuts off the loop when we reach the end of the image…
-$x)/$rate))"\
…calculated by subtracting our 16:9 horizontal output size from the images width (determined by ffprobe), and dividing that result by the pixel rate. We must subtract the width of an output frame because we get all those pixels from the first frame and don’t advance thru those pixels.
-c:a copy out.mkv
finally copy the filter output stream to the output video file.
love the floating arm towards the end of clip.