Log in

View Full Version : "Panoramic" video filter in ffmpeg?


Wowfunhappy
23rd February 2014, 04:59
Hi! I hope I posted this in the right section; I wasn't sure, since it's related to ffmpeg in general rather than any particular codec. I ultimately chose to post here, since I'm working with ffmpeg via the Unix command line in OS X.

Apple's QuickTime player in OS X has a setting called "panoramic mode," that lets you play 4:3 videos on a 16:9 display without them looking too strange. It achieves this by stretching the sides of the video moreso than the center. I've seen this technique in other players and even built into some televisions, but everyone seems to call it something different.

Not all players support this though, so I'd like to use this technique to actually encode some of my 4:3 videos in wide screen. Does ffmpeg have any settings that will let you do this? A video filter, perhaps?

Thanks so much!

Selur
23rd February 2014, 12:58
Does ffmpeg have any settings that will let you do this?
no
Sounds a bit like 'seam carving'

raffriff42
23rd February 2014, 18:13
Can you link to an image showing the effect you are after?
I search for 'Quicktime panoramic' and I get results for 'Quicktime VR'. Is that what you mean?

Wowfunhappy
23rd February 2014, 23:53
I search for 'Quicktime panoramic' and I get results for 'Quicktime VR'. Is that what you mean?
No, that's completely different.

Can you link to an image showing the effect you are after?

Sure! Here are two screenshots of the same frame:
Without: (http://puu.sh/78490.png)
With: (http://puu.sh/784bF.png)

Are you able to see what it's doing? The center of the screen isn't stretched at all, but the sides of the screen are.

It's very similar to what would happen if you set the field of view in a video game really low.

raffriff42
24th February 2014, 00:33
Ah, I see, and now I see Quicktime Player (even in Windows!) has three fullscreen viewing modes:
Fit, Zoom and Panoramic. It's a neat effect.

raffriff42
24th February 2014, 01:32
It looks like intentional barrel distortion (here's a cobbled-up test pattern viewed on QT Player)
https://www.dropbox.com/s/iexpci79w5i4sf3/QuickTimePlayer%20checkerboard3%20panoramic%202.jpg?raw=1

There are a number of ways to emulate this effect - none that I could find in FFmpeg. But there's probably one out there.
How about this Avisynth script (http://forum.doom9.org/showthread.php?t=152860)
How about a VirtualDub plugin (http://goprouser.freeforums.org/correcting-barrel-fish-eye-distortion-t1065.html)

Wowfunhappy
24th February 2014, 06:02
Aha! Thanks, I'll check those scripts out. I'm also very happy to have the proper name for the effect! :D