[mythtv-users] ffmpeg options for playback

Håkon Alstadheim hakon at alstadheim.priv.no
Wed Dec 2 08:25:44 UTC 2009


Hi, I'm running 0.22-fixes, and depending on the phase of the moon my
cpu will max out occasionally. Compiling with the patch below helps,
reducing cpu usage for the frontend from ~70% to ~50% +- 20%. Any idea
how to enable this in a playback profile so I can run without patches ?


===================================================================
--- libs/libmythtv/avformatdecoder.cpp    (revision 22936)
+++ libs/libmythtv/avformatdecoder.cpp    (working copy)
@@ -1743,6 +1743,13 @@
                     else
                         video_codec_id = kCodec_MPEG2; // default to MPEG2
                 }
+        if (CODEC_IS_H264(enc->codec_id))
+                {
+          VERBOSE(VB_PLAYBACK, LOC + "Turning off loop filter");
+          enc->skip_loop_filter = AVDISCARD_NONREF;
+          VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode mode");
+          enc->flags           |= CODEC_FLAG2_FAST;
+                 }

                 if (enc->codec)
                 {
===================================================================


-- 
Håkon Alstadheim / N-7510 Skatval / email:hakon at alstadheim.priv.no
tlf: 74 82 60 27 mob: 47 35 39 38
http://alstadheim.priv.no/hakon/
spamtrap: finnesikke at alstadheim.priv.no -- 1 hit & you are out






More information about the mythtv-users mailing list