Recherche avancée

Médias (91)

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

Sur d’autres sites (12321)

  • OpenCV is able to read the stream but VLC not

    25 avril 2023, par Ahmet Çavdar

    I'm trying to stream my webcam frames to an UDP address. Here is my sender code.

    


    cmd = ['ffmpeg', '-y', '-f', 'rawvideo', '-pixel_format', 'bgr24', '-video_size', f'{width}x{height}', 
       '-i', '-', '-c:v', 'mpeg4','-preset', 'ultrafast', '-tune', 'zerolatency','-b:v', '1.5M',
       '-f', 'mpegts', f'udp://@{ip_address}:{port}']
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
camera = cv2.VideoCapture(0)
while True:
    ret, frame = camera.read()
    cv2.imshow("Sender",frame)
    if not ret:
        break
    p.stdin.write(frame.tobytes())
    p.stdin.flush()
    if cv2.waitKey(1) & 0xFF == ord('q'):
            break


    


    This Python code can make stream successfully. I can read the stream with this receiver code.

    


    q = queue.Queue()
def receive():
    cap = cv2.VideoCapture('udp://@xxx.x.xxx.xxx:5000')
    ret, frame = cap.read()
    q.put(frame)
    while ret:
        ret, frame = cap.read()
        q.put(frame)
def display():
    while True:
        if q.empty() != True:
            frame = q.get()
            cv2.imshow('Receiver', frame)
        k = cv2.waitKey(1) & 0xff
        if k == 27:  # press 'ESC' to quit
            break
tr = threading.Thread(target=receive, daemon=True)
td = threading.Thread(target=display)
tr.start()
td.start()
td.join()


    


    But I can not watch the stream from VLC. I'm going to Media->Open Network Stream->
udp ://@xxx.x.xxx.xxx:5000 to watch stream. After some seconds, the timer that located bottom left of VLC starts to increase but there are no frames in screen, just VLC icon.

    


    I checked firewall rules, opened all ports to UDP connections. I am using my IP address to send frames and watch them.
Also, I tried other video codecs like h264, hvec, mpeg4, rawvideo.
Additionally, I tried to watch stream by using Windows Media Player but it didn't work.

    


    What should I do to fix this issue ?

    


  • lavfi : add a new struct for private link properties

    5 août 2024, par Anton Khirnov
    lavfi : add a new struct for private link properties
    

    Specifically those that should be visible to filters, but hidden from
    API callers. Such properties are currently located at the end of the
    public AVFilterLink struct, demarcated by a comment marking them as
    private. However it is generally better to hide them explicitly, using
    the same pattern already employed in avformat or avcodec.

    The new struct is currently trivial, but will become more useful in
    following commits.

    • [DH] libavfilter/avfilter.c
    • [DH] libavfilter/avfilter_internal.h
    • [DH] libavfilter/avfiltergraph.c
    • [DH] libavfilter/filters.h
  • Python script doesn't work properly when ran through terminal, but works fine in Jupyter and Visual Studio

    21 octobre 2018, par Ivan Novikov

    I have a script to extract the audio from all video files in a folder.

    The folder with videos is located at : /Users/MyName/Downloads/Video_Audio_files

    When I try to run it through terminal and I’m prompted for the folder path folder = input("Path to folder:"), I drag and drop it there (which is how I got the above path), but the script doesn’t seem to be working (stuck at 0 out of 7 and no output files).

    When I input exactly the same path when prompted in Jupyter Notebook or in Visual Studio it works perfectly !

    Edit : I think I have found the issue, when I drag and drop the folder, there is an extra space (’Downloads/folder ’ instead of ’Downloads/folder’).

    pbar = ProgressBar()
    files = []
    extensions = []
    folder = input("Path to folder:")
    #folder = 'Video_Audio_files'
    pathlist = Path(folder).glob('**/*.mp4')
    for path in pathlist:
       path_in_str = str(path)
       name = path_in_str.split("/")[1]
       files.append(path_in_str.split(".")[0])
       extensions.append(path_in_str.split(".")[1])

    os.system('cd ' + folder)

    for i in pbar(range(len(files))):
       video_format = extensions[i]
       video_name = files[i]
       output_format = 'flac'
       output_name = video_name + '_audio'

       bashCommand = 'ffmpeg -i ' + video_name + '.'   + video_format + ' -f ' + output_format + ' -ab 192000 -vn ' + output_name + '.' + output_format
    #should be of this format: bashCommand = 'ffmpeg -i Video.mp4 -f flac -ab 192000 -vn ExtractedAudio.flac'

       os.system(bashCommand)