When creating a video to export (in any of the several formats available; I tried them all) through ffmpeg, the quality is substantially lower than that of the original jpeg images (in particular, grainy with subtle squares showing up). Nothing terrible, but still noticeably worse than the quality that is there to start out with.
I tried passing the "-compression-level 0" parameter through Zoneminder to ffmpeg, as per the ffmpeg documentation, with no noticeable effect on the video quality.
While I realize compression comes in handy for smaller file sizes and quicker responses, the amount of times I create a video from an event is not very often, and it's easier to pass off an event in a single video file to law enforcement when need be.
Any thoughts on how to tackle this, or is this just a reality of the jpeg-to-mpeg/wmv/et al. format jump?
Video Export Compression/Quality (mpg/wmv/etc.)
-
- Posts: 18
- Joined: Wed Aug 16, 2006 1:36 pm
- Location: Baltimore, MD
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
Its an mpeg thing mate
I messed a lot with mpeg encoding and you can increase the bitrate from std to much higher settings but the only way i have found to reduce this to (what i deem an acceptable quality) is to match the jpeg bitrate, ie quite high. avi is incompressed though so you may be better using that format?
I messed a lot with mpeg encoding and you can increase the bitrate from std to much higher settings but the only way i have found to reduce this to (what i deem an acceptable quality) is to match the jpeg bitrate, ie quite high. avi is incompressed though so you may be better using that format?
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 18
- Joined: Wed Aug 16, 2006 1:36 pm
- Location: Baltimore, MD
Passing bit_rate to ffmpeg
Thanks for pointing me in that direction. It seems that changing the bitrate doesn't seem to make a dent though. In particular, I'm passing "-bit_rate <integer>", as per the ffmpeg documentation, with said integer being everything from 2 bytes/sec to 2 MB/s with no effect on the file size in either .avi or .mpg format (even .avi is showing the fuzzy square effect).
Seems that you have experience with exactly this issue; what settings in particular work for your setup? I presume the appropriate calculation for the jpeg bitrate would be something like 640*480*3 for a color 640x480 image?
Seems that you have experience with exactly this issue; what settings in particular work for your setup? I presume the appropriate calculation for the jpeg bitrate would be something like 640*480*3 for a color 640x480 image?
-
- Posts: 18
- Joined: Wed Aug 16, 2006 1:36 pm
- Location: Baltimore, MD
My Bad
Upon further investigation, the -bit_rate flag was for a different ffmpeg plugin (a lot of flag options to pass through!)...scrolling up a bit in the list gave the proper option of "-b <integer>" to pass in a bitrate in kb - all is well, high quality video now.
Thanks James!
Thanks James!
- AmmarossDanan
- Posts: 19
- Joined: Tue Jul 03, 2007 10:05 pm
- Location: Salt Lake, UT, US
-
- Posts: 1
- Joined: Thu Jun 24, 2010 2:13 am