[xiph-commits] r17508 - in trunk/ffmpeg2theora: . src

j at svn.xiph.org j at svn.xiph.org
Wed Oct 13 09:16:14 PDT 2010


Author: j
Date: 2010-10-13 09:16:14 -0700 (Wed, 13 Oct 2010)
New Revision: 17508

Modified:
   trunk/ffmpeg2theora/ChangeLog
   trunk/ffmpeg2theora/ffmpeg2theora.1
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
dynamic speedlevel help

Modified: trunk/ffmpeg2theora/ChangeLog
===================================================================
--- trunk/ffmpeg2theora/ChangeLog	2010-10-13 15:15:19 UTC (rev 17507)
+++ trunk/ffmpeg2theora/ChangeLog	2010-10-13 16:16:14 UTC (rev 17508)
@@ -1,5 +1,6 @@
 svn
     - select resize method via commandline
+    - fix 5.1 channel ordering
 
 0.27 2010-06-18
     - Use Skeleton 4.0 by default (including index),

Modified: trunk/ffmpeg2theora/ffmpeg2theora.1
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.1	2010-10-13 15:15:19 UTC (rev 17507)
+++ trunk/ffmpeg2theora/ffmpeg2theora.1	2010-10-13 16:16:14 UTC (rev 17508)
@@ -89,10 +89,10 @@
 but it is slower and therefore is disabled by default.
 .TP
 .B \-\-speedlevel
-encoding is faster with higher values the cost is quality and bandwidth
- 0: Slowest (best)
- 1: Enable early skip (default)
- 2: Disable motion compensation
+encoding is faster with higher values
+the cost is quality and bandwidth (default 1)
+available values depend on the version of libtheora
+check ffmpeg2theora --help for supported values.
 .TP
 .B \-x, \-\-width
 Scale to given width (in pixels).

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2010-10-13 15:15:19 UTC (rev 17507)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2010-10-13 16:16:14 UTC (rev 17508)
@@ -1963,6 +1963,17 @@
 }
 
 void print_usage() {
+    th_info ti;
+    th_enc_ctx *td;
+    int max_speed_level = -1;
+
+    th_info_init(&ti);
+    ti.pic_width = ti.frame_width = 320;
+    ti.pic_height = ti.frame_height = 240;
+    td = th_encode_alloc(&ti);
+    th_encode_ctl(td, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_level, sizeof(int));
+    th_encode_free(td);
+
     fprintf(stdout,
         PACKAGE " " PACKAGE_VERSION " - %s\n", th_version_string());
     fprintf(stdout,
@@ -2005,10 +2016,9 @@
         "      --optimize         optimize video output filesize (slower)\n"
         "                         (same as speedlevel 0)\n"
         "      --speedlevel       encoding is faster with higher values\n"
-        "                         the cost is quality and bandwidth\n"
-        "                         - 0: Slowest (best)\n"
-        "                         - 1: Enable early skip (default)\n"
-    "                         - 2: Disable motion compensation\n"
+        "                         the cost is quality and bandwidth (default 1)\n"
+        "                         available values depend on the version of libtheora\n"
+        "                         your version supports speedlevels 0 to %d\n"
 
         "  -x, --width            scale to given width (in pixels)\n"
         "  -y, --height           scale to given height (in pixels)\n"
@@ -2138,7 +2148,7 @@
         "     | ffmpeg2theora -f dv -x 160 -y 128 -o /dev/stdout - \\\n"
         "     | oggfwd icast2server 8000 password /theora.ogv\n"
         "\n"
-        );
+        ,max_speed_level);
     exit(0);
 }
 



More information about the commits mailing list