Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (74)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (5846)

  • ffmpeg error while converting to mp4 Error while opening encoder for output stream #0.0

    20 mars 2016, par Josh

    I am trying to convert various file types to mp4 to be displayed using ffmpeg, but i keep getting the error :

    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

    Another piece that looks important is :

    [libx264 @ 0x93caef0] broken ffmpeg default settings detected

    [libx264 @ 0x93caef0] use an encoding preset (e.g. -vpre medium)

    [libx264 @ 0x93caef0] preset usage : -vpre -vpre

    [libx264 @ 0x93caef0] speed presets are listed in x264 —help

    [libx264 @ 0x93caef0] profile is optional ; x264 defaults to high

    The latest code I am running is :

    ffmpeg -i source -s 320x240 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -maxrate 10M -bufsize 10M -acodec libfaac -ac 2 -ar 48000 -ab 192k destination

    I have seen a few other people with this issue, but their fixes didn’t work for some reason.

    In case it matters : ultimately this will be used in php, though I am trying to get it working first via putty

    EDIT: : Here is the full thing as requested(using a wmv, have tested wmv and flv) :

        ~ >> ffmpeg -i path.wmv -s 320x240 -r 30000/1001 -b 200k -r 29.97 -bt 240k -vcodec libx264 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -maxrate 10M -bufsize 10M -acodec libfaac -ac 2 -ar 48000 -ab 192k path.mp4
    FFmpeg version SVN-r26076, Copyright (c) 2000-2011 the FFmpeg developers
     built on Aug 28 2012 17:55:47 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
     configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-shared --enable-postproc --enable-avfilter --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --disable-indevs --disable-outdevs --disable-demuxer=v4l --disable-demuxer=v4l2 --disable-mmx
     libavutil     50.36. 0 / 50.36. 0
     libavcore      0.16. 1 /  0.16. 1
     libavcodec    52.108. 0 / 52.108. 0
     libavformat   52.93. 0 / 52.93. 0
     libavdevice   52. 2. 3 / 52. 2. 3
     libavfilter    1.74. 0 /  1.74. 0
     libswscale     0.12. 0 /  0.12. 0
     libpostproc   51. 2. 0 / 51. 2. 0

    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
    Input #0, asf, from 'path.wmv':
     Metadata:
       SfOriginalFPS   : 299
       WMFSDKVersion   : 11.0.6001.7000
       WMFSDKNeeded    : 0.0.0.0000
       IsVBR           : 0
       title           : Wildlife in HD
       artist          :
       copyright       : © 2008 Microsoft Corporation
       comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
     Duration: 00:00:30.09, start: 8.000000, bitrate: 6977 kb/s
       Stream #0.0(eng): Audio: wmav2, 44100 Hz, 2 channels, s16, 192 kb/s
       Stream #0.1(eng): Video: vc1, yuv420p, 1280x720, 5942 kb/s, 29.97 tbr, 1k tbn, 1k tbc
    File 'path.mp4' already exists. Overwrite ? [y/N] y
    [buffer @ 0x9ce9eb0] w:1280 h:720 pixfmt:yuv420p
    [scale @ 0x9ce8f70] w:1280 h:720 fmt:yuv420p -> w:320 h:240 fmt:yuv420p flags:0x4
    [libx264 @ 0x9ce9ef0] broken ffmpeg default settings detected
    [libx264 @ 0x9ce9ef0] use an encoding preset (e.g. -vpre medium)
    [libx264 @ 0x9ce9ef0] preset usage: -vpre <speed> -vpre <profile>
    [libx264 @ 0x9ce9ef0] speed presets are listed in x264 --help
    [libx264 @ 0x9ce9ef0] profile is optional; x264 defaults to high
    Output #0, mp4, to 'path.mp4':
       Stream #0.0(eng): Video: libx264, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
       Stream #0.1(eng): Audio: libfaac, 48000 Hz, 2 channels, s16, 192 kb/s
    Stream mapping:
     Stream #0.1 -> #0.0
     Stream #0.0 -> #0.1
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    </profile></speed>

    Thanks for any help

  • Android browser play m3u8 after recv #EXT-X-ENDLIST

    26 avril 2014, par user3567118

    I’m developing HLS, it works fine on safari, but when I play it use my android device(4.1.1), it just download(no play). If I append #EXT-X-ENDLIST to the end of m3u8 file, it can play after all the files are downloaded. This problem has troubled me for many days,please help me.

    thanks !

    The html code :





    <video width="100%" height="100%" controls="controls" src="http://dev.netesee.com/hls/ithink/983b161ae937.m3u8">
    </video>
  • Using ffmpeg with Python 2.7

    1er juillet 2015, par suffa

    I have been trying to install pyffmpeg in Python 2.7 unsuccessfully. I found a package for Python 2.6, but I can’t get it to work. So, I have been mulling around with 2.7. I’ve seen previous post from others on this site, but they have not helped. Does anyone have experience with this. Ultimately, I want to develop an wxPython app that converts video formats. Thanks

    Code that I ultimately wrote that worked for me (very rudimentary, but it works ....) :

    import wx
    import os
    import sys
    import time
    import datetime
    from wx.lib.delayedresult import startWorker



    class dConvert(wx.Frame):
       def __init__(self):
           wx.Frame.__init__(self, None, -1, 'd-Converter', size=(500, 310))
           panel = wx.Panel(self, wx.ID_ANY)#Creates a panel over the widget
           toolbar = self.CreateToolBar()
           toolbar.Realize()

           #Setup Menu
           #Setting up Menu
           menuFile = wx.Menu()
           menuFile.Append(1, "&amp;About...")
           menuFile.AppendSeparator()
           menuFile.Append(2, "E&amp;xit")
           menuBar = wx.MenuBar()
           menuBar.Append(menuFile, "&amp;File")

           panel.SetBackgroundColour('WHITE')

           menu2 = wx.Menu()
           menu2.Append(5, "&amp;.mpg to dvd", ".mpg to dvd")
           menu2.AppendSeparator()
           menu2.Append(wx.NewId(), "&amp;Options...", "Options...")
           menuBar.Append(menu2, "&amp;DVD")


           menu3 = wx.Menu()
           menu3.Append(7, "&amp;Audio/Video Trim")
           #menu3.AppendSeparator()
           menuBar.Append(menu3, "Media")

           self.SetMenuBar(menuBar)
           self.Bind(wx.EVT_MENU, self.OnAbout, id=1)
           self.Bind(wx.EVT_MENU, self.OnQuit, id=2)
           self.Bind(wx.EVT_MENU, self.OnDVD, id=5)
           self.Bind(wx.EVT_MENU, self.OnMedia, id=7)

           #Add icon to frame
           iconFile = "dconverter_image.jpg"
           icon1 = wx.Icon(iconFile, wx.BITMAP_TYPE_JPEG)
           self.SetIcon(icon1)


           self.statusbar = self.CreateStatusBar()
           self.statusbar.SetStatusText("Convert Audio &amp; Video")
           self.statusbar.SetFieldsCount(3)
           self.statusbar.SetStatusWidths([200, -2, -2])



           #Panel Text
           font = wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD)
           font2 = wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD)

           directory = wx.StaticText(panel, -1, 'Path: c:\\ffmpeg\\bin', (300, 13))
           directory.SetFont(font2)

           convertfile = wx.StaticText(panel, -1, 'File:', (270, 53))
           convertfile.SetFont(font)

           convertfile2 = wx.StaticText(panel, -1, 'Format:', (245, 83))
           convertfile2.SetFont(font)

           convertfile3 = wx.StaticText(panel, -1, 'Quality:', (244, 113))
           convertfile3.SetFont(font)

           convertfile4 = wx.StaticText(panel, -1, 'Presets:', (239, 143))
           convertfile4.SetFont(font)

           image_file = 'cd_rom.gif'
           bmp1 = wx.Image(image_file, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
           panel.bitmap1 = wx.StaticBitmap(panel, -1, bmp1, (50, 30))



           self.formats1 = []


           #Select Media path    
           os.chdir("c:\\ffmpeg\\bin")
           wrkdir = os.getcwd()
           filelist = os.listdir(wrkdir)
           #self.formats1 = []

           for filename in filelist:
               (head, filename) = os.path.split(filename)
               if filename.endswith(".avi") or filename.endswith(".mp4") or filename.endswith(".mpg") or filename.endswith(".m4A") or filename.endswith(".MTS") or filename.endswith(".flv") or filename.endswith(".mov") or filename.endswith(".mpeg4") or filename.endswith(".mpeg") or filename.endswith(".mpg2") or filename.endswith(".mkv") or filename.endswith(".m4v") or filename.endswith(".wav") or filename.endswith(".mp3"):
               self.formats1.append(filename)


           self.format_combo1=wx.ComboBox(panel, size=(140, -1),value='Select Media', choices=self.formats1, style=wx.CB_DROPDOWN, pos=(300,50))
           self.Bind(wx.EVT_COMBOBOX, self.fileFormats, self.format_combo1)


           #Media Formats
           self.formats2 = ['Select Format', '.avi','.mpeg','.mp4','.flv','.mov','.m4a','.m4v','.mkv','.mpeg4','.mpg','.mpg2','.mp3','.ogg','.wav','.wma']

           self.format_combo2=wx.ComboBox(panel, size=(100, -1),value='Select Format', choices=self.formats2, style=wx.CB_SORT, pos=(300,81))

           #Media Quality
           self.formats3 = ['-sameq','-qmax']
           self.format_combo3=wx.ComboBox(panel, size=(100, -1),value='Select Quality', choices=self.formats3, style=wx.CB_DROPDOWN, pos=(300,111))



           #-qmax settings
           self.formats4 = ['1','2','3','4','5','6','7','8']
           self.format_combo4=wx.ComboBox(panel, size=(30, -1),value='0', choices=self.formats4, style=wx.CB_DROPDOWN, pos=(405,111))
           self.format_combo4.Disable()


           #Media Quality
           self.formats5 = ['Select Preset','video to mp3']
           self.format_combo5=wx.ComboBox(panel, size=(100, -1),value='Select Preset', choices=self.formats5, style=wx.CB_DROPDOWN, pos=(300,141))

           #Bit rate
           self.formats6 = ['128000', '160000', '180000', '192000']
           self.format_combo6=wx.ComboBox(panel, size=(47, -1),value='k/bs', choices=self.formats6, style=wx.CB_DROPDOWN, pos=(405,141))
           self.format_combo6.Disable()






           #Convert Button
           self.button = wx.Button(panel, label="Convert", pos=(300, 171), size=(80, 20))
           self.Bind(wx.EVT_BUTTON, self.convertButton, self.button)

           #Abort Button
           self.button2 = wx.Button(panel, label="Abort", pos=(385, 171), size=(80, 20))
           self.Bind(wx.EVT_BUTTON, self.OnAbortButton, self.button2)
           self.button2.Disable()

           #Refresh Button
           self.button3 = wx.Button(panel, label="Refresh", pos=(215, 171), size=(80, 20))
           self.Bind(wx.EVT_BUTTON, self.file_refresh, self.button3)


           #ComboBox Event
           self.Bind(wx.EVT_COMBOBOX, self.OncomboBox, self.format_combo3)
           self.Bind(wx.EVT_COMBOBOX, self.OncomboBox2, self.format_combo5)
           self.Bind(wx.EVT_COMBOBOX, self.OncomboBox3, self.format_combo2)



       def file_refresh(self, e):
           self.format_combo1.Clear()
           os.chdir("c:\\ffmpeg\\bin")
           wrkdir = os.getcwd()
           filelist = os.listdir(wrkdir)
           for m_files in filelist:
               if m_files.endswith(".avi") or m_files.endswith(".mp4") or m_files.endswith(".mpg") or m_files.endswith(".m4A") or m_files.endswith(".MTS") or m_files.endswith(".flv") or m_files.endswith(".mov") or m_files.endswith(".mpeg4") or m_files.endswith(".mpeg") or m_files.endswith(".mpg2") or m_files.endswith(".mkv") or m_files.endswith(".m4v") or m_files.endswith(".wav") or m_files.endswith(".mp3"):
               self.format_combo1.Append(m_files)



       def file_rename(self, f_name):
           ts = time.time()
           #Capture readable timestamp
           st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H-%M-%S')
           os.chdir("c:\\ffmpeg\\bin")
           wrkdir = os.getcwd()

           #get file extenstion from original file
           #fileName, fileExtension = os.path.splitext(wrkdir + '\\' + f_name)

           #add file extension to timestamp
           new_file = st

           return new_file



       def fileFormats(self, e):
           myFormats = {'audio': ('Select Format', '.m4a', '.mp3', '.ogg', '.wav', '.wma'), 'video': ('Select Format', '.avi', '.flv', '.mkv', '.m4v', '.mov', '.mpg', '.mpg2', '.mpeg4', '.mp4', '.mpeg')}
           bad_file = ['Media not supported']
           myFile = self.format_combo1.GetValue()
           f_exten = (x for x in myFormats['audio'] + myFormats['video'] if myFile.endswith(x))
       extension = f_exten.next()

           if extension in myFormats['audio']:
               self.format_combo2.SetItems(myFormats['audio'])

           elif extension in myFormats['video']:
               self.format_combo2.SetItems(myFormats['video'])
           else:
               self.format_combo2.SetItems(bad_file)


       def OnQuit(self, event):
           self.Close(True)

       def OnAbout(self, event):
           wx.MessageBox("d-Converter 1.0\n\n Developer: D.Monroe\n\nCopyright 2012",
                   "About d-Converter", wx.OK | wx.ICON_INFORMATION, self)


       def OncomboBox(self, e):
           quality=self.format_combo3.GetValue()
           if quality == '-qmax':
               self.format_combo4.Enable()

           else:
               self.format_combo4.Disable()



       def OncomboBox2(self, e):
           quality=self.format_combo5.GetValue()
           if quality != 'Select Preset':
               self.format_combo1.Enable()
               self.format_combo2.Disable()
               self.format_combo3.Disable()
               self.format_combo4.Disable()
               self.format_combo6.Enable()

           elif quality == 'Select Preset':
               self.format_combo1.Enable()
               self.format_combo2.Enable()
               self.format_combo3.Enable()
               self.format_combo4.Disable()
               self.format_combo5.Enable()
               self.format_combo6.Disable()

           elif quality == 'video to mp3':
               self.format_combo6.Enable()
               self.format_combo2.Disable()
               self.format_combo3.Disable()
               self.format_combo4.Disable()

       def OncomboBox3(self, e):
           v_format=self.format_combo2.GetValue()
           if v_format != 'Select Format':
               self.format_combo1.Enable()
               self.format_combo2.Enable()
               self.format_combo3.Enable()
               self.format_combo4.Enable()
               self.format_combo5.Disable()
               self.format_combo6.Disable()

           elif v_format == 'Select Format':
               self.format_combo1.Enable()
               self.format_combo2.Enable()
               self.format_combo3.Enable()
               self.format_combo4.Disable()
               self.format_combo5.Enable()
               self.format_combo6.Disable()





       def OnMedia(self, e):
           pass

       def OnDVD(self, e):
           """ Select a directory to search"""
           os.chdir("c:\\ffmpeg\\bin")
           wrkdir = os.getcwd()
           filelist = os.listdir(wrkdir)
           progdir = 'c:\\ffmpeg\\bin\\ffmpeg.exe' + ' -i '
           prog_dir = ' -target '
           progdir3 = '-dvd -ac 2 '
           vid_format = '.mpg'


           sampleList = []
           for filename in filelist:
              (head, filename) = os.path.split(filename)
              if filename.endswith(".avi") or filename.endswith(".flv") or filename.endswith(".mpeg") or filename.endswith(".mp4") or filename.endswith(".mov") or filename.endswith(".mpg2"):
               sampleList.append(filename)

           dlg = wx.SingleChoiceDialog(
                  self, "Files in c:\\ffmpeg\\bin", 'Select video to convert',
              sampleList,
              wx.CHOICEDLG_STYLE
              )

           if dlg.ShowModal() == wx.ID_OK:
               cur_item = dlg.GetStringSelection()
               s_string = cur_item
               #f_string = self.file_rename(s_string)
               f_string = s_string.replace(' ', '')





           dlg.Destroy()


           dlg2 = wx.SingleChoiceDialog(
                  self, "Files in c:\\ffmpeg\\bin", 'Select video standard ',
              ["pal", "ntsc"],
              wx.CHOICEDLG_STYLE
              )

           if dlg2.ShowModal() == wx.ID_OK:
               cur_item2 = dlg2.GetStringSelection()
               s_string2 = cur_item2
               self.button.Disable()
               self.button2.Enable()
               self.format_combo1.Disable()
               self.format_combo2.Disable()
               self.format_combo3.Disable()
               self.format_combo4.Disable()
               self.format_combo5.Disable()
               self.format_combo6.Disable()
               startWorker(self.LongTaskDone, self.LongTask4, wargs=(progdir, wrkdir, prog_dir, progdir3, f_string, s_string2, vid_format))


           dlg2.Destroy()






       def convertButton(self, e):
           unit1 = self.format_combo1.GetValue()
           unit2 = self.format_combo2.GetValue()
           unit3 = self.format_combo3.GetValue()
           unit4 = None
           unit5 = self.format_combo5.GetValue()
           bitRate = self.format_combo6.GetValue()
           unit6 = bitRate
           if unit3 == '-qmax':
               unit4 = self.format_combo4.GetValue()
           else:
               pass

           os.chdir("c:\\ffmpeg\\bin")
           wrkdir = os.getcwd()

           newfile = unit1



           #stripped = os.path.splitext(newfile)[0] # Updated 9/26/2013 to strip extension.
           #stripped = newfile.strip('mpeg3kaviovfl4w2c.') #Strips the extension from the original file name
           stripped = self.file_rename(newfile)

           #os.rename(newfile, newfile_f)



           progname='c:\\ffmpeg\\bin\\ffmpeg.exe' + ' -i '

           preset1_a='-vn -ar 44100 -ac 2 -ab'
           preset1_b='-f mp3 '
           preset_mp3='.mp3'







            if (unit1 == 'Select Media' or unit1 == ''):
                       amsg = wx.MessageDialog(None, 'You must select a media file!', 'Media Converter', wx.ICON_INFORMATION)
                       amsg.ShowModal()
                       amsg.Destroy()



            elif (unit1 != 'Select Media' or unit1 != '') and (unit5 == 'Select Preset'):

                if (unit2 == 'Select Format' or unit2 == ''):
                   amsg = wx.MessageDialog(None, 'You must select a format', 'Media Converter', wx.ICON_INFORMATION)
                   amsg.ShowModal()
                   amsg.Destroy()

                   self.format_combo3.Enable()
                   self.format_combo4.Enable()
                   self.format_combo5.Enable()

               else:
                   pass

               if (unit3 == 'Select Quality' or unit3 == ''):
                   amsg = wx.MessageDialog(None, 'You must select quality', 'Media Converter', wx.ICON_INFORMATION)
                   amsg.ShowModal()
                   amsg.Destroy()


               elif (unit3 == '-qmax'):
                   if (unit4 == '0' or unit4 == ''):
                       amsg = wx.MessageDialog(None, 'You must select number between 1-8.', 'Media Converter', wx.ICON_INFORMATION)
                       amsg.ShowModal()
                       amsg.Destroy()
                   else:
                       self.button.Disable()
                       self.button2.Enable()
                       pass

               else:
                   self.button.Disable()
                   self.button2.Enable()
                   self.format_combo1.Disable()
                   self.format_combo2.Disable()
                   self.format_combo3.Disable()
                   self.format_combo4.Disable()
                   startWorker(self.LongTaskDone, self.LongTask, wargs=(progname,wrkdir,unit1,unit3,stripped,unit2))





           elif (unit1 != 'Select Media' or unit1 != '') and (unit5 == 'video to mp3'):
               if unit6 == 'k/bs' or unit6 == None:
                   amsg = wx.MessageDialog(None, 'You must select a bit rate.', 'Media Converter', wx.ICON_INFORMATION)
                   amsg.ShowModal()
                   amsg.Destroy()

               else:
                   self.button.Disable()
                   self.button2.Enable()
                   self.format_combo1.Disable()
                   self.format_combo2.Disable()
                   self.format_combo3.Disable()
                   self.format_combo4.Disable()
                   self.format_combo5.Disable()
                   self.format_combo6.Disable()
                   startWorker(self.LongTaskDone, self.LongTask3, wargs=(progname, wrkdir, unit1, preset1_a, unit6, preset1_b, stripped, preset_mp3))











       def LongTask(self, progname, wrkdir, unit1, unit3, stripped, unit2):
           convert_file1 = progname + wrkdir + '\\' + unit1 + ' ' + unit3 + ' ' + stripped + unit2
           self.statusbar.SetStatusText("Converting: " + unit1 + "...")
           os.system(convert_file1)
           print convert_file1





       def LongTask2(self, progname, wrkdir, unit1, unit3, unit4, stripped, unit2):
           convert_file2 = progname + wrkdir + '\\' + unit1 + ' ' + unit3 + ' ' + unit4 + ' ' + stripped + unit2
           self.statusbar.SetStatusText("Converting: " + unit1 + "...")
           os.system(convert_file2)


       def LongTask3(self, progname, wrkdir, unit1, preset1_a, unit6, preset1_b, stripped, preset_mp3):
           convert_file3 = progname + wrkdir + '\\' + unit1 + ' ' + preset1_a + ' ' + unit6 + ' ' + preset1_b + stripped + preset_mp3
           self.statusbar.SetStatusText("Converting: " + unit1 + "...")
           os.system(convert_file3)

       def LongTask4(self, progdir, wrkdir, prog_dir, progdir3, f_string, s_string2, vid_format):
           #convert_file4 = progdir + wrkdir + '\\' + s_string + prog_dir + s_string2 + progdir3 + s_string.strip('mpegaviw24ofl.') + vid_format
           convert_file4 = progdir + f_string + prog_dir + s_string2 + progdir3 + f_string.strip('mpegaviw24ofl.') + vid_format
           self.statusbar.SetStatusText("Converting: " + f_string + "...")
           os.system(convert_file4)
           print convert_file4



       def LongTaskDone(self, result):
           r = result.get()
           if r:
               amsg = wx.MessageDialog(None, 'Aborted!', 'Media Converter', wx.ICON_INFORMATION)
               self.statusbar.SetStatusText("Convert Aborted ...")
               amsg.ShowModal()
               amsg.Destroy()
               self.LongTask.terminate()
           else:
               self.statusbar.SetStatusText("Done ...")
               emsg = wx.MessageDialog(None, 'Finished Converting!', 'Media Converter', wx.ICON_INFORMATION)
               emsg.ShowModal()
               emsg.Destroy()
               self.format_combo1.Enable()
               self.format_combo2.Enable()
               self.format_combo3.Enable()
               self.format_combo5.Enable()
               self.format_combo4.Disable()
               self.format_combo6.Disable()
               self.button.Enable()
               self.button2.Disable()
               self.shouldAbort = False
           """self.progress_bar.SetValue(0)
           self.progress_bar.Hide()"""



       def OnAbortButton(self, e):
           endprogram = 'c:\\Windows\\System32\\taskkill /IM cmd.exe'
           os.system(endprogram)
           self.format_combo1.Enable()
           self.format_combo2.Enable()
           self.format_combo3.Enable()
           self.format_combo5.Enable()
           self.button.Enable()




    if __name__ == '__main__':
       app = wx.PySimpleApp()
       frame = dConvert()
       frame.SetSizeHints(500,310,500,310)
       frame.Show()
       app.MainLoop()