summaryrefslogtreecommitdiff
path: root/multimedia/sinthgunt/sinthgunt.patch
blob: 647357c7de6a04d38f4884d48ca3de3c5be12ab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
diff -u3r a/Sinthgunt/app.py b/Sinthgunt/app.py
--- a/Sinthgunt/app.py	2010-11-22 21:27:55.000000000 +0300
+++ b/Sinthgunt/app.py	2017-02-17 22:03:35.886000000 +0300
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
 # $Id: app.py 196 2010-11-22 18:27:50Z kare1234 $
 
 ####################
@@ -35,17 +36,21 @@
 # Import Python Libraries
 ####################
 import os
+import errno
 import sys
 import pygtk; pygtk.require("2.0")
 import gtk.glade
 import subprocess
 import gobject
 import time
-import sys
-import urllib
 from xml.etree import ElementTree as etree
 
-
+def logfile_remove(self):
+    try:
+        os.remove(self)
+    except OSError as e: # this would be "except OSError, e:" before Python 2.6
+        if e.errno != errno.ENOENT: # errno.ENOENT = no such file or directory
+            raise # re-raise exception if a different error occurred
 
 def main():
     ####################
@@ -58,14 +63,15 @@
         print('It seems, that ffmpeg is not installed on this computer. \nSee http://www.sinthgunt.org for installation instructions.') # Display error message, then carry on
 
     # Define data and temp directories
-    DATA_DIR="/usr/share/sinthgunt/"
-    TEMP_DIR="/tmp/"
+    DATA_DIR = "/usr/share/sinthgunt/"
+    TEMP_DIR = "/tmp/"
     # Opens the log file and write the name and curent data and time
     logfile_filename = os.path.expanduser("~/.sinthgunt.log")
+    logfile_remove(logfile_filename)
     logfile = open(logfile_filename, 'a')
-    logfile.writelines('****** Sinthgunt log file START - '+
-            str(time.ctime())+' *******\n')
-    logo_filename=DATA_DIR+"logo.png"
+    logfile.writelines('\n****** Sinthgunt log file START - '+
+            str(time.ctime())+' *******\n\n')
+    logo_filename = DATA_DIR+"logo.png"
   
     # Carry over variables to class
     sinthgunt.logo_filename = logo_filename
@@ -98,7 +104,7 @@
         # - 
         ####################
     
-    def ResetSinthgunt(self,widget):
+    def ResetSinthgunt(self, widget):
         ####################
         # Description
         # ===========
@@ -112,10 +118,10 @@
         #  
         ####################
         # Write default stuff to gui
-        self.labelGuide.set_text('Input file(s):')
+        self.labelGuide.set_text("Input file(s):")
         self.labelOperation.set_text('')
         context_id = self.statusbar.get_context_id("Activation")
-        self.statusbar.push(context_id,"Welcome to sinthgunt!")
+        self.statusbar.push(context_id, "Welcome to sinthgunt!")
         self.labelInput.set_text('')
         
         # Load the logo
@@ -143,8 +149,8 @@
         # Load XML config file
         self.parseXML()
         # Local variables
-        categorylist=self.categorylist  # List of categories
-        presetlist=self.presetlist      # List of presets in the categories
+        categorylist = self.categorylist  # List of categories
+        presetlist = self.presetlist      # List of presets in the categories
         # Connect to menu
         actionmenu = self.wTree.get_widget("menu2")
         # Constants
@@ -154,7 +160,7 @@
         counter2 = 0    # Counter that keeps track of the codecs in the self.preset_enabled list
 
         # Create first, dummy item in group. All later items are attached to this group
-        item = gtk.RadioMenuItem(group=None,label='') 
+        item = gtk.RadioMenuItem(group = None, label = '') 
         # Initialise presetmenuheaderholder, a holder for the submenues
         self.presetmenu1headerholder = []
         self.preset_enabled = []
@@ -170,32 +176,32 @@
                 if presetlist[i][0] == categorylist[counter]:
                     self.preset_enabled.append('')
                     # Create radio button for the preset
-                    item = gtk.RadioMenuItem(group=item,label=presetlist[i][1])
+                    item = gtk.RadioMenuItem(group = item, label = presetlist[i][1])
                     # What to do when the radiobutton is clicked
                     item.connect("activate", self.menuradiobuttonselect)
                     # Check to see if the codecs required by the preset are supported by the users version of ffmpeg
                     for requiredcodec in self.presetlist[i][4]:
-                            flag =0
+                            flag = 0
                             notfound = 1
                             for codec in self.codecs:
                                 # If encoding true
-                                if requiredcodec==codec[0] and codec[1]==True and flag==0: # preset will work                    
+                                if requiredcodec == codec[0] and codec[1] == True and flag == 0: # preset will work                    
                                     notfound = 0
-                                    self.preset_enabled[counter2]=True
+                                    self.preset_enabled[counter2] = True
                                 # if encoding false
-                                if requiredcodec==codec[0] and codec[1]==False:
+                                if requiredcodec == codec[0] and codec[1] == False:
                                     label =  item.get_children()[0]
                                     label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#888888')) # preset will not work - grayed out
                                     notfound = 0
-                                    flag=1
+                                    flag = 1
                                     item.set_tooltip_text('Your version of ffmpeg does not support this preset.')
-                                    self.preset_enabled[counter2]=False
+                                    self.preset_enabled[counter2] = False
                             # if codec was not found
-                            if notfound==1 and flag==0:
+                            if notfound == 1 and flag == 0:
                                     label =  item.get_children()[0]
                                     label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#888888')) # preset might work - grayed out
                                     item.set_tooltip_text('Your version of ffmpeg does not support this preset.')    
-                                    self.preset_enabled[counter2]=False
+                                    self.preset_enabled[counter2] = False
                     counter2 = counter2+1
                     # add item to the headerholder
                     self.presetmenu1headerholder[counter].append(item)
@@ -219,41 +225,42 @@
         # ===============
         # 
         ####################
-        context_id = self.statusbar.get_context_id("Activation")        
+        context_id = self.statusbar.get_context_id("Activation")      
         output = ''
         try:
             output_raw = str(self.process.stdout.read(80))
-            output = output_raw.replace('\n','')
+            output = output_raw.replace('\n', '').replace('\r', '').replace('fps=', 'fps= ')
         except:
             pass
-        self.logfile.writelines('Conversion status: '+output+'\n')
+        self.logfile.writelines('Output: '+output+'\n')
         output_split = output.split(' ')
-        N=len(output_split)
+        N = len(output_split)
         
         # get the number of frames converted
         for i in range(N):
-            if i>=2 and output_split[i]=='fps=':
-               file_frames_completed = output_split[i-1]              
-               self.logfile.writelines('Frames completed: '+file_frames_completed+'\n')
-               # update progressbar and statusbar
-               try:
-                   context_id = self.statusbar.get_context_id("Activation")  
-                   self.statusbar.push(context_id,'Frames converted: '+str(file_frames_completed))
-               except:
-                   pass
-               try:
-                   self.progressbar.set_fraction(float(\
-                           file_frames_completed)/float(self.file_frames))
-                   self.progressbar.set_text(str(file_frames_completed)+\
-                           ' of '+str(self.file_frames)+' frames converted.')
-               except:
-                   pass
+            if i >= 2 and output_split[i] == 'fps=':
+                file_frames_completed = output_split[i-1]
+		split_file_frames_completed = file_frames_completed.replace('frame=', '')
+                # update progressbar and statusbar
+                try:
+                    context_id = self.statusbar.get_context_id("Activation")  
+                    self.statusbar.push(context_id, 'Frames converted: '+str(split_file_frames_completed))
+                except:
+                    pass
+                try:
+                    self.progressbar.set_fraction(float(\
+                            split_file_frames_completed)/float(self.file_frames))
+                    #self.progressbar.set_text(str(split_file_frames_completed)+\
+                            #' of '+str(self.file_frames)+' frames converted.')
+                    self.progressbar.set_text('Converting '+self.input[self.NextInputFileToConvert])
+                except:
+                    pass
 
         # Look for Classic errors. This should be done in a separate function sometime soon
         # "Must supply at least one output file"
         for i in range(N-1):
-            if i>=2 and output_split[i]=='Must=' and output_split[i+1]=='supply': # an error has occured
-                self.statusbar.push(context_id,'An error has occured. See the log file for details.')               
+            if i >= 2 and output_split[i] == 'Must=' and output_split[i+1] == 'supply': # an error has occured
+                self.statusbar.push(context_id, 'An error has occured. See the log file for details.')               
                 self.progressbar.set_fraction(0.0)
                 self.progressbar.set_text('')
                 return False 
@@ -261,24 +268,25 @@
 
 
         # if no output detected, stop watching the process and write to statusbar
-        if output =='':     
-            self.statusbar.push(context_id,'Conversion completed!')
+        if output == '':     
+            self.statusbar.push(context_id, 'Conversion completed!')
+	    self.progressbar.set_text('')
             self.progressbar.set_fraction(0.99999)
             # We are now done with the current file. Move on to next one if there are any left
             if self.NextInputFileToConvert <= len(self.input) - 2:
                 self.NextInputFileToConvert = self.NextInputFileToConvert + 1
                 self.activate(self.window)
             else:
-                self.NextInputFileToConvert = 0
+                #self.NextInputFileToConvert = 0
                 self.ResetSinthgunt(self.window)
-                self.statusbar.push(context_id,'Conversion completed!')
+                self.statusbar.push(context_id, 'Conversion completed!')
             return False    
         else:
             return True
   
     
     
