Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Lossy FFMPEG conversion to .ogv?

This thread is locked; no one can reply to it. rss feed Print
Lossy FFMPEG conversion to .ogv?
Edgar Reynaldo
Member #8,592
May 2007
avatar

Hi people :)

The video I'm talking about can be found here :

https://www.videezy.com/animals-and-wildlife/1765-tiger-stock-video-turn-down-the-volume

I was putting together a demo for playing video with allegro, and I needed to convert an .mpeg file to .ogv so I could play it with allegro. I first used FreeMake Video Converter (free/bundle ware) to downsize the video. This worked fine, as verified by playing the resulting video file with VLC Media Player (the best media player I've found).

However, the next step in the conversion process is very poor quality. The original video is 30 fps, and so is the output, as told by VLC's codec information on the video. However, the actual frame rate is more like 5-10 fps, it's very choppy in the resulting .ogv video created by FFMPEG.

All I did was :

ffmpeg -i TigerSounds.mpg TigerSounds.ogv

But if you compare the two videos the .ogv file is very lossy, both in resolution and in fps.

Any ideas why this is? I've read that ffmpeg tries to do the most lossless conversion possible, and I've also read that ffmpeg reads at 24fps. I don't know which is true. All I know is that the resulting quality of the ogg video file produced is very poor.

Suggestions? Are there any other free tools that can convert such a wide variety of video formats into .ogv? Without such a drastic loss in quality? The source video was 115 MB and the output was around 5 MB for the .ogv. Obviously something is going on I don't know about.

SiegeLord
Member #7,827
October 2006
avatar

You can set the output quality by setting a target bitrate with ffmpeg. Something like -vb 20M will be plenty. The original video's bitrate is 15M, so you could use that as well.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Chris Katko
Member #1,881
January 2002
avatar

There are TONS of settings for ffmpeg--many of which can lead to bad results. I'd look through some examples of MPEG to OGV online.

for example:

# Usage: mp4 to ogv
ffmpeg -i input.mp4 -q:v 10 -c:v libtheora -c:a libvorbis output.ogv

https://gist.github.com/nok/8578854

AS well as:

ffmpeg -i input.mp4 -acodec libvorbis -vcodec libtheora -f ogv output.ogv

https://superuser.com/questions/108237/convert-mp4-to-ogg-video

Try both and see if they give better results.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Go to: