Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/panzoom/Fruits-4s.smil.xml |
— | — | @@ -32,9 +32,11 @@ |
33 | 33 | dur="1.5s" fill="freeze" values="418,-3,34%,13%;9,1115,41%,20%"/> |
34 | 34 |
|
35 | 35 | <animate attributeName="panZoom" begin="13.0"
|
36 | | - dur="1.5s" fill="freeze" values="9,1115,41%,20%;573,2073,64%,17%"/>
|
| 36 | + dur="1.5s" fill="freeze" values="9,1115,41%,20%;573,2073,64%,17%"/> |
| 37 | +
|
37 | 38 | <animate attributeName="panZoom" begin="16.0"
|
38 | | - dur="1.5s" fill="freeze" values="573,2073,64%,17%;1118,1365,14%,8%"/>
|
| 39 | + dur="1.5s" fill="freeze" values="573,2073,64%,17%;1118,1365,14%,8%"/> |
| 40 | +
|
39 | 41 | <animate attributeName="panZoom" begin="18.0"
|
40 | 42 | dur="1.5s" fill="freeze" values="1118,1365,14%,8%;0,0,100%,100%"/>
|
41 | 43 | </img>
|
— | — | @@ -52,9 +54,7 @@ |
53 | 55 | <tev begin="16s"/>
|
54 | 56 | as well as squeeze-ready organges.
|
55 | 57 | <clear begin="19s"/>
|
56 | | -<!-- The screen does not clear if there is no additional character text.... -->
|
57 | | - .
|
58 | | -
|
| 58 | + Cabbage!!!
|
59 | 59 | </smilText>
|
60 | 60 |
|
61 | 61 | </par>
|
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/tests/VideoTransition.html |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <!doctype html> |
3 | 3 | <html> |
4 | 4 | <head> |
5 | | - <title>Pan Zoom Example</title> |
| 5 | + <title>Video Transistion Example</title> |
6 | 6 | <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
7 | 7 | <!-- <script type="text/javascript" src="../../ResourceLoader.php?class=window.jQuery,mwEmbed&debug=true"></script> --> |
8 | 8 | <script type="text/javascript"> |
Index: branches/MwEmbedStandAlone/modules/AddMedia/tests/Firefogg_GUI.html |
— | — | @@ -1,9 +1,9 @@ |
2 | 2 | <!DOCTYPE HTML> |
3 | 3 | <html><head> |
4 | 4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
5 | | - <title>Firefogg - Make Ogg Video in your Browser</title> |
6 | | - <script type="text/javascript" src="../../../ResourceLoader.php?class=window.jQuery,mwEmbed"></script> |
7 | | - <!--<script type="text/javascript" src="../mwEmbed.js?debug=true"></script> --> |
| 5 | + <title>Firefogg - Make Ogg/Webm Video in your Browser</title> |
| 6 | + <!--<script type="text/javascript" src="../../../ResourceLoader.php?class=window.jQuery,mwEmbed"></script> --> |
| 7 | + <script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
8 | 8 | <style type="text/css" media="all"> |
9 | 9 | body { |
10 | 10 | margin: 0; |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | text-align: center; |
26 | 26 | } |
27 | 27 | h1 { |
28 | | - font-size: 48px; |
| 28 | + font-size: 38px; |
29 | 29 | letter-spacing: 0.25em; |
30 | 30 | margin-bottom: 0; |
31 | 31 | line-height: 0.8em; |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | <a href="http://firefogg.org/index.html"> |
84 | 84 | <img alt="Firefogg" src="http://firefogg.org/png/firefogg.png"/> |
85 | 85 | </a><br> |
86 | | -Make Ogg Video</h1> |
| 86 | +Make Ogg/Webm Video</h1> |
87 | 87 | <br> |
88 | 88 | <div style="margin-right:auto;margin-left:auto;width:500px;"> |
89 | 89 | Note: Your video file will be locally encoded and not upload to any server |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.Firefogg.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | mw.addMessages({ |
8 | 8 | "mwe-upload-transcoded-status" : "Transcoded", |
9 | 9 | "mwe-upload-transcode-in-progress" : "Transcode and upload in progress (do not close this window)", |
10 | | - "fogg-transcoding" : "Encoding video to Ogg", |
| 10 | + "fogg-transcoding" : "Encoding video", |
11 | 11 | "fogg-select_file" : "Select file", |
12 | 12 | "fogg-select_new_file" : "Select new file", |
13 | 13 | "fogg-select_url" : "Select URL", |
— | — | @@ -634,8 +634,7 @@ |
635 | 635 | if ( v.src != _this.fogg.previewUrl ) { |
636 | 636 | mw.log( 'init preview with url:' + _this.fogg.previewUrl ); |
637 | 637 | v.src = _this.fogg.previewUrl; |
638 | | - |
639 | | - // Once it's loaded, seek to the end |
| 638 | + // Once it's loaded, seek to the end ( for ogg ) |
640 | 639 | v.removeEventListener( "loadedmetadata", seekToEnd, true ); |
641 | 640 | v.addEventListener( "loadedmetadata", seekToEnd, true ); |
642 | 641 | |
— | — | @@ -647,7 +646,7 @@ |
648 | 647 | var previewTimer = setInterval( function() { |
649 | 648 | if ( _this.fogg.status() != "encoding" ) { |
650 | 649 | clearInterval( previewTimer ); |
651 | | - _this.show_preview == false; // Closure compiler marks this as irrelevant -papy |
| 650 | + _this.show_preview == false; |
652 | 651 | } |
653 | 652 | if ( _this.show_preview == true ) { |
654 | 653 | v.load(); |
— | — | @@ -784,7 +783,7 @@ |
785 | 784 | doLocalEncodeAndSave: function() { |
786 | 785 | var _this = this; |
787 | 786 | if ( !this.fogg ) { |
788 | | - mw.log( 'doLocalEncodeAndSave: no Firefogg object!' ); |
| 787 | + mw.log( 'Error: doLocalEncodeAndSave: no Firefogg object!' ); |
789 | 788 | return false; |
790 | 789 | } |
791 | 790 | // Setup the interface progress indicator: |
— | — | @@ -792,8 +791,9 @@ |
793 | 792 | 'title' : gM( 'fogg-transcoding' ), |
794 | 793 | 'statusType' : 'transcode' |
795 | 794 | } ); |
| 795 | + |
796 | 796 | // Add the preview controls if transcoding: |
797 | | - if ( !_this.getEncoderSettings()[ 'passthrough' ] ) { |
| 797 | + if ( !_this.getEncoderSettings()[ 'passthrough' ] && _this.current_encoder_settings['videoCodec'] != 'vp8' ) { |
798 | 798 | _this.createPreviewControls(); |
799 | 799 | } |
800 | 800 | |
— | — | @@ -801,6 +801,7 @@ |
802 | 802 | // Firefogg shows the "save as" dialog box, and sets the path chosen as |
803 | 803 | // the destination for a later encode() call. |
804 | 804 | if ( !this.fogg.saveVideoAs() ) { |
| 805 | + _this.ui.close(); |
805 | 806 | // User clicked "cancel" |
806 | 807 | return false; |
807 | 808 | } |
— | — | @@ -824,7 +825,7 @@ |
825 | 826 | var _this = this; |
826 | 827 | _this.ui.setPrompt( gM( 'fogg-encoding-done' ), |
827 | 828 | gM( 'fogg-encoding-done' ) + '<br>' + |
828 | | - //show the video at full resolution upto 720px wide |
| 829 | + // Show the video at full resolution upto 720px wide |
829 | 830 | '<video controls="true" style="margin:auto" id="fogg_final_vid" '+ |
830 | 831 | 'src="' +_this.fogg.previewUrl + '"></video>' |
831 | 832 | ); |
— | — | @@ -895,7 +896,14 @@ |
896 | 897 | ' passthrough:' + settings['passthrough'] ); |
897 | 898 | |
898 | 899 | this.current_encoder_settings = settings; |
| 900 | + } |
| 901 | + //Update the format based on codec selection |
| 902 | + if( this.current_encoder_settings['videoCodec'] == 'vp8' ){ |
| 903 | + this.fogg.setFormat('webm'); |
| 904 | + } else { |
| 905 | + this.fogg.setFormat('ogg'); |
899 | 906 | } |
| 907 | + |
900 | 908 | return this.current_encoder_settings; |
901 | 909 | }, |
902 | 910 | |
— | — | @@ -1131,6 +1139,8 @@ |
1132 | 1140 | |
1133 | 1141 | var encoderSettings = this.getEncoderSettings(); |
1134 | 1142 | |
| 1143 | + // Check for special encode settings that remap things. |
| 1144 | + |
1135 | 1145 | // Check if encoderSettings passthrough is on ( then skip the encode ) |
1136 | 1146 | if( encoderSettings['passthrough'] == true) { |
1137 | 1147 | // Firefogg requires an encode request to setup a the file to be uploaded. |
— | — | @@ -1147,7 +1157,10 @@ |
1148 | 1158 | var encodingStatus = function() { |
1149 | 1159 | var status = _this.fogg.status(); |
1150 | 1160 | |
1151 | | - if ( _this.show_preview == true && _this.fogg.state == 'encoding' ) { |
| 1161 | + if ( _this.show_preview == true |
| 1162 | + && _this.fogg.state == 'encoding' |
| 1163 | + // No way to seek in VP8 atm |
| 1164 | + && _this.current_encoder_settings['videoCodec'] != 'vp8') { |
1152 | 1165 | _this.renderPreview(); |
1153 | 1166 | } |
1154 | 1167 | |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.FirefoggGUI.js |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | */ |
5 | 5 | |
6 | 6 | mw.addMessages({ |
7 | | - "fogg-save_local_file" : "Save Ogg", |
| 7 | + "fogg-save_local_file" : "Encode to File", |
8 | 8 | "fogg-help-sticky" : "Help (click to stick)", |
9 | 9 | "fogg-cg-preset" : "Preset: <strong>$1<\/strong>", |
10 | 10 | "fogg-cg-quality" : "Basic quality and resolution control", |
— | — | @@ -12,9 +12,11 @@ |
13 | 13 | "fogg-cg-advVideo" : "Advanced video encoding controls", |
14 | 14 | "fogg-cg-advAudio" : "Advanced audio encoding controls", |
15 | 15 | "fogg-preset-custom" : "Custom settings", |
16 | | - "fogg-webvideo-desc" : "Web video Theora, Vorbis 400 kbit\/s and 400px maximum width", |
17 | | - "fogg-savebandwidth-desc" : "Low bandwidth Theora, Vorbis 164 kbit\/s and 200px maximum width", |
18 | | - "fogg-highquality-desc" : "High quality Theora, Vorbis 1080px maximum width", |
| 16 | + "fogg-webvideo-desc" : "Ogg Web video Theora, Vorbis 600 kbit\/s and 400px maximum width", |
| 17 | + "fogg-savebandwidth-desc" : "Ogg Low bandwidth Theora, Vorbis 164 kbit\/s and 200px maximum width", |
| 18 | + "fogg-highquality-desc" : "Ogg High quality Theora, Vorbis 1080px maximum width", |
| 19 | + "fogg-webvideo-webm-desc" : "Webm Web video VP8 600 kbit\/s and 480px maximum width", |
| 20 | + "fogg-highquality-webm-desc" : "Webm High quality VP8 1080px maximum width", |
19 | 21 | "fogg-videoQuality-title" : "Video quality", |
20 | 22 | "fogg-videoQuality-help" : "Used to set the <i>visual quality<\/i> of the encoded video (not used if you set bitrate in advanced controls below).", |
21 | 23 | "fogg-starttime-title" : "Start second", |
— | — | @@ -24,7 +26,7 @@ |
25 | 27 | "fogg-audioQuality-title" : "Audio quality", |
26 | 28 | "fogg-audioQuality-help" : "Used to set the <i>acoustic quality<\/i> of the encoded audio (not used if you set bitrate in advanced controls below).", |
27 | 29 | "fogg-videoCodec-title" : "Video codec", |
28 | | - "fogg-videoCodec-help" : "Used to select the clip video codec. Presently only Theora is supported. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Theora\">Theora codec<\/a>.", |
| 30 | + "fogg-videoCodec-help" : "Select the clip video codec. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Theora\">Theora codec<\/a>. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Webm\">VP8 codec<\/a>", |
29 | 31 | "fogg-audioCodec-title" : "Audio codec", |
30 | 32 | "fogg-audioCodec-help" : "Used to set the clip audio codec. Presently only Vorbis is supported. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Vorbis\">Vorbis codec<\/a>", |
31 | 33 | "fogg-width-title" : "Video width", |
— | — | @@ -121,7 +123,7 @@ |
122 | 124 | 'custom': { |
123 | 125 | 'descKey': 'fogg-preset-custom', |
124 | 126 | 'conf': {} |
125 | | - }, |
| 127 | + }, |
126 | 128 | 'webvideo': { |
127 | 129 | 'desc': gM( 'fogg-webvideo-desc' ), |
128 | 130 | 'conf': { |
— | — | @@ -151,11 +153,31 @@ |
152 | 154 | 'audioQuality' : 3, |
153 | 155 | 'noUpscaling' : true |
154 | 156 | } |
| 157 | + }, |
| 158 | + 'webvideo_webm': { |
| 159 | + 'desc': gM( 'fogg-webvideo-webm-desc' ), |
| 160 | + 'conf': { |
| 161 | + 'videoCodec' : 'vp8', |
| 162 | + 'maxSize' : 480, |
| 163 | + 'videoBitrate' : 544, |
| 164 | + 'audioBitrate' : 96, |
| 165 | + 'noUpscaling' : true |
| 166 | + } |
| 167 | + }, |
| 168 | + 'webvideo_webmhq': { |
| 169 | + 'desc' : gM('fogg-highquality-webm-desc'), |
| 170 | + 'conf' : { |
| 171 | + 'videoCodec' : 'vp8', |
| 172 | + 'maxSize' : 1080, |
| 173 | + 'videoQuality' : 6, |
| 174 | + 'audioQuality' : 3, |
| 175 | + 'noUpscaling' : true |
| 176 | + } |
155 | 177 | } |
156 | 178 | } |
157 | 179 | }, |
158 | 180 | |
159 | | - // Customised configuration hashtable |
| 181 | + // Customized configuration hashtable |
160 | 182 | local_settings: {}, |
161 | 183 | |
162 | 184 | // Core Firefogg default encoder configuration |
— | — | @@ -184,7 +206,7 @@ |
185 | 207 | }, |
186 | 208 | 'videoCodec': { |
187 | 209 | 'default' : "theora", |
188 | | - 'selectVal' : [ 'theora' ], |
| 210 | + 'selectVal' : [ 'theora', 'vp8' ], |
189 | 211 | 'type' : "select", |
190 | 212 | 'group' : "quality" |
191 | 213 | }, |
— | — | @@ -452,7 +474,6 @@ |
453 | 475 | '</span>' + |
454 | 476 | '</label></td><td valign="top">'; |
455 | 477 | // Get the default value (or an empty string if there is no default) |
456 | | - |
457 | 478 | var defaultValue = this.default_encoder_config[configKey]['default']; |
458 | 479 | if ( !defaultValue ) { |
459 | 480 | defaultValue = ''; |
— | — | @@ -497,7 +518,7 @@ |
498 | 519 | for ( var i in configEntry.selectVal ) { |
499 | 520 | var val = configEntry.selectVal[i]; |
500 | 521 | if ( typeof val == 'string' ) { |
501 | | - var sel = ( configEntry.selectVal[i] == val ) ? ' selected' : ''; |
| 522 | + var sel = ( defaultValue == val ) ? ' selected' : ''; |
502 | 523 | out += '<option value="' + val + '"'+sel+'>' + val + '</option>'; |
503 | 524 | } else if ( typeof val == 'object' ) { |
504 | 525 | for ( var key in val ) { |
— | — | @@ -738,16 +759,17 @@ |
739 | 760 | /** |
740 | 761 | * Update the UI due to a change in preset |
741 | 762 | */ |
742 | | - updatePresetSelection: function( presetKey ) { |
| 763 | + updatePresetSelection: function( presetKey ) { |
743 | 764 | // Update the local configuration |
744 | | - this.local_settings['default'] = presetKey; |
| 765 | + this.local_settings['default'] = presetKey; |
745 | 766 | mw.log( 'update preset desc: ' + presetKey ); |
746 | 767 | var presetDesc = ''; |
747 | 768 | if ( this.local_settings.presets[presetKey].desc ) { |
748 | 769 | presetDesc = this.local_settings.presets[presetKey].desc; |
749 | 770 | } else { |
750 | 771 | presetDesc = gM( 'fogg-preset-' + presetKey ); |
751 | | - } |
| 772 | + } |
| 773 | + |
752 | 774 | // Update the preset title |
753 | 775 | $j( this.selector + ' .gd_preset' ) |
754 | 776 | .html( gM( 'fogg-cg-preset', presetDesc ) ); |
— | — | @@ -755,7 +777,7 @@ |
756 | 778 | $j( this.selector + ' ._preset_select' ).val( presetKey ); |
757 | 779 | }, |
758 | 780 | |
759 | | - /* |
| 781 | + /** |
760 | 782 | * Update the interface due to a change in a particular config key |
761 | 783 | */ |
762 | 784 | updateInterfaceValue: function( confKey, val ) { |
— | — | @@ -852,9 +874,10 @@ |
853 | 875 | * into which a video has already been selected. Overrides the base method. |
854 | 876 | */ |
855 | 877 | getEncoderSettings: function() { |
856 | | - if ( this.current_encoder_settings != null ) { |
857 | | - return this.current_encoder_settings; |
858 | | - } |
| 878 | + // update the encoder settings (from local settings) |
| 879 | + var pKey = this.local_settings['default']; |
| 880 | + // Update the current encoder settings: |
| 881 | + this.current_encoder_settings = this.local_settings.presets[ pKey ].conf; |
859 | 882 | |
860 | 883 | // Call the base function |
861 | 884 | // Note that settings will be a reference and can be modified |
— | — | @@ -981,10 +1004,7 @@ |
982 | 1005 | this.updateValuesInHtml(); |
983 | 1006 | }, |
984 | 1007 | |
985 | | - doEncode: function( progressCallback, doneCallback ) { |
986 | | - // update the encoder settings (from local settings) |
987 | | - pKey = this.local_settings['default']; |
988 | | - this.current_encoder_settings = this.local_settings.presets[ pKey ].conf; |
| 1008 | + doEncode: function( progressCallback, doneCallback ) { |
989 | 1009 | this.basefogg_doEncode( progressCallback, doneCallback ); |
990 | 1010 | }, |
991 | 1011 | |
Index: branches/MwEmbedStandAlone/modules/AddMedia/AddMedia.i18n.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | 'mwe-filesource' => 'Source:', |
33 | 33 | 'mwe-filestatus' => 'Copyright status:', |
34 | 34 | 'mwe-loading-add-media-wiz' => 'Loading add media wizard', |
35 | | - 'fogg-save_local_file' => 'Save Ogg', |
| 35 | + 'fogg-save_local_file' => 'Encode to File', |
36 | 36 | 'fogg-help-sticky' => 'Help (click to stick)', |
37 | 37 | 'fogg-cg-preset' => 'Preset: <strong>$1</strong>', |
38 | 38 | 'fogg-cg-quality' => 'Basic quality and resolution control', |
— | — | @@ -40,9 +40,11 @@ |
41 | 41 | 'fogg-cg-advVideo' => 'Advanced video encoding controls', |
42 | 42 | 'fogg-cg-advAudio' => 'Advanced audio encoding controls', |
43 | 43 | 'fogg-preset-custom' => 'Custom settings', |
44 | | - 'fogg-webvideo-desc' => 'Web video Theora, Vorbis 400 kbit/s and 400px maximum width', |
45 | | - 'fogg-savebandwidth-desc' => 'Low bandwidth Theora, Vorbis 164 kbit/s and 200px maximum width', |
46 | | - 'fogg-highquality-desc' => 'High quality Theora, Vorbis 1080px maximum width', |
| 44 | + 'fogg-webvideo-desc' => 'Ogg Web video Theora, Vorbis 600 kbit\/s and 400px maximum width', |
| 45 | + 'fogg-savebandwidth-desc' => 'Ogg Low bandwidth Theora, Vorbis 164 kbit\/s and 200px maximum width', |
| 46 | + 'fogg-highquality-desc' => 'Ogg High quality Theora, Vorbis 1080px maximum width', |
| 47 | + 'fogg-webvideo-webm-desc' => 'Webm Web video VP8 600 kbit\/s and 480px maximum width', |
| 48 | + 'fogg-highquality-webm-desc' => 'Webm High quality VP8 1080px maximum width', |
47 | 49 | 'fogg-videoQuality-title' => 'Video quality', |
48 | 50 | 'fogg-videoQuality-help' => 'Used to set the <i>visual quality</i> of the encoded video (not used if you set bitrate in advanced controls below).', |
49 | 51 | 'fogg-starttime-title' => 'Start second', |
— | — | @@ -52,7 +54,7 @@ |
53 | 55 | 'fogg-audioQuality-title' => 'Audio quality', |
54 | 56 | 'fogg-audioQuality-help' => 'Used to set the <i>acoustic quality</i> of the encoded audio (not used if you set bitrate in advanced controls below).', |
55 | 57 | 'fogg-videoCodec-title' => 'Video codec', |
56 | | - 'fogg-videoCodec-help' => 'Used to select the clip video codec. Presently only Theora is supported. More about the <a target="_new" href="http://en.wikipedia.org/wiki/Theora">Theora codec</a>.', |
| 58 | + 'fogg-videoCodec-help' => 'Select the clip video codec. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Theora\">Theora codec<\/a>. More about the <a target=\"_new\" href=\"http:\/\/en.wikipedia.org\/wiki\/Webm\">VP8 codec<\/a>', |
57 | 59 | 'fogg-audioCodec-title' => 'Audio codec', |
58 | 60 | 'fogg-audioCodec-help' => 'Used to set the clip audio codec. Presently only Vorbis is supported. More about the <a target="_new" href="http://en.wikipedia.org/wiki/Vorbis">Vorbis codec</a>', |
59 | 61 | 'fogg-width-title' => 'Video width', |
— | — | @@ -195,7 +197,7 @@ |
196 | 198 | 'rsd-search-timeout' => 'The search request did not complete. The server may be down experiencing heavy load. You can try again later', |
197 | 199 | 'mwe-upload-transcoded-status' => 'Transcoded', |
198 | 200 | 'mwe-upload-transcode-in-progress' => 'Transcode and upload in progress (do not close this window)', |
199 | | - 'fogg-transcoding' => 'Encoding video to Ogg', |
| 201 | + 'fogg-transcoding' => 'Encoding video', |
200 | 202 | 'fogg-select_file' => 'Select file', |
201 | 203 | 'fogg-select_new_file' => 'Select new file', |
202 | 204 | 'fogg-select_url' => 'Select URL', |