summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-11-21 17:41:33 +0000
committerjbrjake <[email protected]>2007-11-21 17:41:33 +0000
commit69292c177437f339a59a55954207bc400304e046 (patch)
treeb379eaf8ebfd58cd76d8dc7e9dbb68030d032235 /test
parentab407726d79cfcda9a6c32b54e18f5f643965d19 (diff)
Optimize MP4 files for HTTP streaming (on the CLI it's -O or --optimize).
Has mpeg4ip run a second pass after muxing is complete, to move the MOOV atom to the beginning of the file. To get this to work, I had to replace a patch from Perian, which has written the avc1 "Compressor Name" in the Pascal string style QuickTime expects. Unfortunately, that patch left mpeg4ip unable to parse its own output, when muxing x264 video. Instead, now the Compressor Name is a blank string, and QuickTime substitutes "H.264" for it. NOTE: This is *not* hinting for RTP streaming, just shuffling the container around so it starts playing faster over the web. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1074 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r--test/test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test.c b/test/test.c
index 5224691b4..6cd70054d 100644
--- a/test/test.c
+++ b/test/test.c
@@ -70,6 +70,7 @@ static int largeFileSize = 0;
static int preset = 0;
static char * preset_name = 0;
static int vfr = 0;
+static int mp4_optimize = 0;
/* Exit cleanly on Ctrl-C */
static volatile int die = 0;
@@ -848,6 +849,10 @@ static int HandleEvents( hb_handle_t * h )
{
job->largeFileSize = 1;
}
+ if ( mp4_optimize )
+ {
+ job->mp4_optimize = 1;
+ }
job->file = strdup( output );
@@ -1089,6 +1094,7 @@ static void ShowHelp()
" autodetected from file name)\n"
" -4, --large-file Use 64-bit mp4 files that can hold more than\n"
" 4 GB. Note: Breaks iPod, @TV, PS3 compatibility.\n"""
+ " -O, --optimize Optimize mp4 files for HTTP streaming\n"
"\n"
"### Picture Settings---------------------------------------------------------\n\n"
@@ -1246,6 +1252,7 @@ static int ParseOptions( int argc, char ** argv )
{ "input", required_argument, NULL, 'i' },
{ "output", required_argument, NULL, 'o' },
{ "large-file", no_argument, NULL, '4' },
+ { "optimize", no_argument, NULL, 'O' },
{ "title", required_argument, NULL, 't' },
{ "longest", no_argument, NULL, 'L' },
@@ -1294,7 +1301,7 @@ static int ParseOptions( int argc, char ** argv )
int c;
c = getopt_long( argc, argv,
- "hvuC:f:4i:o:t:Lc:ma:6:s:UFN:e:E:2d789gpP::w:l:n:b:q:S:B:r:R:Qx:TY:X:VZ:z",
+ "hvuC:f:4i:o:t:Lc:ma:6:s:UFN:e:E:2d789gpOP::w:l:n:b:q:S:B:r:R:Qx:TY:X:VZ:z",
long_options, &option_index );
if( c < 0 )
{
@@ -1336,6 +1343,10 @@ static int ParseOptions( int argc, char ** argv )
case '4':
largeFileSize = 1;
break;
+ case 'O':
+ mp4_optimize = 1;
+ break;
+
case 't':
titleindex = atoi( optarg );
break;