Permalink
Browse files

Made MPEG-4 encoder able to go to full size video, and adjusted bitrates

  • Loading branch information...
1 parent e9abdaa commit eec3fff27cce5756f231f7630f2ef26904bfe964 @cmarrin committed Jul 22, 2011
Showing with 23 additions and 7 deletions.
  1. +23 −7 commands.xml
View
@@ -638,7 +638,6 @@ DTD
var bitrate = (bitrateMax - bitrateMin) * number(params.quality) + bitrateMin;
var limit = (bitrate > params.input_video_bitrate) && bool(params.limit_output_params);
params.output_video_bitrate = limit ? params.input_video_bitrate : bitrate;
- log("video bitrate: input="+params.input_video_bitrate+", min="+bitrateMin+", max="+bitrateMax+", output="+params.output_video_bitrate);
}
// Assumes output_video_frame_rate is set
@@ -1107,12 +1106,12 @@ DTD
//
var bitrateQualityMap = {
"AVI": [ [ 987, 1382, 2304, 3456, 3800, 4000 ], [ 219, 307, 512, 768, 1536, 2000 ] ],
- "MP4": [ [ 60, 500, 1500, 2500, 4500, 7000 ], [ 30, 500, 1100, 2000, 3500, 4000 ] ],
- "QuickTime": [ [ 20, 1440, 1975, 2880, 3500, 5760 ], [ 20, 200, 320, 439, 640, 1280 ] ],
- "WMV": [ [ 20, 1440, 1975, 2880, 3500, 5760 ], [ 20, 320, 439, 640, 900, 1280 ] ],
- "Flash": [ [ 20, 1440, 1975, 2880, 3500, 5760 ], [ 20, 320, 439, 640, 900, 1280 ] ],
- "MPEG": [ [ 1382, 2304, 3456, 4937, 7000,11520 ], [ 20, 320, 439, 640, 900, 1280 ] ],
- "DV": [ [ 1382, 2304, 3456, 4937, 7000,11520 ], [ 20, 320, 439, 640, 900, 1280 ] ]
+ "MP4": [ [ 150, 500, 1500, 2500, 4500,30000 ], [ 80, 500, 1100, 2000, 3500,30000 ] ],
+ "QuickTime": [ [ 150, 1440, 1975, 2880, 3500, 5760 ], [ 80, 200, 320, 439, 640, 1280 ] ],
+ "WMV": [ [ 150, 1440, 1975, 2880, 3500, 5760 ], [ 80, 320, 439, 640, 900, 1280 ] ],
+ "Flash": [ [ 150, 1440, 1975, 2880, 3500, 5760 ], [ 80, 320, 439, 640, 900, 1280 ] ],
+ "MPEG": [ [ 1382, 2304, 3456, 4937, 7000,11520 ], [ 80, 320, 439, 640, 900, 1280 ] ],
+ "DV": [ [ 1382, 2304, 3456, 4937, 7000,11520 ], [ 80, 320, 439, 640, 900, 1280 ] ]
};
var qminMap = {
@@ -1131,6 +1130,7 @@ DTD
"cvd": [ [ 676, 1126, 1690, 2414, 3500, 5632 ], [ 811, 1352, 2028, 2896, 4000, 6758 ] ],
"tivo": [ 676, 1536, 2611, 3730, 7000, 11520 ],
"ts": [ 676, 1126, 1690, 2414, 3500, 5632 ],
+ "vob": [ 676, 1126, 1690, 2414, 3500, 5632 ],
"720": [ 18500, 18500, 18500, 18500, 18500, 18500 ],
"1080": [ 18500, 18500, 18500, 18500, 18500, 18500 ]
};
@@ -1149,6 +1149,10 @@ DTD
// First value in set is padtop, second is padbottom
var tivoVideoPadding = [ [ -1, -1 ], [ 64, 64 ], [ 96, 112 ], [ -1, -1 ] ];
+ // Video sizes for MPEG-4. 0 means actual size
+ var mpeg4VideoSize = [ [ 320, 240 ], [ 640, 480 ], [ 1024, 768 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ];
+ var mpeg4VideoBitrate = [ 200, 400, 800, 0.6, 0.8, 1.1 ];
+
var qualityStop = number(params.quality_stop);
var quality = number(params.quality);
var h264 = bool(params.h264);
@@ -1191,6 +1195,8 @@ DTD
params.ffmpeg_option_maxrate = "40k";
params.output_video_frame_rate = 10;
}
+ requestedFrameWidth = mpeg4VideoSize[qualityStop][0];
+ requestedFrameHeight = mpeg4VideoSize[qualityStop][1];
break;
case "MPEG":
var bitrateMin = mpegbitrateQualityMap[params.profile][qualityStop] * 1000;
@@ -1565,6 +1571,16 @@ DTD
<menu_item title="TiVo">
<param id="profile" value="tivo" />
</menu_item>
+ <menu_item title="VOB">
+ <script>
+ <![CDATA[
+ setAudioParams("high");
+ params.ffmpeg_option_target = params.ntsc ? "ntsc-vcd" : "pal-vcd";
+ setRecipe();
+ ]]>
+ </script>
+ <param id="profile" value="vob" />
+ </menu_item>
<menu_item title="Transport Stream">
<script>
<![CDATA[

0 comments on commit eec3fff

Please sign in to comment.