Most-playback-performance video-file-format?

1

I have lots of MP4 MKV MOV files of various lengths, resolutions, audio formats, audio and image quality.What should I convert them to to have most playback performance without quality loss?

My research ((>hour of) browser history)

To avoid HDD bottleneck I use a RAMDisk but some files are too big.

PC Specs
  1. Dell OptiPlex GX280, newest BIOS
  2. Intel Pentium 4 2.8GHz Northwood (32-bit)
  3. 2.5 GB RAM
  4. Hard Drives
    • ST3200014A
    • 2× WDC WD400BB-75FRA0
  5. OS
    • Lubuntu 14.10 (kept uptodate, to be replaced)
    • Windows 7 Ultimate (kept uptodate)

Ab User

Posted 2014-10-12T04:35:30.327

Reputation: 11

Answers

1

If you do not want quality loss, then your only option is to keep the videos as they are, or convert them with a lossless video/audio codec (e.g. HuffYUV video + PCM audio, or ffv1 for video). Of course, this will increase the file size and effectively lead to worse performance under normal conditions.

I say "normal" because if you want to do nonlinear video editing, it's much more efficient to work with lossless (or at least I-frame only) codecs, so that you can access the video at any frame without having to decode other frames. For normal video playback however, this is not an issue.

Those videos that you probably ripped off a DVD or Blu-ray—or downloaded from the Internet—are heavily compressed, and they only require around 500 kBit/s to 2 MBit/s bandwidth from your storage medium. HDDs can deliver much more than that. Your real bottleneck is the twelve year old CPU which has to decode all the video information in time.

Consider upgrading to a new system altogether if you want to be able to watch HD video in a somewhat decent quality.

Your last option—if you can sacrifice quality—is to convert the videos to smaller dimensions (e.g. from 1080p to 720p) and/or choosing a less CPU-demanding video codec (e.g. from H.264 to MPEG-4 Part 2).

slhck

Posted 2014-10-12T04:35:30.327

Reputation: 182 472

+1, The ffmpeg decoders for common lossy-compression formats are heavily optimized with SSE2 assembly. Converting to anything else with no perceptible loss would mean higher bitrates, which means more work for the CPU. Lossless video has such high bitrates that it bottlenecks either hard drive or CPU to play back lossless HD in realtime (on my C2Duo E6600 2.4GHz). mplayer -lavdopts threads=2 helps with some codecs, since my cpu is dual core. If your CPU has hyperthreading, use that. – Peter Cordes – 2015-01-15T01:17:36.290

BTW, I have no problems playing anything I download, it's only playback of lossless temporary files that's a problem on my system. – Peter Cordes – 2015-01-15T01:19:13.763

0

Try 64bit Linux. Or maybe just an amd64 kernel and a 64bit static mplayer binary to test things out without reinstalling.

On x86 / x86-64, code running in 64bit mode is significantly more efficient, because backwards compat with ancient x86 calling conventions isn't needed. And more importantly for multimedia, twice as many normal and SSE (xmm) registers.

If you're having problems playing ordinary videos in realtime, maybe your video hardware is a bottleneck. check with mplayer -vo null ...

If you're defaulting to -vo vdpau, that might be why you're having problems. vdpau is pretty new, but enabled by default in recent Ubuntu / mplayer. -vo xv is usually good (i.e. efficient), and -vo gl can be worth trying.

If you have hyperthreading on that CPU, use mplayer -lavdopts threads=2

If not, you can try mplayer -lavdopts fast:skiploopfilter input.mp4

This will look bad, esp. for lower bitrate videos where the in-loop filter makes more difference for h.264. (decoded pictures are filtered BEFORE being used as references for later frames. skipping this lets errors accumulate.)

If you're having problems with youtube, but not local playback, well that's just because Adobe's binary blob is horrible compared to mplayer. Use google chrome to get better support for html5 video on youtube, so it will default to html5 decoded by chrome, instead of flash decoded by Adobe's crap.

Peter Cordes

Posted 2014-10-12T04:35:30.327

Reputation: 3 141