
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (91)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe 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" ; -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (8162)
-
FFMPEG HLS streaming and transcoding on the fly to HTML player - video duration changes while transcoding
20 août 2019, par Thomas ThoI am trying to make a video streaming server and watch videos directly from web browser. The idea is to make the server to stream video from remote server, transcode with different audio format in local server, and then instantly stream to the client (this is specific way I need it to function).
This is the FFMPEG code im currently using :ffmpeg -i "url" -c:v copy -c:a aac -ac 2 -f hls -hls_time 60 -hls_playlist_type event -hls_flags independent_segments out.m3u8
The HLS stream is attached to the HTML player with hls.js and it works. However, the video duration is constantly changing while video is being transcoded. I have tried to change video duration with JS like
$('video').duration = 120;
with no luck.How do i make the player to display the video file duration instead of stream current transcoded time ?
I am also planning to implement video seeking but i am clueless. The current idea is to send seeking time to the server, terminate ffmpeg, and start from specific time. However, i think the player might get stuck on loading and will not start playing without reloading.
-
Building A livestreaming server like youtube from scratch
9 décembre 2022, par Dipo AhmedI am trying to build a live streaming server like youtube where I can watch the video live or if I want to I can play the video from any duration I want.


What I have tried so far.
I have built a node js WebSocket server where I push the video blob that I receive from the browser via MediaRecorder API every 2 seconds. This blob is then getting converted to hls by a ffmpeg process which generates 2 seconds
*.ts
files and a.m3u8
file which I am playing with video.js in browser.

This is my ffmpeg command


spawn('ffmpeg', [
 '-i', '-',
 // '-re',
 '-fflags', '+igndts',

 '-vcodec', 'h264',
 '-acodec', 'aac',

 '-preset', 'slow',
 '-crf', '22',
 // You can also use QP value to adjust output stream quality, e.g.: 
 // '-qp', '0',
 // You can also specify output target bitrate directly, e.g.:
 '-b:v', '1500K',
 '-b:a', '128K', // Audio bitrate

 '-f', 'hls',
 '-hls_time', '1',
 // '-hls_playlist_type', 'vod',
 '-hls_list_size', '2',
 '-hls_flags', 'independent_segments',
 '-hls_segment_type', 'mpegts',
 '-hls_segment_filename', `${path}/stream%02d.ts`, `${path}/stream.m3u8`,
 ]);



The problem is that the video js player duration is not updating like in youtube where the video duration increases every second.


Any direction will be appreciated. Please tell me if my approach is wrong and what needs to be learned for me to build this system.


-
FileNotFoundError running ffmpeg on Windows from Python subprocess
4 avril 2023, par mahmoudamintahathis is my code to convert mkv to mp4
i created both assets and results folders
i added ffmpeg to user and enviroment variables path


import os
import subprocess

if not os.path.exists("assets"):
 raise Exception("Please create and put all MKV files in assets folder. ")

mkv_list = os.listdir("assets")

if not os.path.exists("results"):
 os.mkdir("results")

for mkv in mkv_list:
 name, ext = os.path.splitext(mkv)
 if ext != ".mkv":
 raise Exception("Please add MKV files only!")

 output_name = name + ".mp4"

 try:
 subprocess.run(
 ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
 )

 except:
 raise Exception(
 "Please, download, install and Add the path FFMPEG to Enviroment variables ")

print(f"{len(mkv_list)} video/s have ben converted")
os.startfile("results")



i get this error messages when i run it


---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[1], line 20
 19 try:
---> 20 subprocess.run(
 21 ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
 22 )
 24 except:

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:546, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
 544 kwargs['stderr'] = PIPE
--> 546 with Popen(*popenargs, **kwargs) as process:
 547 try:

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:1022, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize, process_group)
 1019 self.stderr = io.TextIOWrapper(self.stderr,
 1020 encoding=encoding, errors=errors)
-> 1022 self._execute_child(args, executable, preexec_fn, close_fds,
 1023 pass_fds, cwd, env,
 1024 startupinfo, creationflags, shell,
 1025 p2cread, p2cwrite,
 1026 c2pread, c2pwrite,
 1027 errread, errwrite,
 1028 restore_signals,
 1029 gid, gids, uid, umask,
 1030 start_new_session, process_group)
 1031 except:
 1032 # Cleanup if the child failed starting.

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:1491, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)
 1490 try:
-> 1491 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
 1492 # no special security
 1493 None, None,
 1494 int(not close_fds),
 1495 creationflags,
 1496 env,
 1497 cwd,
 1498 startupinfo)
 1499 finally:
 1500 # Child is launched. Close the parent's copy of those pipe
 1501 # handles that only the child should have open. You need
 (...)
 1504 # pipe will not close when the child process exits and the
 1505 # ReadFile will hang.

FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Exception Traceback (most recent call last)
Cell In[1], line 25
 20 subprocess.run(
 21 ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
 22 )
 24 except:
---> 25 raise Exception(
 26 "Please, download, install and Add the path FFMPEG to Enviroment variables ")
 28 print(f"{len(mkv_list)} video/s have ben converted")
 29 os.startfile("results")

Exception: Please, download, install and Add the path FFMPEG to Enviroment variables 



I checked adding ffmpeg to environment variable and it's added
I used jupyter to know the specific line the doesn't work and it's the subprocess line