-    def menuopenfile(self,widget):
+    def menuopenfile(self, widget):
         ####################
         # Description 
         # ===========
@@ -322,6 +330,8 @@
         filter.add_pattern("*.3G2")
         filter.add_pattern("*.mts")
         filter.add_pattern("*.MTS")
+        filter.add_pattern("*.mkv")
+        filter.add_pattern("*.MKV")
         fc.add_filter(filter)
         # all files       
         filter = gtk.FileFilter()
@@ -357,7 +367,7 @@
         #
         ####################
         # generate thumbnail from input file
-        self.thumbnail_filename=self.generateThumbnail(self.input[-1])
+        self.thumbnail_filename = self.generateThumbnail(self.input[-1])
         
         # update thumbnail
         try:
@@ -369,20 +379,19 @@
         
         # fill label with file info
         self.labelInput.set_text('')
-        self.labelInput.set_text('Codec info for '+self.input[-1]+'\n\n'\
-                                'Audio codec: '+str(self.audio_codec[0])+'\n'\
-                                'Audio bitrate: '+str(self.audio_codec[4])+' kb/s\n'\
-                                +'Video codec: '+ str(self.video_codec[0])\
-                                +'\nVideo resolution: '+ str(self.video_codec[2])\
-                                +'\nVideo bitrate: '+ str(self.video_codec[3])\
-                                +'\n'+'Number of frames: '+str(self.file_frames))
-        self.ListOfInputFiles='\n'
+        self.labelInput.set_text('Codec info for\n'\
+                                + self.input[-1] +'\n\n'\
+                                'Audio codec: '+ str(self.audio_codec[0]) +'\n'\
+                                'Video codec: '+ str(self.video_codec[0]) +'\n'\
+                                'Bitrate: '+ str(self.video_codec[1])+'\n'
+                                'Number of frames: '+str(self.file_frames)+'\n')
+        self.ListOfInputFiles = '\n'
         for i in range(len(self.input)):
-            StringToAdd=str(i+1)+'. '+self.input[i]+'\n'
-            self.ListOfInputFiles=self.ListOfInputFiles+StringToAdd
+            StringToAdd = str(i+1)+'. '+self.input[i]+'\n'
+            self.ListOfInputFiles = self.ListOfInputFiles+StringToAdd
         self.labelGuide.set_text('Input file(s): '+self.ListOfInputFiles)
 
-    def RemoveInputFile(self,widget):
+    def RemoveInputFile(self, widget):
         ####################
         # Description
         # ===========
@@ -398,7 +407,7 @@
         #
         ####################      
         #base this on a message dialog  
-        dialog = gtk.MessageDialog(None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_QUESTION,gtk.BUTTONS_OK_CANCEL,None)  
+        dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, None)  
         dialog.set_markup('Enter the number of the input file you wish to remove')  
         #create the text input field  
         entry = gtk.Entry()  
@@ -414,18 +423,17 @@
         dialog.vbox.pack_end(hbox, True, True, 0)  
         dialog.show_all()  
         #go go go  
-        Response=dialog.run()  
+        Response = dialog.run()  
         if Response == gtk.RESPONSE_OK: 
             try:        
                 InputFileToRemove = int(entry.get_text())-1
-                 # Clear everything if we are removing the last tile
+                # Clear everything if we are removing the last tile
                 if len(self.input) >= 2:
                     del self.input[InputFileToRemove]
                     self.setinput(widget)
                     self.NextInputFileToConvert = 0
                 else:
                     self.ResetSinthgunt(widget)
-                    self.ResetSinthgunt(widget)
             except:
                 pass
 
@@ -447,25 +455,20 @@
         # This function uses ffmpeg to generate a thumbnail.
         ####################
 
-        # get file base name
-        temp = videoFile.split('/')
-        N = len(temp)        
-        videoFileBaseName = temp[N-1]
-        # set thumbnail filename
-        thumbnailFileName = sinthgunt.TEMP_DIR+str(videoFileBaseName)+".jpg"
+        thumbnailFileName = sinthgunt.TEMP_DIR+"videothumbnail.jpg"
 
         # ffmpeg command line
-        subcommand = ['ffmpeg', '-y', '-itsoffset', '-5' ,'-i' ,videoFile,\
-                "-vcodec","mjpeg","-vframes", "1", "-an", "-f", "rawvideo", "-s", "170x128",\
-                thumbnailFileName]
+        subcommand = ['ffmpeg', '-v', 'warning', '-y', '-itsoffset', '-5', '-i', videoFile, \
+                '-vcodec', 'mjpeg', '-vframes', '1', '-an', '-f', 'rawvideo', '-s', '172x129', \
+                '-vf', 'crop=4/3*in_h:in_h', thumbnailFileName]
     
-        thumbProcess = subprocess.Popen(args=subcommand,
-                            stdout=subprocess.PIPE,stdin=subprocess.PIPE,
-                            stderr=subprocess.STDOUT,shell=False)
+        thumbProcess = subprocess.Popen(args = subcommand,
+                            stdout = subprocess.PIPE, stdin = subprocess.PIPE,
+                            stderr = subprocess.STDOUT, shell = False)
 
         # Read output from thumbnail process and write it to the log file
         output = str(thumbProcess.stdout.read(100))
-        self.logfile.writelines('Thumbnail process status: '+output+'\n')
+        self.logfile.writelines('\n\nThumbnail process status: '+output+'\n')
 
         # Wait for thumbnail process to complete
         thumbProcess.wait()
@@ -474,7 +477,7 @@
         return thumbnailFileName
      
      
-    def generatePreview(self,widget):
+    def generatePreview(self, widget):
         ####################
         # Description
         # ===========
@@ -495,17 +498,17 @@
         try:
             operation = self.operation_radiobutton
             context_id = self.statusbar.get_context_id("Activation")  
-            self.statusbar.push(context_id,'Creating preview of '+self.input[-1]+'. You can view it using the Play menu.')
+            self.statusbar.push(context_id, 'Creating preview of '+self.input[-1]+'. You can view it using the Play menu.')
         
             #for now, operate on last input file
-            InputFileName=self.input[-1]
+            InputFileName = self.input[-1]
             for i in range(self.Npreset):
                 if operation == self.presetlist[i][1]:
                     # generate command line in subprocess syntax
-                    subcommand = ['/usr/bin/ffmpeg','-y','-i']
+                    subcommand = ['/usr/bin/ffmpeg', '-y', '-i']
                     subcommand.extend([InputFileName])
-                    subcommand.extend(['-t','5'])
-                    temp1=self.presetlist[i][2].split(' ')
+                    subcommand.extend(['-t', '5'])
+                    temp1 = self.presetlist[i][2].split(' ')
                     # remove empty entries ('') from the array
                     for ii in range(20):
                         try:
@@ -514,19 +517,19 @@
                             pass
                     temp1.extend([str(InputFileName+"_preview."+self.presetlist[i][3])])
                     # path to output file
-                    self.output=str(InputFileName+"_preview."+self.presetlist[i][3])
+                    self.output = str(InputFileName+"_preview."+self.presetlist[i][3])
                     subcommand.extend(temp1)
                     # Start converting
-                    self.process = subprocess.Popen(args=subcommand,
-                            stdout=subprocess.PIPE,stdin=subprocess.PIPE,
-                            stderr=subprocess.STDOUT,shell=False)
+                    self.process = subprocess.Popen(args = subcommand,
+                            stdout = subprocess.PIPE, stdin = subprocess.PIPE,
+                            stderr = subprocess.STDOUT, shell = False)
                     
-                    self.logfile.writelines('Conversion command: '+str(subcommand)+'\n')
+                    self.logfile.writelines('\nConversion command:\n'+str(subcommand)+'\n')
         except:
             self.no_file_selected_dialog(widget)
 
 
-    def BeginConversion(self,widget,InputFileIndex):
+    def BeginConversion(self, widget, InputFileIndex):
         ####################
         # Description
         # ===========
@@ -542,7 +545,7 @@
         ####################      
       
        
-    def activate(self,widget):
+    def activate(self, widget):
         ####################
         # Description
         # ===========
@@ -563,17 +566,17 @@
             operation = self.operation_radiobutton
             self.progressbar.set_fraction(0.01)
             context_id = self.statusbar.get_context_id("Activation")  
-            self.statusbar.push(context_id,'Converting '+self.input[self.NextInputFileToConvert])
+            self.statusbar.push(context_id, 'Converting '+self.input[self.NextInputFileToConvert])
         
             #start watching output
-            self.source_id = gobject.timeout_add(500, self.checkfile)
-            InputFileName=self.input[self.NextInputFileToConvert]
+            self.source_id = gobject.timeout_add(300, self.checkfile)
+            InputFileName = self.input[self.NextInputFileToConvert]
             for i in range(self.Npreset):
                 if operation == self.presetlist[i][1]:
                     # generate command line in subprocess syntax
-                    subcommand = ['/usr/bin/ffmpeg','-y','-i']
+                    subcommand = ['/usr/bin/ffmpeg', '-y', '-i']
                     subcommand.extend([InputFileName])
-                    temp1=self.presetlist[i][2].split(' ')
+                    temp1 = self.presetlist[i][2].split(' ')
                     # remove empty entries ('') from the array
                     for ii in range(20):
                         try:
@@ -582,19 +585,19 @@
                             pass
                     temp1.extend([str(InputFileName+"."+self.presetlist[i][3])])
                     # path to output file
