Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (75)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (6793)

  • Error in ffmpeg when reading from UDP stream

    24 juillet 2013, par six6and1one

    I'm trying to process frames from a UDP stream using ffmpeg. Everything will run fine for a while but av_read_frame() will always eventually return either AVERROR_EXIT (Immeditate exit requested) or -5 (Error number -5 occurred) while the stream should still be running fine. Right before the error it always prints the following message to the console

    [mpeg2video @ 0caf6600] ac-tex damaged at 14 10
    [mpeg2video @ 0caf6600] Warning MVs not available
    [mpeg2video @ 0caf6600] concealing 800 DC, 800 AC, 800 MV errors in I frame

    (the numbers in the message vary from run to run)

    I have a suspicion that the error is related to calling av_read_frame too quickly. If I have it run as fast as possible, I usually get an error within 10-20 frames, but if I put a sleep before reading it will run fine for a minute or so and then exit with an error. I realize this is hacky and assume there is a better solution. Bottom line : is there a way to dynamically check if 'av_read_frame()' is ready to be called ? or a way to supress the error ?

    Psuedo code of what I'm doing below. Thanks in advance for the help !

    void getFrame()
    {
       //wait here?? seems hacky...
       //boost::this_thread::sleep(boost::posix_time::milliseconds(25));  

       int av_read_frame_error = av_read_frame(m_input_format_context, &m_input_packet);          
       if(av_read_frame_error == 0){      
           //DO STUFF - this all works fine when it gets here
       }
       else{              
           //error
           char errorBuf[AV_ERROR_MAX_STRING_SIZE];
           av_make_error_string(errorBuf, AV_ERROR_MAX_STRING_SIZE, av_read_frame_error);
           cout << "FFMPEG Input Stream Exit Code: " << av_read_frame_error << "   Message: " << errorBuf << endl;            
       }
    }
  • pexpect.run() terminates before ending ffmpeg without finishing the conversion

    24 novembre 2012, par Davisein

    I'm working on a python script that does a custom conversion of videos via ffmpeg.

    My problem is that the execution of ffmpeg stops suddenly after a bit of conversion (usually 3-4 mb out of 100mb) with a None exit code.

    I'm using the pexpect library. Currently I do not check the progress but I will in a close future. It seems that I am right using pexpect regarding these questions FFMPEG and Pythons subprocess and Getting realtime output from ffmpeg to be used in progress bar (PyQt4, stdout). This is the command that I'm running (I have checked that it's exactly this one)

    nice ffmpeg -i '/full/path' -s 640x360 -strict experimental -vcodec libx264
      -f mp4 -  coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -crf 26
      -bufsize 4000k -maxrate 350k -preset medium -acodec libvo_aacenc
      -ar 48000.0 -ab 128K -threads 2 -y '/full/path/out'

    I am using nice but I have tried also without it and the result ends up being the same.

    I'm running pexpect this way :

    output, exit = pexpect.run(self.command(), withexitstatus=True,\
                                      logfile=logfile)
    print output
    print exit

    Of course I have tried the same command on the command line and it works fine.

    Any clue on what might be happening ?

  • Python convert mp3 to mp4 with static image

    15 octobre 2020, par αԋɱҽԃ αмєяιcαη

    I do have x file which contain a list of mp3 files where i would like to convert each mp3 file to mp4 file with a static .png photo.

    


    Seems the only way here is to use ffmpeg but idk how to achieve it.

    


    i made the script to take an input of mp3 folder and one .png photo`.

    


    then it's will create new folder x-converted where i would like to convert each mp3 to mp4 with the static png with same name such as file1.mp3 to became file1.mp4

    


    here's my code :

    


    import os
import sys
from pathlib import Path
import shutil

if len(sys.argv) != 3 or not sys.argv[2].endswith("png"):
    print("Make sure to provide two arguments only\nSecond arugment should be .png")
    exit()


def CheckFile():
    try:
        files = []
        for path in os.listdir(sys.argv[1]):
            full_path = os.path.join(sys.argv[1], path)
            if os.path.isfile(full_path):
                files.append(full_path)
        mp3 = [x for x in files if x.endswith(".mp3")]
        if len(mp3) >= 1:
            return mp3, sys.argv[2], sys.argv[1]
        else:
            print(
                "Make Sure That You've at least 1 Mp3 file")
            exit()
    except FileNotFoundError:
        print("Sorry, This File Is Not Exist!")
        exit()


def Convert():
    mp3, jpg, name = CheckFile()
    name = f"{Path(name).name}-converted"
    shutil.rmtree(name, ignore_errors=True)
    os.mkdir(name)
    os.chdir(name)
    # from here i don't know how to use `ffmpeg`


Convert()