Recherche avancée

Médias (91)

Autres articles (78)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • 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.

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (7334)

  • Fatal Python error : could not acquire lock for at interpreter shutdown, possibly due to daemon threads

    3 octobre 2019, par JavNoor

    Running the following :

    import imageio

    class vidrdf:
       def __init__(self, vidfile):
           self.vid = imageio.get_reader(vidfile,  'ffmpeg')

    vidfile = 'movie.mov'
    rdfobj = vidrdf(vidfile)

    I get :

    Fatal Python error: could not acquire lock for <_io.BufferedReader name=8> at interpreter shutdown, possibly due to daemon threads

    Thread 0x00007fd2dc2a8700 (most recent call first):
     File “/path/miniconda3/envs/flower/lib/python3.7/site-packages/imageio_ffmpeg/_parsing.py", line 61 in run
     File "miniconda3/envs/flower/lib/python3.7/threading.py", line 926 in _bootstrap_inner
     File “/path/miniconda3/envs/flower/lib/python3.7/threading.py", line 890 in _bootstrap

    Current thread 0x00007fd2f0bb9700 (most recent call first):
     File “/path/miniconda3/envs/flower/lib/python3.7/subprocess.py", line 1704 in _communicate
     File “/path/miniconda3/envs/flower/lib/python3.7/subprocess.py", line 939 in communicate
     File “/path/miniconda3/envs/flower/lib/python3.7/site-packages/imageio_ffmpeg/_io.py", line 193 in read_frames
     File “/path/miniconda3/envs/flower/lib/python3.7/site-packages/imageio/plugins/ffmpeg.py", line 342 in _close
     File “/path/miniconda3/envs/flower/lib/python3.7/site-packages/imageio/core/format.py", line 252 in close
     File “/path/miniconda3/envs/flower/lib/python3.7/site-packages/imageio/core/format.py", line 241 in __del__
    Aborted (core dumped)

    It doesn’t happen if I try :

    import imageio

    class vidrdf:
       def __init__(self, vidfile):
           self.vid = imageio.get_reader(vidfile,  'ffmpeg')

    vidfile = 'movie.mov'
    vidrdf(vidfile)

    or

    import imageio

    class vidrdf:
       def __init__(self, vidfile):
           vid = imageio.get_reader(vidfile,  'ffmpeg')

    vidfile = 'movie.mov'
    rdfobj = vidrdf(vidfile)

    So this is clearly an issue with copying the object. I’ve searched about daemon threads, but since I’m using imageio directly I can’t figure out why and how to resolve it. I would appreciate any recommendations.

  • ffmpeg download mp3 in chunks slower than whole file

    6 août 2021, par loretoparisi

    I'm programmatically downloading in Python mp3 file's as wav chunks, seeking at position with ss and t with ffmpeg resulting in a sequence of ffmpeg commands

    


    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss 0:08:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss 0:09:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss -ss 0:10:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
...


    


    executed via concurrent.futures.ThreadPoolExecutor in this way :

    


    with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREADS) as executor:
        for i,cmd in enumerate(process_list):
            futures.append(executor.submit(downloader.chunk_download,(cmd,i)))

        for future in concurrent.futures.as_completed(futures):
            try:
                completed.append(future.result())
            except Exception as e:print(e)
    completed.sort() 
    for k,c in enumerate(completed):
        if not k:
            waveform = c[1]
        else:
            waveform = np.append(waveform,c[1])


    


    where chunk_download is concat the chunks into the whole waveform

    


    def chunk_download(self,args):
        cmd=args[0]
        i=args[1]
        print('Downloading chunk n° %i' % i)

        print( ' '.join(cmd))
        process = subprocess.run(cmd,
                            stdout=subprocess.PIPE,
                            stderr=subprocess.PIPE,
                            bufsize=10**8)
        #buffer, stderr = process.communicate()
        buffer = process.stdout
        stderr = process.stderr
        print('chunk n° %i DOWNLOADED' % i)
        # convert to signal
        chunk_waveform = np.frombuffer(buffer=buffer, dtype=np.uint16, offset=8*44)
        chunk_waveform = chunk_waveform.astype(self.dtype)  
        print(len(chunk_waveform)/44100) 

        return i,chunk_waveform


    


    this works ok, but if I download the whole mp3, executing the command in cmd like :

    


    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -sn -vn -y -f wav pipe:1


    


    It will take less time than the concurrent chunks download for the same file length, while I would expect the opposite. Could be this related to ffmpeg threading option (param --thread ?). If not, why the concurrent chunks download operation is slower ?

    


  • Understanding User Flow : Eight Practical Examples for Better UX

    4 octobre 2024, par Daniel Crough — Analytics Tips, UX

    Imagine trying to cook a complex dish without a recipe. You might have all the ingredients, but without a clear sequence of steps, you’re likely to end up with a mess rather than a masterpiece. Similarly, designing a website without understanding user flow is a recipe for confusion and lost conversions.

    User flows—the paths visitors take through your site—are the recipes for digital success. They provide a clear sequence of steps that guide users towards their goals, whether that’s making a purchase, signing up for a newsletter, or finding information. By understanding and optimising these flows, you can create a website that’s not just functional, but delightfully intuitive.

    In this article, we’ll explore seven practical user flow examples and show you how to apply these insights using web analytics tools. Whether you’re new to user experience (UX) design or a seasoned professional, you’ll find valuable takeaways to enhance your digital strategy.

    Read More