-                    self.output=str(InputFileName+"."+self.presetlist[i][3])
+                    self.output = str(InputFileName+"."+self.presetlist[i][3])
                     subcommand.extend(temp1)
                     # Start converting
-                    self.process = subprocess.Popen(args=subcommand,
-                            stdout=subprocess.PIPE,stdin=subprocess.PIPE,
-                            stderr=subprocess.STDOUT,shell=False)
+                    self.process = subprocess.Popen(args = subcommand,
+                            stdout = subprocess.PIPE, stdin = subprocess.PIPE,
+                            stderr = subprocess.STDOUT, shell = False)
                     
-                    self.logfile.writelines('Conversion command: '+str(subcommand)+'\n')
+                    self.logfile.writelines('\nConversion command:\n'+str(subcommand)+'\n')
         except:
             self.no_file_selected_dialog(widget)
 
 
-    def stop(self,widget):
+    def stop(self, widget):
         ####################
         # Description
         # ===========
@@ -608,19 +611,19 @@
         #
         ####################
         try:
-            os.kill(self.process.pid,9)
+            os.kill(self.process.pid, 9)
             gobject.source_remove(self.source_id)
             self.progressbar.set_fraction(0.0)
             self.progressbar.set_text('')
-            self.logfile.writelines('Conversion aborted by user\n')
+            self.logfile.writelines('\nConversion aborted by user\n')
             context_id = self.statusbar.get_context_id("Activation")  
-            self.statusbar.push(context_id,'Conversion aborted!')
+            self.statusbar.push(context_id, 'Conversion aborted!')
         except:
             pass
             
    
 
-    def quit_program(self,widget):
+    def quit_program(self, widget):
         ####################
         # Description
         # ===========
@@ -634,7 +637,7 @@
         #
         ####################
         self.stop
-        self.logfile.writelines('****** Sinthgunt log file STOP - '+str(time.ctime())+' *******\n')
+        self.logfile.writelines('\n****** Sinthgunt log file STOP - '+str(time.ctime())+' *******\n\n')
         self.logfile.close
         gtk.main_quit()
 
@@ -653,17 +656,17 @@
         # ===============
         #
         ####################
-        self.audio_codec = ['N/A','N/A','N/A','N/A','N/A']
-        self.video_codec = ['N/A','N/A','N/A','N/A','N/A']
+        self.audio_codec = ['N/A']
+        self.video_codec = ['N/A', 'N/A']
         self.file_frames = 0
-        InputFileName=self.input[-1]
-        command = ["ffmpeg","-i",InputFileName]
+        InputFileName = self.input[-1]
+        command = ['ffmpeg', '-i', InputFileName]
 
-        process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
+        process = subprocess.Popen(args = command, stdout = subprocess.PIPE,
+                stdin = subprocess.PIPE, stderr = subprocess.STDOUT)
 
         flag = 1
-        counter=0
+        counter = 0
         try:
             while flag == 1:   
                 try:       
@@ -674,56 +677,50 @@
                 if output != '\n' and output != '':
                     self.logfile.writelines('Get file info status: '+output+'\n')
                     output_split = output.split(' ')
-                    N=len(output_split)
+                    N = len(output_split)
                     for i in range(N):
     
                         # Find length of audio/video file in seconds            
-                        if output_split[i]=='Duration:':
-                            file_length_min=output_split[i+1]
-                            file_length_min_split=file_length_min.split(':')
+                        if output_split[i] == 'Duration:':
+                            file_length_min = output_split[i+1]
+                            file_length_min_split = file_length_min.split(':')
                             temp = file_length_min_split[2].split('.')
-                            file_length_min_split[2]=temp[0]
+                            file_length_min_split[2] = temp[0]
                             # Calculate length of file in seconds               
-                            file_length_sec=3600*float(file_length_min_split[0])+\
+                            file_length_sec = 3600*float(file_length_min_split[0])+\
                                     60*float(file_length_min_split[1])+\
                                     float(file_length_min_split[2])
                 
                         # Find video codec            
-                        if output_split[i]=='Video:':
+                        if output_split[i] == 'Video:':
                             self.video_codec[0] = output_split[i+1].strip(',')
-                            self.video_codec[1] = output_split[i+2].strip(',')
-                            self.video_codec[2] = output_split[i+3].strip(',')
 
                         # Find video bitrate            
-                        if output_split[i]=='bitrate:':
-                            self.video_codec[3] = output_split[i+1].strip(',')+' kb/s'
+                        if output_split[i] == 'bitrate:':
+                            self.video_codec[1] = output_split[i+1].strip(',')+' kb/s'
 
                         # Find frames pr. second in the file 
-                        if i>=2 and (output_split[i]=='tb(r)\n' or output_split[i]=='tb(r)\nMust' or output_split[i]=='tbr,'):
-                            file_fps=output_split[i-1]
+                        if i >= 2 and (output_split[i] == 'tb(r)\n' or output_split[i] == 'tb(r)\nMust' or output_split[i] == 'tbr,'):
+                            file_fps = output_split[i-1]
                             # Calculate total number of frames
                             self.file_frames = int(file_length_sec*float(file_fps))
                 
                         # Find audio codec
-                        if output_split[i]=='Audio:':
-                            self.audio_codec = [output_split[i+1].strip(','),
-                                output_split[i+2].strip(','),
-                                output_split[i+3].strip(','),
-                                output_split[i+4].strip(','),
-                                output_split[i+5]]
+                        if output_split[i] == 'Audio:':
+                            self.audio_codec = [output_split[i+1].strip(',')]
                             #flag = 0  
                 
                 # Stop if we reach the end of ffmpeg's output
-                if counter >= 1000 or output_spilt[i]=='file\n':
+                if counter >= 1000 or output_split[i] == 'file\n':
                     flag = 0
                 counter = counter+1
         except:
             pass
         self.logfile.writelines('Audio codec: '+str(self.audio_codec)+'\n')
         self.logfile.writelines('Video codec: '+str(self.video_codec)+'\n')
-        self.logfile.writelines('Number of frames: '+str(self.file_frames)+'\n')
+        self.logfile.writelines('Number of frames: '+str(self.file_frames)+'\n')       #self.logfile.writelines(''+str(file_fps)+'\n')
 
-    def aboutdialog(self,widget):
+    def aboutdialog(self, widget):
         ####################
         # Description
         # ===========
@@ -746,9 +743,9 @@
                         \nConvert button in the main window.\
                         \n\nPlease visit http://www.sinthgunt.org\
                         \nfor more info."
-        self.InformationDialog(widget,dialogtext)
+        self.InformationDialog(widget, dialogtext)
 
-    def no_file_selected_dialog(self,widget):
+    def no_file_selected_dialog(self, widget):
         ####################
         # Description
         # ===========
@@ -761,11 +758,11 @@
         # ===============
         #
         #################### 
-        dialogtext = "You have to select a file and/or a preset before you \
+        dialogtext = "\n  You have to select a file and/or a preset before you \
         \ncan begin converting!"
-        self.ErrorDialog(widget,dialogtext)
+        self.ErrorDialog(widget, dialogtext)
 
-    def unsupported_codec_dialog(self,widget):
+    def unsupported_codec_dialog(self, widget):
         ####################
         # Description
         # ===========
@@ -778,13 +775,13 @@
         # ===============
         #
         #################### 
-        dialogtext = "You have selected a preset which is (probably) not supported by your version of ffmpeg. \
+        dialogtext = "  You have selected a preset which is (probably) not supported by your version of ffmpeg. \
 To upgrade ffmpeg, please check your distribution documentation. \
-\n If you want, you may disregard this warning and check the log file (sinthgunt.log) \
+\n  If you want, you may disregard this warning and check the log file (~/.sinthgunt.log) \
 after pressing the convert button"
-        self.ErrorDialog(widget,dialogtext)
+        self.ErrorDialog(widget, dialogtext)
     
-    def ErrorDialog(self,widget,dialogtext):
+    def ErrorDialog(self, widget, dialogtext):
         ####################
         # Description
         # ===========
@@ -802,10 +799,10 @@
                 gtk.BUTTONS_NONE, dialogtext)
         message.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
         resp = message.run()
-        if resp == gtk.RESPONSE_CLOSE:
+        if resp == gtk.RESPONSE_CLOSE or gtk.STOCK_CLOSE:
             message.destroy()
 
-    def InformationDialog(self,widget,dialogtext):
+    def InformationDialog(self, widget, dialogtext):
         ####################
         # Description
         # ===========
@@ -821,13 +818,13 @@
         message = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_NONE, dialogtext)
         message.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
         resp = message.run()
-        if resp == gtk.RESPONSE_CLOSE:
+        if resp == gtk.RESPONSE_CLOSE or gtk.STOCK_CLOSE:
             message.destroy()
 
 
 
 
-    def menuradiobuttonselect(self,widget):
+    def menuradiobuttonselect(self, widget):
         ####################
         # Description
         # ===========
@@ -840,16 +837,16 @@
         #
         #################### 
         self.operation_radiobutton = ''
-        counter=0
+        counter = 0
         for presetmenu1header in self.presetmenu1headerholder:
             for item in presetmenu1header:
                 if item.get_active() == True:
                     self.operation_radiobutton = self.presetlist[counter][1]
                     self.labelOperation.set_text('Output to '+self.presetlist[counter][1])
                     # if preset is not supported, display unsupported_codec_dialog                    
-                    if self.preset_enabled[counter]==False:
+                    if self.preset_enabled[counter] == False:
                         self.unsupported_codec_dialog(widget)
