
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (46)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP 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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5292)
-
How to determine if a ffmpeg subprocess has fallen
9 avril 2020, par TiHanI have an issue



I want to create a new ffmpeg process using subprocess.popen
find out his pid
and in the body of a python program to see if the process is alive or not



args = shlex.split ('ffmpeg -i rtsp: //192.168.1.68: 8554 / mystream -f segment -strftime 1 -segment_time 5 13_REG1_CHANNEL3_% Y-% m-% d_% H-% M-% S-% s .mp3 ')
print (args)
proc = subprocess.Popen (args, stdout = subprocess.PIPE)
ch_pid = proc.pid
print (proc.pid)
proc.wait ()
print (proc.communicate ())
while (1):
 if (os.system (str ('kill -0 {PID}'). format (PID = ch_pid)) == 0):
 print ('proc is alive')
 else:
 break




at while loop i tried to check this process pid via kill -0 pid
this command will return zero if everything is alright and process is running



BUT



IF ffmpeg will fall
there will be no changes



kill -0 pid will continue to returning zero code that everything is good



What should i do ?


-
How do you determine the end of the file in a stream containing multiple streams ? (nodejs)
26 décembre 2019, par DanielkentI would like to split an audio file into multiple segments using ffmpeg in an AWS Lambda (NodeJS) function.
Due to the limitations of (and to optimise for) the lambda environment I would like to stream the audio into ffmpeg, perform the split on the audio file in the stream and then stream the now multiple smaller files out to s3.
After doing some research I have found the AWS S3 SDK doesn’t support multiple file uploads in one stream. I could resolve this by finding the end of each new segment (file in the output stream) and creating a separate upload to s3.
Is there a way to determine the end of a file in a stream (containing multiple files) ?
(without saving it to the file system or loading it to memory).
I have searched around and I can’t seem to find an answer.
-
Google Speech API - Is there a way to determine if the audio has human voice or not ?
20 décembre 2019, par stupid_smaI am making an audio filtering application at work that reads over hundreds of audio files and filters them. So, if the audio has human voice in it, it will accept it and if it does not- it will delete the audio file.
I am using ffmpeg to get the details of the audio and add other filters like size and duration and silence (though it is not very accurate in detecting silence for all audio files.)
My company asked me to try the Google Cloud Speech API to detect if the audio has any human voice in it.
So with this code, some audio files return a Transcript of spoken words in the audio file, but what I need is to determine if a human is speaking or not.
I have considered using hark.js for it but there does not seem to be enough documentation and I am short on time !
Ps. I am an intern and I’m just starting out with programming. I apologize if my question does not make sense or sounds dumb.
# Includes the autoloader for libraries installed with composer
require __DIR__ . '/vendor/autoload.php';
# Imports the Google Cloud client library
use Google\Cloud\Speech\V1\SpeechClient;
use Google\Cloud\Speech\V1\RecognitionAudio;
use Google\Cloud\Speech\V1\RecognitionConfig;
use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding;
putenv('GOOGLE_APPLICATION_CREDENTIALS=../../credentials.json');
echo getcwd() . "<br />";
chdir('test-sounds');
echo getcwd() . "<br />";
echo shell_exec('ls -lr');
$fileList = glob('*');
foreach($fileList as $filename){
//echo $filename, '<br />';
# The name of the audio file to transcribe
$audioFile = __DIR__ . '/' . $filename;
# get contents of a file into a string
$content = file_get_contents($audioFile);
# set string as audio content
$audio = (new RecognitionAudio())
->setContent($content);
# The audio file's encoding, sample rate and language
$config = new RecognitionConfig([
'encoding' => AudioEncoding::LINEAR16,
'language_code' => 'ja-JP'
]);
# Instantiates a client
$client = new SpeechClient();
# Detects speech in the audio file
$response = $client->recognize($config, $audio);
# Print most likely transcription
foreach ($response->getResults() as $result) {
$alternatives = $result->getAlternatives();
$mostLikely = $alternatives[0];
$transcript = $mostLikely->getTranscript();
printf('<br />Transcript: %s' . PHP_EOL, $transcript . '<br />');
}
$client->close();
}
?> ```