Recherche avancée

Médias (0)

Mot : - Tags -/logo

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (80)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (9882)

  • lavc : remove the locking code in avcodec_close()

    5 avril 2014, par Anton Khirnov
    lavc : remove the locking code in avcodec_close()
    

    This function should not modify any global state, so there should be no
    reason for any locking.

    • [DH] libavcodec/utils.c
  • ffmpeg direct show obvoius problem. ffmpeg is not letting to reconnect to camera

    11 avril 2021, par josh joyer

    I use ffmpeg with command

    


    ffmpeg -f dshow -i video="@device_pnp_\\?\usb#vid_1908&pid_2311&mi_00#6&353461d3&0&0000#{65e8773d-8f56-`11d0-a3b9-00a0c9223196}\global" output.mkv`


    


    It is fine to record camera but it uses direct show standard
Microsoft Windows library that is faulty.
Once connected to camera one is unable to use camera again or disconnect from it.
One should restart computer to connect to camera again.
Microsoft tells not to use direct show (dshow) for camera but
to use AForge or VisioForge libraries.

    


    But ffpmeg uses faulty dshow library. Is there any way to
change direct show to some other so one could connect to camer multiple times ?

    


  • How to set a dictionary based off of subprocess.check_output

    5 juillet 2020, par Jessie Wilson

    This is a confusing question, however I will try to make it as clear as possible.
Currently when I build my app, if I run it via the .py file it works perfectly. However, once I compile it some parts of my app aren't functioning, specifically this code here.

    


    def ffprobe_run():
global output
global acodec_choices
run = subprocess.check_output("ffprobe " + videoinputquoted + " " + ffprobecommand, universal_newlines=True)
print(run)
if run[-2] == '3':
    acodec_choices = {"One": "1",
                      "Two": "2",
                      "Three": "3"}
elif run[-2] == '2':
    acodec_choices = {"One": "1",
                      "Two": "2",}
elif run[-2] == '1':
    acodec_choices = {"One": "1",}
print(acodec_choices.values())


    


    I am able to get the results I want with this command. Currently that's using FFPROBE to check for the amount of audio tracks there is in a file. It returns values like so

    


    1
2
3


    


    If there is 3 tracks. Or

    


    1 
2


    


    If it's two tracks. I use the command[-2]
which will give me the result of '2'

    


    So I'm taking that result and defining a dictionary to automatically populate/change an OptionMenu

    


    It defines this in my main app

    


     # Audio Stream Selection
    acodec_stream = StringVar(audio_window)
    if ffprobeinfo[-2] == '1':
        acodec_stream_choices = {'Track 1': "-map 0:a:0"}
    elif ffprobeinfo[-2] == '2':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1"}
    elif ffprobeinfo[-2] == '3':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2"}
    elif ffprobeinfo[-2] == '4':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3"}
    elif ffprobeinfo[-2] == '5':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4"}
    elif ffprobeinfo[-2] == '6':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4",
                                 'Track 6': "-map 0:a:5"}
    elif ffprobeinfo[-2] == '7':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4",
                                 'Track 6': "-map 0:a:5",
                                 'Track 7': "-map 0:a:6"}
    elif ffprobeinfo[-2] == '8':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4",
                                 'Track 6': "-map 0:a:5",
                                 'Track 7': "-map 0:a:6",
                                 'Track 8': "-map 0:a:7"}
    elif ffprobeinfo[-2] == '9':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4",
                                 'Track 6': "-map 0:a:5",
                                 'Track 7': "-map 0:a:6",
                                 'Track 8': "-map 0:a:7",
                                 'Track 9': "-map 0:a:8"}
    elif ffprobeinfo[-2] == '10':
        acodec_stream_choices = {'Track 1': "-map 0:a:0",
                                 'Track 2': "-map 0:a:1",
                                 'Track 3': "-map 0:a:2",
                                 'Track 4': "-map 0:a:3",
                                 'Track 5': "-map 0:a:4",
                                 'Track 6': "-map 0:a:5",
                                 'Track 7': "-map 0:a:6",
                                 'Track 8': "-map 0:a:7",
                                 'Track 9': "-map 0:a:8",
                                 'Track 10': "-map 0:a:9"}
    acodec_stream.set('Track 1')  # set the default option
    acodec_stream_label = Label(audio_window, text="Track :")
    acodec_stream_label.grid(row=0, column=0, columnspan=1, padx=5, pady=5)
    acodec_stream_menu = OptionMenu(audio_window, acodec_stream, *acodec_stream_choices.keys())
    acodec_stream_menu.grid(row=1, column=0, columnspan=1, padx=5, pady=5)


    


    This is all working great, If I am running the app via the .py file. Once I compile it's missing the entire defined dictionary selection.

    


    This is what it's supposed to look like
enter image description here

    


    However, this is what it looks like with the code above. enter image description here

    


    If I define the dictionary myself, it works fine. However, then I can't automatically input the correct amount of available audio tracks.

    


    I hope this isn't too much code. I'm very new at this.

    


    EDIT :

    


    If I compile via pyinstaller and remove the -w flag, the program runs correctly, shows the tracks.

    


    I'm assuming I'm not using subprocess/calling something correctly. The program I don't think is calling to FFPROBE when it doesn't have a console, vs calling it and getting the value when it has it's own console.