-                        self.labelOperation.set_text('Output to '+self.presetlist[counter][1]+'\n(Preset not supported by ffmpeg)')
+                        self.labelOperation.set_text('Output to '+self.presetlist[counter][1]+'\n(Preset not supported)')
                         #item.set_active(True)
                 counter = counter + 1
                 
@@ -877,48 +874,48 @@
         xml_file = os.path.dirname(xml_file) # load xml file
         xml_file = os.path.join(xml_file, self.DATA_DIR+"presets.xml")
         optionsXML = etree.parse(xml_file)
-        presets=[]
-        row = [' ',' ',' ',' ',[]]
+        presets = []
+        row = [' ', ' ', ' ', ' ', []]
 
-	    # Iterate through presets in xml file
+        # Iterate through presets in xml file
         for child in optionsXML.getiterator():
             if child.tag == 'label': # preset name
-                row[1]=child.text
+                row[1] = child.text
 
             if child.tag == 'params': # preset ffmpeg command line options
-                row[2]=child.text
+                row[2] = child.text
 
             if child.tag == 'extension': # output file extension
-                row[3]=child.text.strip(' ')
+                row[3] = child.text.strip(' ')
 
             if child.tag == 'category': # preset category
-                row[0]=child.text
+                row[0] = child.text
 
             if child.tag == 'codecs': # encoding codecs required by preset
-                row[4]=child.text.split(',')
+                row[4] = child.text.split(',')
                 presets.append(row)
-                row = [' ',' ',' ',' ',[]]
+                row = [' ', ' ', ' ', ' ', []]
                 # (planned): Test if codec will work
 
             
-    	# Sort by category name
-    	presets.sort(lambda x, y: cmp(x[0],y[0]))
+        # Sort by category name
+        presets.sort(lambda x, y: cmp(x[0], y[0]))
 
-    	# find category list
-    	categories=[presets[0][0]]
-    	for row in presets:
-        	if row[0]!=categories[-1]:
-            		categories.append(row[0])
+        # find category list
+        categories = [presets[0][0]]
+        for row in presets:
+            if row[0] != categories[-1]:
+                    categories.append(row[0])
 
         # make lists global        
-        self.presetlist=presets
-        self.categorylist=categories
+        self.presetlist = presets
+        self.categorylist = categories
 
         # Get codecs and check if encoding and/or decoding is avaliable
         self.ffmpeg_getcodecs()
 
 
-    def ffmpeg_getinfo(self,widget):
+    def ffmpeg_getinfo(self, widget):
         ####################
         # Description
         # ===========
@@ -936,16 +933,16 @@
         #
         ####################
         self.ffmpeg_getcodecs()
-        command = ["ffmpeg","-version"]
+        command = ['ffmpeg', '-version']
         output = ''
         try:
-            process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                    stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
+            process = subprocess.Popen(args = command, stdout = subprocess.PIPE,
+                    stdin = subprocess.PIPE, stderr = subprocess.STDOUT)
             output = str(process.stdout.read(10000))        
         except:
             None
-        dialogtext=output
-        self.InformationDialog(widget,dialogtext)
+        dialogtext = output
+        self.InformationDialog(widget, dialogtext)
         
     def ffmpeg_getcodecs(self):
         ####################
@@ -960,224 +957,73 @@
         # ===============
         #
         #################### 
-        command = ["ffmpeg","-formats"]
+        command = ['ffmpeg', '-v', 'warning', '-formats']
         output = ''
 
         try:
-            process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                    stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
+            process = subprocess.Popen(args = command, stdout = subprocess.PIPE,
+                    stdin = subprocess.PIPE, stderr = subprocess.STDOUT)
             output = str(process.stdout.read(20000))        
         except:
             None
-        #self.logfile.writelines('ffmpeg_getformats output: '+str(output))
 
-        command = ["ffmpeg","-codecs"]
+        command = ['ffmpeg', '-v', 'warning', '-codecs']
 
         try:
-            process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                    stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
+            process = subprocess.Popen(args = command, stdout = subprocess.PIPE,
+                    stdin = subprocess.PIPE, stderr = subprocess.STDOUT)
             output += str(process.stdout.read(20000))        
         except:
             None
-        self.logfile.writelines('ffmpeg_getcodecs output: '+str(output))
+        self.logfile.writelines('\nCodecs output:\n'+str(output)+'\n')
 
-        output_lines=output.split('\n')
-        codecs_raw=[]
-        Ncodecs=0
+        output_lines = output.split('\n')
+        codecs_raw = []
+        Ncodecs = 0
         for line in output_lines:
-            line_split=line.split(' ')
-            line_codec=line_split[0:7]
+            line_split = line.split(' ')
+            line_codec = line_split[0:7]
             for i in range(20):
                 try:
                     line_codec.remove('')
                 except:
                     pass
             codecs_raw.append(line_codec)
-            Ncodecs=Ncodecs+1
-        self.logfile.writelines('ffmpeg_getcodecs codecs_raw: '+str(codecs_raw))
+            Ncodecs = Ncodecs+1
+        self.logfile.writelines('\nRaw codecs:\n'+str(codecs_raw)+'\n')
         # look for encoding 
-        self.codecs=[]
+        self.codecs = []
         for i in range(Ncodecs):
-                flag = 0
+                flagA = 0
+                flagB = 0
                 try:
                     # row: codec name, encode, decode
-                    row = ['',False,False]
+                    row = ['', False, False]
                     # Check to see if we can encode
-                    if codecs_raw[i][0].find('E')== 0 or codecs_raw[i][0].find('E')== 1:
-                        row[0]=codecs_raw[i][-1]  
-                        row[1]=True
-                        flag = 1
+                    if codecs_raw[i][0].find('E') == 0 or codecs_raw[i][0].find('E') == 1:
+                        row[0] = codecs_raw[i][-1]  
+                        row[1] = True
+                        flagA = 1
                     # Check to see if we can decode
-                    if codecs_raw[i][0].find('D')== 0 or codecs_raw[i][0].find('D')== 1:
-                        row[0]=codecs_raw[i][-1]
-                        row[2]=True
-                        flag =1
+                    if codecs_raw[i][0].find('D') == 0 or codecs_raw[i][0].find('D') == 1:
+                        row[0] = codecs_raw[i][-1]
+                        row[2] = True
+                        flagB = 1
                     # Only add codec if we can either encode or decode
-                    if flag==1:
+                    if flagA and flagB == 1:
                         self.codecs.append(row)                       
                 except:     
                     pass
         # Debugging codec row
-        row = ['debugcodec',True,True]
+        row = ['debugcodec', True, True]
         self.codecs.append(row)  
-        self.logfile.writelines('ffmpeg_getcodecs self.codecs: '+str(self.codecs))
- 
-
-#####################
-## YouTube functions
-#####################
-    def menuopenyoutube(self,widget):  
-        ####################
-        # Description
-        # ===========
-        """ Dialog that allows the user to enter a YouTube url. 
-            Once the user presses the 'ok' button, the download will begin"""
-        # Arguments
-        # =========
-        #
-        # Further Details
-        # ===============
-        #
-        ####################      
-        #base this on a message dialog  
-        dialog = gtk.MessageDialog(None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_QUESTION,gtk.BUTTONS_OK_CANCEL,None)  
-        dialog.set_markup('Please enter a link to a video file, eg.')  
-        #create the text input field  
-        entry = gtk.Entry()  
-        #allow the user to press enter to do ok  
-        #entry.connect("activate", dialog.response(response), dialog, gtk.RESPONSE_OK)  
-        #create a horizontal box to pack the entry and a label  
-        hbox = gtk.HBox()  
-        hbox.pack_start(gtk.Label("URL:"), False, 5, 5)  
-        hbox.pack_end(entry)  
-        #some secondary text  
-        dialog.format_secondary_markup("<i>http://www.youtube.com/watch?v=LkCNJRfSZBU</i>\n\n\
-Sinthgunt supports YouTube, Metacafe, Google Video, Photobucket and Yahoo! Video.")  
-        #add it and show it  
-        dialog.vbox.pack_end(hbox, True, True, 0)  
-        dialog.show_all()  
-        # Start dialog. 
-        Response = dialog.run()  
-        self.youtubeurl = entry.get_text()  
-        dialog.destroy()  
-        dialog.destroy()
-        # Did we press Ok? If yes, proceed
-        if Response == gtk.RESPONSE_OK:
-            try:
-                # Look for direct link to media file
-                if self.youtubeurl[-4]=='.':
-                    # find last '/'
-                    for i in range(len(self.youtubeurl)):
-                        if self.youtubeurl[-i]=='/':
-                            output=self.youtubeurl[-i+1:]
-                            break
-                    self.input.extend([os.getenv("HOME")+'/'+output])
-                    self.download(widget,self.youtubeurl)
-                    self.setinput(widget)
-                else:            
-                    self.download_youtube_dl(widget,self.youtubeurl)
-                    self.setinput(widget)
-            except:
-                pass
-            
-
-    def download(self,widget,url):
-        ####################
-        # Description
-        # ===========
-        """Copy the contents of a file from a given URL to a local file.""" 
-        # Arguments
-        # =========
-        # url   http url of the remote file to download eg. http://www.example.org/movie.mpg
-        #
-        # Further Details
-        # ===============
-        #
-        ####################   
-        webFile=urllib.urlretrieve(url, self.input[-1],lambda nb, bs, fs, url=url: self._reporthook(widget,nb,bs,fs,url))
-
-    def download_youtube_dl(self,widget,url):
-        ####################
-        # Description
-        # ===========
-        """Downloads video files from sites like youtube.com, metacafe.com and video.google.com.""" 
-        # Arguments
-        # =========
-        # url   http url of the remote file to download eg. http://www.example.org/movie.mpg
-        #
-        # Further Details
-        # ===============
-        # This function uses youtube-dl to get the url of the video and the title.
-        ####################   
-        
-        # Get video url from youtube-dl
-        command = ["youtube-dl-sinthgunt","-g",url]
-        output = ''
-        try:
-            process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                    stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
-            output = str(process.stdout.read())        
-        except:
-            None
-
-        # Remove trailing newline
-        video_url = output.strip()
-        
-        # Get video title from youtube-dl
-        command = ["youtube-dl-sinthgunt","-e",url]
-        output = ''
-        try:
-            process = subprocess.Popen(args=command,stdout=subprocess.PIPE,
-                    stdin=subprocess.PIPE,stderr=subprocess.STDOUT)
-            output = str(process.stdout.read())        
-        except:
-            None
-
-        # Remove trailing newline
-        video_title = output.strip()
-        
-        # Add file to input que
-        self.input.extend([os.getenv("HOME")+'/'+video_title+".flv"])
-
-        # Download the file
-        webFile=urllib.urlretrieve(video_url, self.input[-1],lambda nb, bs, fs, url=url: self._reporthook(widget,nb,bs,fs,url))
-
-
-    def _reporthook(self,widget,numblocks, blocksize, filesize, url=None):
-        ####################
-        # Description
-        # ===========
-        """Prints the download status to the status bar."""
-        # Arguments
-        # =========
-        #
-        # Further Details
-        # ===============
-        #
-        ####################  
-        base = os.path.basename(url)
-        #Should handle possible filesize=-1.
-        try:
-            percent = min((numblocks*blocksize*100)/filesize, 100)
-        except:
-            percent = 100
-        if numblocks != 0:
-            sys.stdout.write("\b"*70)
-        context_id = self.statusbar.get_context_id("Activation")  
-        self.statusbar.push(context_id,'Downloaded '+str(percent)+'% from '+self.youtubeurl)
-        self.progressbar.set_fraction(float(percent)/100)
-        if percent==100:
-            self.statusbar.push(context_id,'Downloaded completed. Saved as '+self.input[-1])
-            self.setinput(widget)
-        # Wait for gui to update
-        while gtk.events_pending():
-            gtk.main_iteration(False)
+        self.logfile.writelines('\nRow codecs:\n'+str(self.codecs)+'\n')
 
 
 #####################
 ## mplayer functions
 #####################
