
Recherche avancée
Autres articles (53)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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" ;
Sur d’autres sites (5759)
-
Trying to fetch all audio streams with FFmpeg Python
27 juillet 2022, par ApolloI'm using ffmpeg-python to fetch streams from a video and write some parameters (codec_name, resolution, etc.) for each stream into csv.


video = 'test.mkv'
probe = ffmpeg.probe(video)
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
print(video_stream['codec_long_name'])
audio_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'audio'), None)
...



My problem is that it works well for a video stream, but not for multiple audio (or subtitles) streams. If the video has several audio streams it returns only one audio stream.


I've tried another approach, but it returns some streams 2-3 times and I get duplicates. So if the video sample has 4 audio tracks, I end up with 9 audio streams instread of 4.


audio_streams = []
for audio in (probe['streams']):
 if (audio['codec_type'] == 'audio'):
 audio_streams.append(audio)
 pprint(audio_streams)



All other ideas I tried don't work, I'm new to programming and I'm stuck with it.
How can I get all audio streams from a file without duplicates ?


-
How do I get the last line of a popen() callback in every iteration ?
29 mai 2017, par MikeI’m trying to create a progress bar with FFMPEG using php and AJAX. When a user uploads a video file I want to be able to display the current percent until completion. I have managed to get everything working but I have one issue.
The data returns what I want, but it also returns all the data from the previous iterations... like it just keeps stacking everything on top rather than flushing out the data from previous iterations. I tried to work with
tail
thinking it would return only the last line, but it did not return anything.Here is the code I’m working with :
encode.php
$video_path = 'test.mp4';
$cmd = 'ffmpeg -i ' . $video_path .' -y -hide_banner output.mp4 2>&1';
while (@ ob_end_flush());
$proc = popen($cmd, 'r');
while (!feof($proc))
{
$file = escapeshellarg(fread($proc, 4096));
//$line = `tail -n 1 $file`; // <-tried this with no luck
echo fread($file, 4096) . "\n";
@ flush();
}
return 'complete';
pclose($proc);The above code returns :
// first iteration
frame= 52 fps= 13 q=29.0 size= 279kB time=00:00:00.10 bitrate=22856.9kbits/s
// second iteration
frame= 52 fps= 13 q=29.0 size= 279kB time=00:00:00.10 bitrate=22856.9kbits/s
frame= 54 fps= 12 q=29.0 size= 329kB time=00:00:00.16 bitrate=16146.6kbits/s
// third iteration
frame= 52 fps= 13 q=29.0 size= 279kB time=00:00:00.10 bitrate=22856.9kbits/s
frame= 54 fps= 12 q=29.0 size= 329kB time=00:00:00.16 bitrate=16146.6kbits/s
frame= 57 fps= 11 q=29.0 size= 464kB time=00:00:00.26 bitrate=14233.2kbits/sAs you can see the data stacks, I need only the new line of data, not the data stacking.
** EDIT ** this has been marked as a duplicate, rather than me explain how it’s different, I’d like to hear how this is the same thing ? I am not writing to a log file and, like most people, do not feel that’s a good solution.
-
Failed to start broadcast : kurento.MediaPipeline not found (Code:40101, Type:null, Data : {"type" :"MEDIA_OBJECT_NOT_FOUND"})
30 avril 2020, par Arslan MaqboolI am facing this issue when I opened any conference room or any meeting then the camera or microphone or sharedscreen is opened from just 1 or 2 seconds and then
 gone and error message popup in the image below which is attached and in text



I am using open-meeting version 5.0.0-M3 WebRTC



> Failed to start broadcast: Object
> '4f09d0d4-f52f-4731-9e54-124e2da0ca9a_kurento.MediaPipeline' not found
> (Code:40101, Type:null, Data: {"type":"MEDIA_OBJECT_NOT_FOUND"})