Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    602

    Some ffmpeg video conversion observations...


    I've been playing with ffmpeg a bit lately. It's an incredibly powerful program (more of a CLI front end to a suite of very versatile libraries). As I've stated before, the options to this utility are nearly infinite, confusing, and poorly documented. It doesn't help that the newest version (2.8.4) has changed so much that it is almost not even compatible with the older version I had (SVN-r11876 or 2008-02-06). So I've had to re-write my older conversion scripts to accomodate the newer one.

    Anyway, here's a little informative story:

    I downloaded a really good documentary from youtube. It's a half hour show that is old enough it must be from the days when you had to chop the video into smaller chunks to upload (pre-broadband I guess). It came in 3x10 minute chunks. I found this kind of annoying, so I thought to join them together into 1x30 minute chunk.

    mpgjoin doesn't like mp4 files, so I converted the 3 mp4s into straight-up mpegs. Unfortunately, this conversion sextupled the file size ( ~40M each -> ~240M each). Anyway mpgjoin linked them nicely into 1x30 minute episode And I watched it. Good program, but the total file size went from ~125M to nearly 3/4G.

    I thought, "Why not try to reduce the file size and convert it back to mp4?"

    Here's the command I used:
    Code:
    ffmpeg -i INFILE.mpg -strict -2 -q:v X OUTFILE.mp4
    The '-strict -2' is necessary to allow ffmpeg to use an experimental audio codec. That might be controlled by some compile time option I missed.

    The '-q:v X' is what controls the conversion quality and degree of compression as far as I can see. Here are some values for X and the resulting output sizes:
    Code:
    1: ~14   MB/min (very good quality)
    2: ~14   (very good)
    3: ~ 9.3 (good)
    4: ~ 7.3 (still decent)
    5: ~ 6.2 (OK)
    6: ~ 5.4 (meh)
    8: ~ 4.2 (starting to suck)
    Anyway, I figured I'd just go ahead and post my observations here, maybe save someone else half a days worth of manpage reading and test conversions.

    Peace and Cheer.

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    602
    Get this out of Unanswered Posts...

    Anybody have any luck encoding with libx264? I can get it to work, but the results always suck. I've been googling for days now.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,038
    -->
    I use ffmpeg a lot, but usually to convert other formats (mp4, mkv, etc) to mpeg to burn to a DVD. It is a phenomenal tool, but as Miven notes, the options are endless and not well documented. The best way to learn it is to experiment over a really long weekend (or three)...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

$spacer_open
$spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •