Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (31)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (5731)

  • ffmpeg send live stream from dshow Windows [on hold]

    1er octobre 2015, par Thiago Adriano

    How Can I send live stream from my placa Osprey on windows ? I need to play a video in HTML, but I don’t know How Can I do this ... Anybody help me ?

  • TypeError : __init__() missing 2 required positional arguments : 'stdout' and 'stderr'

    15 février 2024, par mike.w

    I encountered the following error while running a program extract_frame_and_wav_multiprocess.py, which is designed to extract audio and frames from the videos in dataset MSRVTT.
Here is the error message from the program :

    


    (valor) xxx:/VALOR/utils$ python extract_frame_and_wav_multiprocess.py                                                                                                                                                                           
0%|                                       | 0/10005 [00:00<?, ?it/s]
Exception in thread Thread-3:                                                                                                                                                      
Traceback (most recent call last):                                                                                                                                                   
File "/anaconda3/envs/valor/lib/python3.9/threading.py", line 973, in _bootstrap_inner                                                    
self.run()                                                                                                                                                                       
File "/anaconda3/envs/valor/lib/python3.9/threading.py", line 910, in run                                                                                          
self._target(*self._args, **self._kwargs)                                                                                                                                        
File "/anaconda3/envs/valor/lib/python3.9/multiprocessing/pool.py", line 576, in _handle_results                                                                   
task = get()                                                                                                                                                                     
File "/anaconda3/envs/valor/lib/python3.9/multiprocessing/connection.py", line 256, in recv                                                                        
return _ForkingPickler.loads(buf.getbuffer())                                                                                                                                  
TypeError: __init__() missing 2 required positional arguments: 'stdout' and 'stderr'   


    


    This is the location indicated by the error message(in the file /anaconda3/envs/valor/lib/python3.9/multiprocessing/connection.py) :

    


        def recv(self):
        """Receive a (picklable) object"""
        self._check_closed()
        self._check_readable()
        buf = self._recv_bytes()
        return _ForkingPickler.loads(buf.getbuffer())


    


    The following program is the python program extract_frame_and_wav_multiprocess.py being executed :

    


    import os
import os.path as P
import ffmpeg
import json
import tqdm
import numpy as np
import threading
import time
import multiprocessing
from multiprocessing import Pool
import subprocess



### change diffenrent datasets
input_path = '../datasets/msrvtt/raw_videos'
output_path = '../datasets/msrvtt/testt'
data_list = os.listdir(input_path)

def execCmd(cmd):
    r = os.popen(cmd)
    text = r.read()
    r.close()
    return text

def pipline(video_path, video_probe, output_dir, fps, sr, duration_target):
    video_name = os.path.basename(video_path)
    audio_name = video_name.replace(".mp4", ".wav")
    video_name = video_name.replace(".mp4", "")


    #extract video frames fps
    fps_frame_dir = P.join(output_dir, f"frames_fps{fps}", video_name)
    os.makedirs(fps_frame_dir, exist_ok=True)
    cmd = "ffmpeg -loglevel error -i {} -vsync 0 -f image2 -vf fps=fps={:.02f} -qscale:v 2 {}/frame_%04d.jpg".format(
              video_path, fps, fps_frame_dir)
    subprocess.call(cmd, shell=True)

    # Extract Audio
    sr_audio_dir = P.join(output_dir,f"audio_{sr}hz")
    os.makedirs(sr_audio_dir, exist_ok=True)
    audio_file_path = P.join(sr_audio_dir, audio_name)
    cmd = "ffmpeg -i {} -loglevel error -f wav -vn -ac 1 -ab 16k -ar {} -y {}".format(
            video_path, sr, audio_file_path)
    subprocess.call(cmd, shell=True)


def extract_thread(video_id):
    
    video_name = os.path.join(input_path, video_id)
    if not os.path.exists(video_name):
        return
    probe = ffmpeg.probe(video_name)
    pipline(video_name, probe, output_path, fps=4, sr=22050, duration_target=10)


def extract_all(video_ids, thread_num, start):
    length = len(video_ids)
    print(length)
    with Pool(thread_num) as p:
        list(tqdm.tqdm(p.imap(extract_thread, video_ids), total=length))

if __name__=='__main__':
    thread_num = 50
    start = 0

    print(len(data_list))
    extract_all(data_list, thread_num, start)


    


    It's strange that similar errors did not occur when processing the DiDeMo video dataset, but they are encountered when handling the MSRVTT dataset. (Is this related to the fact that the DiDeMo dataset doesn't have audio ?)

    


  • Evolution #3316 : Ajouter un helper css sur les label des objets

    9 février 2021, par b b

    Ha ok, je comprends mieux, on parle de la vue d’un objet. J’ai souvenir d’avoir patché ça dans un plugin généré par la fabrique cf :

    .film #wysiwyg h3.fieldset  margin : 1em 0 0.5em ; padding : 5px 10px ; color : #444 ; border-radius : 5px ; background-color : #ddd ; position:relative ; 
    .film #wysiwyg .label  display : inline ; font-weight : bold ; 
    .film #wysiwyg .block .label  display : block ; 
    

    Donc oui +1 pour la proposition faite dans ce ticket :)