Browse Source

Merge branch 'master' of akko/Gazelle into master

spaghetti 7 years ago
parent
commit
1f2f47167a
1 changed files with 28 additions and 1 deletions
  1. 28
    1
      static/functions/upload.js

+ 28
- 1
static/functions/upload.js View File

497
     } else if (sel == 'container') {
497
     } else if (sel == 'container') {
498
       var containerTable = {'Matroska': 'MKV','MPEG-4': 'MP4','AVI': 'AVI','OGG': 'OGM','Windows Media': 'WMV'}
498
       var containerTable = {'Matroska': 'MKV','MPEG-4': 'MP4','AVI': 'AVI','OGG': 'OGM','Windows Media': 'WMV'}
499
       var cont = getval(mi, 'Format')
499
       var cont = getval(mi, 'Format')
500
-      if (containerTable[cont]) $('[name=container]').raw().value = containerTable[cont];
500
+      if (containerTable[cont]) { $('[name=container]').raw().value = containerTable[cont] };
501
+    } else if (sel == 'codec') {
502
+      var codecTable = {'WMV1':'WMV','VC-1':'WMV','HEVC':'HEVC'}
503
+      var codec = getval(mi.slice(mi.search(/^Video$/m)), 'Format')
504
+      var formatProfile = getval(mi.slice(mi.search(/^Video$/m)), 'Format profile')
505
+      var codecID = getval(mi, 'Codec ID')
506
+      var codel = $('[name=codec]').raw()
507
+      if (codec == 'AVC'){
508
+        if (formatProfile == 'High 10@L4' || formatProfile == 'High 10@L5.2') { 
509
+          codel.value = '10-bit h264' 
510
+        } 
511
+        else {
512
+          codel.value = 'h264'
513
+        } 
514
+      } 
515
+      else if (codec == 'MPEG-4 Visual') {
516
+        if (codecID == 'XVID') { 
517
+          codel.value = 'XVID' 
518
+        }
519
+        else {
520
+          codel.value = 'DIVX'
521
+        } 
522
+      } 
523
+      else {
524
+        if (codecTable[codec]) {
525
+          codel.value = codecTable[codec] 
526
+        }
527
+      }
501
     }
528
     }
502
   })
529
   })
503
 }
530
 }

Loading…
Cancel
Save