Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (46)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6408)

  • http: Support setting custom User-Agent

    6 mars 2014, par Clément Bœsch
    http: Support setting custom User-Agent
    

    Contextually make the default User-Agent use the common
    "Name/Version" pattern.

    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>

    • [DH] doc/protocols.texi
    • [DH] libavformat/http.c
  • My media converter app crashes when handling file names with spaces

    24 mars 2014, par suffa

    I wrote an app that uses ffmpeg to convert media files (.wav, .avi, .mp3, ... etc.). It works only with file names that have no spaces. When a file name with spaces is encountered, the app immediately closes. Can someone tell me if the string I'm using to call ffmpeg is correct, or need some characters escaped ? Below is a fragment of the code :

    ...
    ...
    ...

    #Select Media
    os.chdir("c:\\d-Converter\\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(".flv") or filename.endswith(".mov") or filename.endswith(".mpeg4") or filename.endswith(".mpeg") or filename.endswith(".mpg2") or filename.endswith(".wav") or filename.endswith(".mp3"):
               self.formats1.append(filename)
       self.format_combo1=wx.ComboBox(panel, size=(140, -1),value=&#39;Select Media&#39;, choices=self.formats1, style=wx.CB_DROPDOWN, pos=(300,50))

       self.Bind(wx.EVT_COMBOBOX, self.fileFormats, self.format_combo1)


    ...
    ...
    ...


    def fileFormats(self, e):
       myFormats = {&#39;audio&#39;: (&#39;Select Format&#39;,&#39;.mp3&#39;, &#39;.ogg&#39;, &#39;.wav&#39;, &#39;.wma&#39;), &#39;video&#39;: (&#39;Select Format&#39;,&#39;.flv&#39;,&#39;.mpg&#39;, &#39;.mp4&#39;, &#39;.mpeg&#39;)}
       bad_file = [&#39;Media not supported&#39;]
       myFile = self.format_combo1.GetValue()
       f_exten = (x for x in myFormats[&#39;audio&#39;] + myFormats[&#39;video&#39;] if myFile.endswith(x))
       extension = f_exten.next()

       if extension in myFormats[&#39;audio&#39;]:
           self.format_combo2.SetItems(myFormats[&#39;audio&#39;])

       elif extension in myFormats[&#39;video&#39;]:
           self.format_combo2.SetItems(myFormats[&#39;video&#39;])
       else:
           self.format_combo2.SetItems(bad_file)
    ...
    ...
    ...


    def convertButton(self, e):

       unit1 = self.format_combo1.GetValue()
       if unit1:
           unit1 = self.repl_Wspace(unit1)

       #Media Formats
       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 == &#39;-qmax&#39;:
           unit4 = self.format_combo4.GetValue()
       else:
           pass

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

       newfile = unit1
       stripped = newfile.strip(&#39;mpeg3aviovfl4w2c.&#39;) #Strips the extension from the original file name


       progname=&#39;c:\\d-Converter\\ffmpeg\\bin\\ffmpeg.exe&#39; + &#39; -i &#39;

       preset1_a=&#39;-vn -ar 44100 -ac 2 -ab&#39;
       preset1_b=&#39;-f mp3 &#39;
       preset_mp3=&#39;.mp3&#39;

       chck_unit1 = self.my_endswith(unit1)



       while True:    
           if unit5 == &#39;video to mp3&#39;:

               if unit6 == &#39;k/bs&#39; or unit6 == &#39;&#39;:
                   amsg = wx.MessageDialog(None, &#39;You must select a bit rate.&#39;, &#39;Media Converter&#39;, wx.ICON_INFORMATION)
                   amsg.ShowModal()
                   amsg.Destroy()
                   break

               elif unit5 == &#39;video to mp3&#39; and unit6 != &#39;k/bs&#39; or unit6 != &#39;&#39;:
                   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))
                   break
               elif unit1 != unit1.endswith(".mpg") or unit1.endswith(".mpeg") or unit1.endswith(".avi") or unit1.endswith(".mp4") or unit1.endswith(".flv"):
                   bmsg = wx.MessageDialog(None, &#39;You must select a valid format to convert to .mp3.&#39;, &#39;Media Converter&#39;, wx.ICON_INFORMATION)
                   bmsg.ShowModal()
                   bmsg.Destroy()
                   break

           else:
               pass



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


           elif unit2 == &#39;Select Format&#39; or unit2 == &#39;&#39; or unit2 == chck_unit1:
               amsg = wx.MessageDialog(None, &#39;You must select a valid format&#39;, &#39;Media Converter&#39;, wx.ICON_INFORMATION)
               amsg.ShowModal()
               amsg.Destroy()
               break


           elif unit3 == &#39;Select Quality&#39; or unit3 == &#39;&#39;:
               amsg = wx.MessageDialog(None, &#39;You must select quality&#39;, &#39;Media Converter&#39;, wx.ICON_INFORMATION)
               amsg.ShowModal()
               amsg.Destroy()
               break

           elif unit3 != &#39;Select Quality&#39; or unit3 != &#39;&#39;:
               self.format_combo5.Disable()

               if unit3 == &#39;-qmax&#39;:
                   if unit4 == &#39;0&#39; or unit4 == &#39;&#39;:
                       amsg = wx.MessageDialog(None, &#39;You must select number between 1-8.&#39;, &#39;Media Converter&#39;, wx.ICON_INFORMATION)
                       amsg.ShowModal()
                       amsg.Destroy()
                       break
                   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()
                       startWorker(self.LongTaskDone, self.LongTask2, wargs=(progname,wrkdir,unit1,unit3,unit4,stripped,unit2))
                       break
               elif unit3 == &#39;-sameq&#39;:
                   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()
                   startWorker(self.LongTaskDone, self.LongTask, wargs=(progname,wrkdir,unit1,unit3,stripped,unit2))
                   break  




    def LongTask(self, progname, wrkdir, unit1, unit3, stripped, unit2):
       convert_file1 = progname + wrkdir + &#39;\\&#39; + unit1 + &#39; &#39; + unit3 + &#39; &#39; + 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 + &#39;\\&#39; + unit1 + &#39; &#39; + unit3 + &#39; &#39; + unit4 + &#39; &#39; + stripped + unit2
       self.statusbar.SetStatusText("Converting: " + unit1 + "...")
       os.system(convert_file2)

    ...
    ...
    ...
  • avformat/wtvenc : advise user when H264 startcode is not present

    30 mars 2014, par Peter Ross
    avformat/wtvenc : advise user when H264 startcode is not present
    

    Fixes ticket #3473.

    Signed-off-by : Peter Ross <pross@xvid.org>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/Makefile
    • [DH] libavformat/wtvenc.c