
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (14998)
-
Play video using HTML5 video tag
21 janvier 2014, par user3217695Hi i need to display video in all the browsers using html5.
I am uploading the file and creating html structure and it plays only mp4 format video, but not other uploaded formats, and i use command line to convert files but the converted files doesn't play in video tag.
For conversion I use
ffmpeg
video conversion from one towebm
format. Conversion works, but viedos don't play.Please find me
ffmpeg
code, which converts all videos towebm
, so i can play the converted video using html5. -
How to play video file with audio with DearPyGUI (Python) ?
1er mars 2023, par Vi TietI'm using DearPyGUI to make a simple media player that can play video file (mp4, etc.) together with it's audio. The pre-requisite is that DearPyGUI is a must, however video feature will not exist until v2.0, which is still far in the future.


Currently, I can only render the frames using OpenCV library for Python, however, the problem is how can I play the audio as well as play it in sync with the output video frames ?


For context, I'm quite new to Python, and I don't know much about video and audio streaming, but I've thought of some approaches to this problem by looking through help posts online (However, I still have no idea how I can implement any of these seamlessly) :


- 

-
OpenCV for video frames, and audio ??? some libraries like ffmpeg-python or miniaudio to play sound... (How...?)


-
Extract video frames and audio here and then use the raw data to play it (How...?)


-
This example here is pretty close to what I want excluding the playing video and audio part, but I have no idea where to go from there. The video stream and the audio stream are instances of ffmpeg.nodes.FilterableStream, and they appear to hold addresses to somewhere. (No idea...)


-
Another very close idea is using ffpyplayer I was able to get the video frame. However, the below code yields a blueish purple color tint to the video, and the frame rate is very slow compared to original (So close...)












import time
import numpy as np
import cv2 as cv
from ffpyplayer.player import MediaPlayer


# https://github.com/Kazuhito00/Image-Processing-Node-Editor/blob/main/node_editor/util.py 
def cv2dpg(frame): 

 data = cv.resize(frame, (VIDEO_WIDTH, VIDEO_HEIGHT))
 data = np.flip(frame, 2)
 data = data.ravel()
 data = np.asfarray(data, dtype=np.float32)

 return np.true_divide(data, 255.0)


# https://stackoverflow.com/questions/59611075/how-would-i-go-about-playing-a-video-stream-with-ffpyplayer
# https://matham.github.io/ffpyplayer/examples.html#examples
def play_video(loaded_file_path):

 global player, is_playing
 player = MediaPlayer(loaded_file_path)

 while is_playing:

 frame, val = player.get_frame()

 if val == 'eof':
 is_playing = False
 break

 elif not frame:
 time.sleep(0.01)

 elif val != 'eof' and frame is not None:
 img, t = frame
 w = img.get_size()[0]
 h = img.get_size()[1]
 cv_mat = np.uint8(np.asarray(list(img.to_bytearray()[0])).reshape((h, w, 3)))
 texture_data = cv2dpg(cv_mat)
 dpg.set_value(VIDEO_CANVAS_TAG, texture_data)

 dpg.set_value(VIDEO_CANVAS_TAG, DEFAULT_VIDEO_TEXTURE)



I still need to do more research, but any pointer to somewhere good to start off (either handling raw data or using different libraries) would be greatly appreciated !


EDIT :
For more context, I'm using raw texture like this example of DearPyGUI official documentation to render the video frames that were extracted in the while loop.


-
-
FFMPEG libx264 mp4 file does not play in firefox Windows
2 mai 2020, par BehelSome of my ffmpeg converted videos in mp4 format, using libx264 encoder, aren't playable with Firefox browser on Windows.



Here is my ffmpeg command : 

ffmpeg -i file_tmp.mp4 -c:v libx264 -profile:v baseline -level 3.0 -crf 15 -preset slow -pix_fmt yuv420p -c:a aac -movflags faststart -strict -2 -vf scale=1024:576 file.mp4



The video can be played with every browsers on Mac, and works well with Webkit based browers on Windows.



The problem not occur with every video converted, only a few, like this one for instance : https://attentionphilippelepara.pet/testcard/m6-29_04_2020-mire.mp4



Here is what I see when i try to play this media, on Firefow Windows then on Chrome Windows.






I really don't see where is the problem. Can someone could help me ?