-    def mplayer_check(self,widget):
+    def mplayer_check(self, widget):
         ####################
         # Description
         # ===========
@@ -1190,12 +1036,12 @@
         #
         ####################
         return False 
-        if os.path.exist('/usr/bin/mplayer'):
+        if os.path.exists('/usr/bin/mplayer'):
             return True
         else:
             return False
        
-    def mplayer_play_input_file(self,widget):
+    def mplayer_play_input_file(self, widget):
         ####################
         # Description
         # ===========
@@ -1209,17 +1055,17 @@
         #
         ####################
         if self.mplayer_check:
-            whattoplay=' '
+            whattoplay = ' '
             try:
-                whattoplay=self.input[-1]
+                whattoplay = self.input[-1]
             except Exception, e:
                 raise e
-            command = ["mplayer","-vo","x11",whattoplay]
-            process = subprocess.Popen(args=command)
+            command = ['mplayer', '-vo', 'x11', whattoplay]
+            process = subprocess.Popen(args = command)
         else:    
             print 'Mplayer must be installed and found in /usr/bin for this function to work'
    
-    def mplayer_play_output_file(self,widget):
+    def mplayer_play_output_file(self, widget):
         ####################
         # Description
         # ===========
@@ -1233,13 +1079,13 @@
         #
         ####################  
         if self.mplayer_check:
-            whattoplay=' '
+            whattoplay = ' '
             try:
-                whattoplay=self.output
+                whattoplay = self.output
             except Exception, e:
                 raise e
-            command = ["mplayer","-vo","x11",whattoplay]
-            process = subprocess.Popen(args=command)
+            command = ['mplayer', '-vo', 'x11', whattoplay]
+            process = subprocess.Popen(args = command)
         else:
             print 'Mplayer must be installed and found in /usr/bin for this function to work'
 
@@ -1286,13 +1132,11 @@
                         "MainWindow_destroy"            : self.quit_program,
                         "on_menuquit_activate"          : self.quit_program,
                         "on_menuopen_activate"          : self.menuopenfile,
-                        "on_menuopenyoutube_activate"   : self.menuopenyoutube,
                         "on_toolbaropen_clicked"        : self.menuopenfile,
-                        "on_toolbaropenyoutube_clicked" : self.menuopenyoutube,
                         "on_menuconvert_activate"       : self.activate,
                         "on_menuabout_activate"         : self.aboutdialog,
                         "on_menuffmpeginfo_activate"    : self.ffmpeg_getinfo,
-                         "on_menuPlayInput_activate" : self.mplayer_play_input_file,
-                         "on_menuPlayOutput_activate"  : self.mplayer_play_output_file}
+                        "on_menuPlayInput_activate"     : self.mplayer_play_input_file,
+                        "on_menuPlayOutput_activate"    : self.mplayer_play_output_file}
             #Do the magic connecting to the widgets
             self.wTree.signal_autoconnect(self.dic)        
diff -u3r a/setup.py b/setup.py
--- a/setup.py	2013-02-15 18:23:20.000000000 +0400
+++ b/setup.py	2017-02-12 16:47:52.390000000 +0300
@@ -17,7 +17,7 @@
     license = 'GPLv3',
     packages = ['Sinthgunt'],
     package_data = {'sinthgunt': files},
-    scripts = ['sinthgunt','youtube-dl-sinthgunt'],
+    scripts = ['sinthgunt'],
     data_files=[
         ('/usr/share/sinthgunt',['share/sinthgunt.glade','share/presets.xml','share/logo.png','share/icon.png','README.txt','LICENSE.txt','sinthgunt.html']),
         ('/usr/share/applications',['share/sinthgunt.desktop']),
diff -u3r a/share/presets.xml b/share/presets.xml
--- a/share/presets.xml	2010-11-14 15:02:41.000000000 +0300
+++ b/share/presets.xml	2017-02-17 20:52:45.437000000 +0300
@@ -9,199 +9,199 @@
   </CDWavStereo>
   <GigabeatFS>
     <label>RB Toshiba Gigabeat F/X Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b 600k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b:v 600k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </GigabeatFS>
   <GigabeatWS>
     <label>RB Toshiba Gigabeat F/X Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b 600k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b:v 600k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </GigabeatWS>
   <H1020FS>
     <label>RB iRiver H10 20GB Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b 224k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b:v 224k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H1020FS>
   <H1020WS>
     <label>RB iRiver H10 20GB Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b 224k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b:v 224k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H1020WS>
   <H105FS>
     <label>RB iRiver H10 5/6GB Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x96 -b 224k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x96 -b:v 224k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H105FS>
   <H105WS>
     <label>RB iRiver H10 5/6GB Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x80 -b 224k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x80 -b:v 224k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H105WS>
   <H300FS>
     <label>RB iRiver H300 Fullscreen</label>
-    <params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x176 -b 224k -r 10 -strict -1</params>
+    <params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x176 -b:v 224k -r 10 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H300FS>
   <H300WS>
     <label>RB iRiver H300 Widescreen</label>
-    <params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x128 -b 256k -r 15 -strict -1</params>
+    <params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x128 -b:v 256k -r 15 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </H300WS>
   <I5GFS>
     <label>RB Apple iPod Video Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b 400k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b:v 400k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </I5GFS>
   <I5GWS>
     <label>RB Apple iPod Video Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b 400k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b:v 400k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </I5GWS>
   <M4a>
     <label>MPEG4 Audio</label>
     <params>-vn -acodec libfaac -ab 112k -ac 2</params>
-    <extension>m4a</extension>
+    <extension>aac</extension>
     <category>Audio</category>
-    <codecs>libfaac</codecs>
+    <codecs>aac</codecs>
   </M4a>
   <NeurosOSDTVHQNTSC>
     <label>Neuros HQ NTSC Fullscreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libxvid -vf scale=640:480,aspect=4:3  -maxrate 2500k -b 2000k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
+    <params>-f mp4 -r 29.97 -vcodec libxvid -s 640x480 -aspect 4:3 -b:v 2000k -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVHQNTSC>
   <NeurosOSDTVHQPAL>
     <label>Neuros HQ PAL Fullscreen</label>
-    <params>-f mp4 -r 25 -vcodec libxvid -vf scale=640:480,aspect=4:3  -maxrate 2500k -b 2000k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
+    <params>-f mp4 -r 25 -vcodec libxvid -s 640x480 -aspect 4:3 -b:v 2000k -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVHQPAL>
   <NeurosOSDTVSFNTSC>
     <label>Neuros Small File NTSC Fullscreen</label>
-    <params>-f mp4 -b 800k -r 29.97 -vf scale=320:240,aspect=4:3  -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
+    <params>-f mp4 -b:v 800k -r 29.97 -s 320x240 -aspect 4:3 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVSFNTSC>
   <NeurosOSDTVSFPAL>
     <label>Neuros Small File PAL Fullscreen</label>
-    <params>-f mp4 -b 800k -r 25 -vf scale=320:240,aspect=4:3  -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
+    <params>-f mp4 -b:v 800k -r 25 -s 320x240 -aspect 4:3 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVSFPAL>
   <NeurosOSDTVWSHQNTSC>
     <label>Neuros HQ NTSC Widescreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libxvid -vf scale=704:384,aspect=16:9  -maxrate 3000k -b 2500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
+    <params>-f mp4 -r 29.97 -vcodec libxvid -s 704x384 -aspect 16:9 -b:v 2500k -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVWSHQNTSC>
   <NeurosOSDTVWSHQPAL>
     <label>Neuros HQ PAL Widescreen</label>
-    <params>-f mp4 -r 25 -vcodec libxvid -vf scale=704:384,aspect=16:9  -maxrate 3000k -b 2500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
+    <params>-f mp4 -r 25 -vcodec libxvid -s 704x384 -aspect 16:9 -b:v 2500k -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVWSHQPAL>
   <NeurosOSDTVWSSFNTSC>
     <label>Neuros Small File NTSC Widescreen</label>
-    <params>-f mp4 -b 800k -r 29.97 -vf scale=352:240,aspect=16:9  -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
+    <params>-f mp4 -b:v 800k -r 29.97 -s=352x240 -aspect 16:9 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVWSSFNTSC>
   <NeurosOSDTVWSSFPAL>
     <label>Neuros Small File PAL Widescreen</label>
-    <params>-f mp4 -b 800k -r 25 -vf scale=352:240,aspect=16:9  -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
+    <params>-f mp4 -b:v 800k -r 25 -s 352x240 -aspect 16:9 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
     <extension>mp4</extension>
     <category>Neuros OSD</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </NeurosOSDTVWSSFPAL>
   <PalmXviDFS>
     <label>Palm Fullscreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libxvid -vf scale=428:320,aspect=4:3  -maxrate 550k -b 500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
+    <params>-f mp4 -vcodec libxvid -s 428x320 -aspect 4:3 -b:v 500k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
     <extension>mp4</extension>
     <category>Palm</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </PalmXviDFS>
   <PalmXviDWS>
     <label>Palm Widescreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libxvid -vf scale=480:320,aspect=3:2  -maxrate 450k -b 430k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
+    <params>-f mp4 -vcodec libxvid -s 480x320 -aspect 3:2 -b:v 430k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
     <extension>mp4</extension>
     <category>Palm</category>
-    <codecs>libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </PalmXviDWS>
   <PhotoFS>
     <label>RB Apple iPod Photo/Color Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b 320k -r 15 -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b:v 320k -r 15 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </PhotoFS>
   <PhotoWS>
     <label>RB Apple iPod Photo/Color Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b 320k -r 24 -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b:v 320k -r 24 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </PhotoWS>
   <X5FS>
     <label>RB Cowon iAudio X5 Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b 176k -r 15 -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b:v 176k -r 15 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </X5FS>
   <X5WS>
     <label>RB Cowon iAudio X5 Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b 224k -r 24 -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b:v 224k -r 24 -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
-    <codecs>libmp3lame,mpeg2video</codecs>
+    <codecs>mp3,mpeg2video</codecs>
   </X5WS>
   <XviDAVIFS>
     <label>XviD FullScreen</label>
-    <params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -vf scale=640:480,aspect=4:3  -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
+    <params>-f avi -vcodec libxvid -vtag xvid -s 640x480 -aspect 4:3 -b:v 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
     <extension>avi</extension>
     <category>AVI</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </XviDAVIFS>
   <XviDAVIWS>
     <label>XviD Widescreen</label>
-    <params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -vf scale=704:384,aspect=16:9  -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
+    <params>-f avi -vcodec libxvid -vtag xvid -s 704x384 -aspect 16:9 -b:v 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
     <extension>avi</extension>
     <category>AVI</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </XviDAVIWS>
   <XviDAVIWSAna>
     <label>XviD Widescreen Anamorphic</label>
-    <params>-f avi -r 29.97 -croptop 58 -cropbottom 62 -vcodec libxvid -vtag XVID -vf scale=640:272 -aspect 2.35 -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +mv4 -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
+    <params>-f avi -vf crop=in_h-2*60 -vcodec libxvid -vtag xvid -s 640x272 -aspect 2.35 -b:v 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
     <extension>avi</extension>
     <category>AVI</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </XviDAVIWSAna>
   <ac3dvd192>
     <label>Ac3 DVD - 192kbps Stereo</label>
@@ -219,10 +219,10 @@
   </ac3dvd384>
   <divx>
     <label>MS Compatible AVI</label>
-    <params>-acodec libmp3lame -vcodec msmpeg4 -ab 192k -b 1000k -s 640x480</params>
+    <params>-acodec libmp3lame -vcodec msmpeg4v3 -ab 192k -b:v 1000k -s 640x480</params>
     <extension>avi</extension>
     <category>AVI</category>
-    <codecs>msmpeg4,libmp3lame</codecs>
+    <codecs>msmpeg4v3,mp3</codecs>
   </divx>
   <dvntsc>
     <label>Raw DV for NTSC Fullscreen</label>
@@ -240,14 +240,14 @@
   </dvpal>
   <e200FS>
     <label>RB Sandisk Sansa e200 Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b 320k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b:v 320k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
     <codecs>mpeg2video,libmp3lame</codecs>
   </e200FS>
   <e200WS>
     <label>RB Sandisk Sansa e200 Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b 320k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b:v 320k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
     <codecs>mpeg2video,libmp3lame</codecs>
@@ -257,116 +257,116 @@
     <params>-acodec libmp3lame -ab 160k -ac 2 -ar 44100</params>
     <extension>mp3</extension>
     <category>Audio</category>
-    <codecs>libmp3lame</codecs>
+    <codecs>mp3</codecs>
   </mp3>
   <mp3m>
     <label>MP3 (Mono)</label>
     <params>-acodec libmp3lame -ab 32k -ac 1 -ar 22050</params>
     <extension>mp3</extension>
     <category>Mobile Phones</category>
-    <codecs>libmp3lame</codecs>
+    <codecs>mp3</codecs>
   </mp3m>
   <nanoFS>
     <label>RB Apple iPod Nano Fullscreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b 256k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b:v 256k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
     <codecs>mpeg2video,libmp3lame</codecs>
   </nanoFS>
   <nanoWS>
     <label>RB Apple iPod Nano Widescreen</label>
-    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b 256k -strict -1</params>
+    <params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b:v 256k -strict -1</params>
     <extension>mpg</extension>
     <category>Rockbox</category>
     <codecs>mpeg2video,libmp3lame</codecs>
   </nanoWS>
   <ntscdvdgoodqFS>
     <label>NTSC DVD Fullscreen</label>
-    <params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 4:3 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
+    <params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 4:3 -b:v 4000k -mbd rd -trellis 2 -flags mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
     <codecs>mpeg2video,mp2</codecs>
   </ntscdvdgoodqFS>
   <ntscdvdgoodqWS>
     <label>NTSC DVD Widescreen</label>
-    <params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 16:9 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
+    <params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 16:9 -b:v 4000k -mbd rd -trellis 2 -flags mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
     <codecs>mpeg2video,mp2</codecs>
   </ntscdvdgoodqWS>
   <ntscdvdhqFS>
     <label>NTSC DVD HQ Fullscreen</label>
-    <params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 4:3 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 4:3 -b:v 8000k -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </ntscdvdhqFS>
   <ntscdvdhqWS>
     <label>NTSC DVD HQ Widescreen</label>
-    <params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -b 8000k -g 12 -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -b:v 8000k -g 12 -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </ntscdvdhqWS>
   <ntscdvdlq>
     <label>NTSC DVD Fast (LQ)</label>
-    <params>-f dvd -target ntsc-dvd -b 5000k -r 29.97 -s 720x480 -ar 48000 -ab 384kb</params>
+    <params>-f dvd -target ntsc-dvd -b:v 5000k -r 29.97 -s 720x480 -ar 48000 -ab 384kb</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </ntscdvdlq>
   <ntscvcdhq>
     <label>NTSC VCD (HQ)</label>
-    <params>-f vcd -target ntsc-vcd -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f vcd -target ntsc-vcd -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>VCD</category>
     <codecs>vcd</codecs>
   </ntscvcdhq>
   <paldvdgoodqFS>
     <label>PAL DVD Fullscreen</label>
-    <params>-f dvd -vcodec mpeg2video -r 25.00 -s 352x576  -aspect 4:3 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
+    <params>-f dvd -vcodec mpeg2video -r 25.00 -s 576x324 -aspect 4:3 -b:v 4000k -mbd rd -trellis 2 -flags mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
     <codecs>mpeg2video,mp2</codecs>
   </paldvdgoodqFS>
   <paldvdgoodqWS>
     <label>PAL DVD Widescreen</label>
-    <params>-f dvd -vcodec mpeg2video -r 25.00 -s 352x576 -aspect 16:9 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
+    <params>-f dvd -vcodec mpeg2video -r 25.00 -s 576x324 -aspect 16:9 -b:v 4000k -mbd rd -trellis 2 -flags mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
     <codecs>mpeg2video,mp2</codecs>
   </paldvdgoodqWS>
   <paldvdhqFS>
     <label>PAL DVD HQ Fullscreen</label>
-    <params>-f dvd -target pal-dvd -aspect 4:3 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f dvd -target pal-dvd -aspect 4:3 -b:v 8000k -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </paldvdhqFS>
   <paldvdhqWS>
     <label>PAL DVD HQ Widescreen</label>
-    <params>-f dvd -target pal-dvd -aspect 16:9 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f dvd -target pal-dvd -aspect 16:9 -b:v 8000k -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </paldvdhqWS>
   <paldvdlq>
     <label>PAL DVD Fast (LQ)</label>
-    <params>-f dvd -target pal-dvd -b 5000k -r 25 -s 720x576 -ar 48000 -ab 384kb</params>
+    <params>-f dvd -target pal-dvd -b:v 5000k -r 25 -s 720x576 -ar 48000 -ab 384kb</params>
     <extension>mpg</extension>
     <category>DVD</category>
-    <codecs>dvd</codecs>
+    <codecs>mpeg2video,mp2</codecs>
   </paldvdlq>
   <palvcdhq>
     <label>PAL VCD (HQ)</label>
-    <params>-f vcd -target pal-vcd -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
+    <params>-f vcd -target pal-vcd -mbd rd -trellis 2 -flags mv0 -cmp 0 -subcmp 2</params>
     <extension>mpg</extension>
     <category>VCD</category>
     <codecs>vcd</codecs>
   </palvcdhq>
   <qmov>
     <label>Quicktime MOV</label>
-    <params>-f mov -acodec libfaac -b 1250k -r 25 -ab 128k -s 640x480</params>
+    <params>-f mov -acodec libfaac -b:v 1250k -r 25 -ab 128k -s 640x480</params>
     <extension>mov</extension>
     <category>Quicktime</category>
     <codecs>mov,libfaac</codecs>
@@ -380,72 +380,72 @@
   </wma>
   <wmv>
     <label>WMV2 Generic</label>
-    <params>-vcodec wmv2  -acodec wmav2 -b 1000k -ab 160k -r 25</params>
+    <params>-vcodec wmv2 -acodec wmav2 -b:v 1000k -ab 160k -r 25</params>
     <extension>wmv</extension>
     <category>Microsoft</category>
     <codecs>wmv2,wmav2</codecs>
   </wmv>
   <x264HQFS>
     <label>MP4 Fullscreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libx264 -vpre medium -s 640x480 -b 1000k -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-f mp4 -vcodec libx264 -s 640x480 -b:v 1000k -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>mp4</extension>
     <category>MPEG4</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </x264HQFS>
   <x264HQPSP43>
     <label>PSP Fullscreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libx264 -vpre medium -s 640x480 -aspect 4:3 -b 1250k -maxrate 4M -bufsize 4M -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method umh -subq 6 -trellis 1 -refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1250k -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
+    <params>-f mp4 -vcodec libx264 -s 640x480 -aspect 4:3 -b:v 1250k -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
     <extension>mp4</extension>
     <category>PSP</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </x264HQPSP43>
   <x264HQWS>
     <label>MP4 Widescreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libx264 -vpre medium -s 704x384 -b 1000k -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-f mp4 -vcodec libx264 -s 704x384 -b:v 1000k -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>mp4</extension>
     <category>MPEG4</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </x264HQWS>
   <cdma3g>
     <label>CDMA Phone Audio (3g2)</label>
     <params>-f 3g2 -ar 22050 -ab 128k -acodec libfaac -s qcif -r 14.985 -vn</params>
     <extension>3g2</extension>
     <category>Mobile Phones</category>
-    <codecs>3g2,libfaac</codecs>
+    <codecs>3g2,aac</codecs>
   </cdma3g>
   <XviDAVIZENFS>
     <label>Zen Fullscreen</label>
-    <params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -vf scale=320:240,aspect=4:3  -maxrate 1800k -b 1500k  -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
+    <params>-f avi -vcodec libxvid -vtag xvid -s 320x240 -aspect 4:3 -maxrate 1800k -b:v 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
     <extension>avi</extension>
     <category>Creative Zen</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </XviDAVIZENFS>
   <XviDAVIZENWS>
     <label>Zen Widescreen</label>
-    <params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -vf scale=320:240,aspect=16:9  -maxrate 1800k -b 1500k  -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
+    <params>-f avi -vcodec libxvid -vtag xvid -s 320x240 -aspect 16:9 -maxrate 1800k -b:v 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
     <extension>avi</extension>
     <category>Creative Zen</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </XviDAVIZENWS>
   <BlackberryCurvefs>
     <label>Blackberry Curve Fullscreen</label>
-    <params>-f mp4 -vcodec mpeg4 -b 400k -r 24 -s 320x240 -aspect 4:3 -acodec libfaac -ar 22050 -ac 2 -ab 48kb</params>
+    <params>-f mp4 -vcodec mpeg4 -b:v 400k -r 24 -s 320x240 -aspect 4:3 -acodec libfaac -ar 22050 -ac 2 -ab 48kb</params>
     <extension>mp4</extension>
     <category>Blackberry</category>
-    <codecs>mpeg4,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </BlackberryCurvefs>
   <BlackberryCurvews>
     <label>Blackberry Curve Widescreen</label>
-    <params>-f mp4 -vcodec mpeg4 -b 400k -r 24 -s 320x180 -aspect 16:9 -acodec libfaac -ar 22050 -ac 2 -ab 48kb</params>
+    <params>-f mp4 -vcodec mpeg4 -b:v 400k -r 24 -s 320x180 -aspect 16:9 -acodec libfaac -ar 22050 -ac 2 -ab 48kb</params>
     <extension>mp4</extension>
     <category>Blackberry</category>
   </BlackberryCurvews>
   <lgchocolate>
     <label>LG Chocolate</label>
-    <params>-f mp4 -vf scale=240:192 -r 11.988 -b 192k -ab 56k -vcodec libxvid -acodec libfaac</params>
+    <params>-f mp4 -s 240x192 -r 11.988 -b:v 192k -ab 56k -vcodec libxvid -acodec libfaac</params>
     <extension>mp4</extension>
     <category>LG</category>
-    <codecs>mp4,libxvid,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </lgchocolate>
   <blackberrymp3>
     <label>Blackberry Music</label>
@@ -456,44 +456,44 @@
   </blackberrymp3>
   <blackberryws>
     <label>Blackberry Video Widescreen</label>
-    <params>-f mp4 -r 24 -vcodec libx264 -vpre medium -s 320x180 -aspect 16:9 -maxrate 800k -bufsize 80k -b 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
+    <params>-f mp4 -r 24 -vcodec libx264 -s 320x180 -aspect 16:9 -b:v 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
     <extension>mp4</extension>
     <category>Blackberry</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </blackberryws>
   <blackberryfs>
     <label>Blackberry Video Fullscreen</label>
-    <params>-f mp4 -r 24 -vcodec libx264 -vpre medium -s 240x180 -aspect 4:3 -maxrate 800k -bufsize 80k -b 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
+    <params>-f mp4 -r 24 -vcodec libx264 -s 240x180 -aspect 4:3 -b:v 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
     <extension>mp4</extension>
     <category>Blackberry</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </blackberryfs>
     <flvweb50>
     <label>Flash: Video (flv) for Web use. 448x336, 50 kb/s</label>
-    <params>-vcodec flv -ar 22050 -r 24 -b 50k -s 448x336 -acodec libmp3lame</params>
+    <params>-vcodec flv -ar 22050 -r 24 -b:v 50k -s 448x336 -acodec libmp3lame</params>
     <extension>flv</extension>
     <category>Websites</category>
-    <codecs>flv,libmp3lame</codecs>
+    <codecs>flv,mp3</codecs>
   </flvweb50>
   <flvweb150>
     <label>Flash: Video (flv) for Web use. 448x336, 150 kb/s</label>
-    <params>-vcodec flv -ar 22050 -r 24 -b 150k -s 448x336 -acodec libmp3lame</params>
+    <params>-vcodec flv -ar 22050 -r 24 -b:v 150k -s 448x336 -acodec libmp3lame</params>
     <extension>flv</extension>
     <category>Websites</category>
-    <codecs>flv,libmp3lame</codecs>
+    <codecs>flv,mp3</codecs>
   </flvweb150>
    <flvweb350>
     <label>Flash: Video (flv) for Web use. 448x336, 350 kb/s</label>
-    <params>-vcodec flv -ar 22050 -r 24 -b 350k -s 448x336 -acodec libmp3lame</params>
+    <params>-vcodec flv -ar 22050 -r 24 -b:v 350k -s 448x336 -acodec libmp3lame</params>
     <extension>flv</extension>
     <category>Websites</category>
-    <codecs>flv,libmp3lame</codecs>
+    <codecs>flv,mp3</codecs>
    </flvweb350> <x264HQPSP169robertswain>
     <label>PSP Widescreen</label>
-    <params>-f mp4 -r 29.97 -vcodec libx264 -vpre medium -s 480x272 -aspect 16:9 -b 1250k -maxrate 4M -bufsize 4M -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method umh -subq 6 -trellis 1 -refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1250k -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
+    <params>-f mp4 -vcodec libx264 -s 480x272 -aspect 16:9 -b:v 1250k -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
     <extension>mp4</extension>
     <category>PSP</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   <WebmLargeFull>
     <label>WebM Video for HTML5 Full Screen - 640x480</label>
     <params>-f webm -s 640x480 -aspect 4:3 -vcodec libvpx -deinterlace -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M -acodec libvorbis -aq 60 -ac 2</params>
@@ -525,101 +525,101 @@
   </x264HQPSP169robertswain>
   <iPodiTunesSmallCRF21FS>
     <label>iPod Small Fullscreen</label>
-    <params>-r 29.97 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x240 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vcodec libx264 -bt 256k -s 320x240 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesSmallCRF21FS>
   <iPodiTunesSmallCRF21WS>
     <label>iPod Small WideScreen</label>
-    <params>-r 29.97 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vcodec libx264 -bt 256k -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesSmallCRF21WS>
   <iPodiTunesSmallCRF21WSAna>
     <label>iPod Small WideScreen Anamorphic</label>
-    <params>-r 29.97 -croptop 60 -cropbottom 60 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x144 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vf crop=in_h-2*60 -vcodec libx264 -bt 256k -s 320x144 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesSmallCRF21WSAna>
   <iPodiTunesSmallCRF21WSLBFix>
     <label>iPod Small Converted to WideScreen</label>
-    <params>-r 29.97 -croptop 64 -cropbottom 64 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vf crop=in_h-2*64 -vcodec libx264 -bt 256k -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesSmallCRF21WSLBFix>
   <iPodiTunesTVOutCRF21FS>
     <label>iPod TV Out Fullscreen</label>
-    <params>-r 29.97 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 512x384 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vcodec libx264 -bt 256k -s 512x384 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesTVOutCRF21FS>
   <iPodiTunesTVOutCRF21WS>
     <label>iPod TV Out Widescreen</label>
-    <params>-r 29.97 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 624x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vcodec libx264 -bt 256k -s 624x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesTVOutCRF21WS>
   <iPodiTunesTVOutCRF21WSAna>
     <label>iPod TV Out Widescreen Anamorphic</label>
-    <params>-r 29.97 -croptop 60 -cropbottom 60 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 640x272 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vf crop=in_h-2*60 -vcodec libx264 -bt 256k -s 640x272 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesTVOutCRF21WSAna>
   <iPodiTunesTVOutCRF21WSLBFix>
     <label>iPod TV Out Converted to Widescreen</label>
-    <params>-r 29.97 -croptop 64 -cropbottom 64 -vcodec libx264 -vpre medium -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 640x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
+    <params>-r 29.97 -vf crop=in_h-2*64 -vcodec libx264 -bt 256k -s 640x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
     <extension>m4v</extension>
     <category>iPod-iTunes</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </iPodiTunesTVOutCRF21WSLBFix>
   <ogg1>
     <label>OGG</label>
-    <params>-acodec vorbis -aq 60  -vn</params>
-    <extension>OGG</extension>
+    <params>-acodec libvorbis -aq 60 -vn</params>
+    <extension>ogg</extension>
     <category>Audio</category>
-    <codecs>vorbis</codecs>
+    <codecs>ogg</codecs>
   </ogg1>
   <wmv4powerpoint>
     <label>Power Point</label>
-    <params>-vcodec wmv2  -acodec wmav2 -aspect 4:3 -b 500k -ab 32k -ac 1 -ar 22050 -s 320x240</params>
+    <params>-vcodec wmv2 -acodec wmav2 -aspect 4:3 -b:v 500k -ab 32k -ac 1 -ar 22050 -s 320x240</params>
     <extension>wmv</extension>
     <category>Microsoft</category>
     <codecs>wmv2,wmav2</codecs>
   </wmv4powerpoint>
   <wmv2zune>
     <label>Zune</label>
-    <params>-vcodec wmv2  -acodec wmav2 -b 640k -ab 128k -r 23.97 -s 320x240</params>
+    <params>-vcodec wmv2 -acodec wmav2 -b:v 640k -ab 128k -r 23.97 -s 320x240</params>
     <extension>wmv</extension>
     <category>Microsoft</category>
     <codecs>wmv2,wmav2</codecs>
   </wmv2zune>
   <wmv2broadband>
     <label>WMV for Web Use</label>
-    <params>-vcodec wmv2  -acodec wmav2 -b 640k -ab 128k -r 29.97 -s 320x240</params>
+    <params>-vcodec wmv2 -acodec wmav2 -b:v 640k -ab 128k -r 29.97 -s 320x240</params>
     <extension>wmv</extension>
     <category>Microsoft</category>
     <codecs>wmv2,wmav2</codecs>
   </wmv2broadband>
   <ps3720p>
     <label>PS3 720p Widescreen</label>
-    <params>-f mp4 -r 23.976 -vcodec libx264 -vpre medium -s 1280x720 -b 3000k -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0  -maxrate 3500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 384k -ar 48000</params>
+    <params>-f mp4 -r 23.976 -vcodec libx264 -s 1280x720 -b:v 3000k -aspect 16:9 -bt 256k -acodec libfaac -ab 384k -ar 48000</params>
     <extension>mp4</extension>
     <category>PS3</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </ps3720p>
   <ps3720pfs>
     <label>PS3 720p Fullscreen</label>
-    <params>-f mp4 -r 23.976 -vcodec libx264 -vpre medium -s 1280x720 -b 3000k -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0  -maxrate 3500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 384k -ar 48000</params>
+    <params>-f mp4 -r 23.976 -vcodec libx264 -s 1280x720 -b:v 3000k -aspect 4:3 -bt 256k -acodec libfaac -ab 384k -ar 48000</params>
     <extension>mp4</extension>
     <category>PS3</category>
-    <codecs>libx264,libfaac</codecs>
+    <codecs>h264,aac</codecs>
   </ps3720pfs>
   <image1sec>
     <label>Extract JPEG images, one every 1 second</label>
@@ -674,36 +674,42 @@
     <params>-s 480x320 -vcodec mpeg4 -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2</params>
     <extension>mp4</extension>
     <category>Mobile Phones</category>
-    <codecs>mpeg4,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </android1>
  <android2>
     <label>Google Android compatible video. Video bitrate: 480 kb/s</label>
-    <params>-s 480x320 -vcodec mpeg4 -b 480k -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2</params>
+    <params>-s 480x320 -vcodec mpeg4 -b:v 480k -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2</params>
     <extension>mp4</extension>
     <category>Mobile Phones</category>
-    <codecs>mpeg4,libfaac</codecs>
+    <codecs>mpeg4,aac</codecs>
   </android2>
- <iphone1>
+  <iphone1>
     <label>Iphone</label>
-    <params>-f mp4 -s 432x320 -aspect 432:320 -acodec aac -async
-    4800 -dts_delta_threshold 1 -vcodec xvid -qscale 7 </params>
+    <params>-f mp4 -s 432x324 -aspect 4:3 -acodec libfaac -async 4800 -dts_delta_threshold 1 -vcodec libxvid -q:v 7</params>
     <extension>mp4</extension>
     <category>Mobile Phones</category>
-    <codecs>xvid,aac,mp4</codecs>
+    <codecs>mpeg4,aac</codecs>
   </iphone1>
+  <nphone1>
+    <label>Asha</label>
+    <params>-f 3gp -vf crop=4/3*in_h:in_h -s 320x240 -aspect 4:3 -acodec libfaac -vcodec mpeg4 -q:v 7</params>
+    <extension>3gp</extension>
+    <category>Mobile Phones</category>
+    <codecs>mpeg4,aac</codecs>
+  </nphone1>
   <CowoniAudio7AVIbeta1>
     <label>Cowon iAudio 7 AVI beta 1</label>
-    <params>-f avi -g 1 -b 256k -r 12 -async 2 -vf scale=160:120 -vtag XVID -vcodec libxvid -ab 128k -ar 44100 -ac 2 -acodec libmp3lame </params>
+    <params>-f avi -g 1 -b:v 256k -r 12 -async 2 -s 160x120 -vtag xvid -vcodec libxvid -ab 128k -ar 44100 -ac 2 -acodec libmp3lame</params>
     <extension>avi</extension>
     <category>Portable Media Players</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </CowoniAudio7AVIbeta1>
   <CowoniAudio7AVIbeta2>
     <label>Cowon iAudio 7 AVI beta 2</label>
-    <params>-f avi -g 1 -b 384k -vcodec libxvid -vtag XVID -ab 128k -ar 44100 -ac 2 -acodec libmp3lame -vf scale=160:128,aspect=4:3  -r 15 </params>
+    <params>-f avi -g 1 -b:v 384k -vcodec libxvid -vtag xvid -ab 128k -ar 44100 -ac 2 -acodec libmp3lame -s 160x128 -aspect 4:3 -r 15</params>
     <extension>avi</extension>
     <category>Portable Media Players</category>
-    <codecs>libxvid,libmp3lame</codecs>
+    <codecs>mpeg4,mp3</codecs>
   </CowoniAudio7AVIbeta2>
 
 
diff -u3r a/share/sinthgunt.glade b/share/sinthgunt.glade
--- a/share/sinthgunt.glade	2013-02-14 23:15:54.000000000 +0400
+++ b/share/sinthgunt.glade	2017-02-12 16:52:41.873000000 +0300
@@ -45,20 +45,6 @@
                                 </child>
                               </widget>
                             </child>
-                            <child>
-                              <widget class="GtkImageMenuItem" id="menuopenyoutube">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Online video</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_menuopenyoutube_activate"/>
-                                <child internal-child="image">
-                                  <widget class="GtkImage" id="menu-item-image2">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-network</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -229,17 +215,6 @@
               </widget>
               <packing>
                 <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkToolButton" id="toolbaropenyoutube">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Open online video</property>
-                <property name="stock_id">gtk-network</property>
-                <signal name="clicked" handler="on_toolbaropenyoutube_clicked"/>
-              </widget>
-              <packing>
-                <property name="homogeneous">True</property>
               </packing>
             </child>
             <child>
diff -u3r a/sinthgunt b/sinthgunt
--- a/sinthgunt	2010-11-14 15:02:41.000000000 +0300
+++ b/sinthgunt	2017-02-17 19:32:15.888000000 +0300
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 """
 sinthgunt wrapper script.