
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (55)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
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 (6598)
-
What is the best ffmpeg command keeping the best quality to convert a m3u8 file into a mp4 file ?
16 novembre 2019, par NicrycOk so I downloaded a .m3u8 file on the Internet. I saw that this file extension corresponds to a HTTP Live Streaming protocol also called HLS. This protocol consists of an index file (the m3u8 file) that is a text file containing several URL redirecting to .ts files. Those .ts files are video files where each one are a little part of the whole video. Then I searched and found on Wikipedia and on the Apple website that this protocol embeds the MPEG-4 (H.264) video format.
If I’m not mistaken .mp4 is the file extension of the MPEG-4 (H.264) video format. So a mp4 file is always a MPEG-4 (H.264) video. I use ffmpeg to convert this .m3u8 file into a "normal" video file. Currently I use this command :
ffmpeg -protocol_whitelist "file,http,https,tcp,tls" -i input.m3u8 output.mp4
Although even if the video quality is almost perfect it’s a little below the quality of the original m3u8 file. I know I’m really pernickety but is there a better command to keep the original quality ? Or does the ffmpeg convertion command involve inevitably a quality loss ?
-
FFmpeg with node.js. Transcode a file to another format
19 juin 2014, par user2757842Have a bit of a problem with this, I have an .avi file in which I would like to transcode into a .flv file using FFmpeg, here is what I have so far :
var ffmpeg = require('fluent-ffmpeg');
//make sure you set the correct path to your video file
var proc = new ffmpeg({ source: 'C:/Users/Jay/Documents/movie/drop.avi', nolog: true })
//Set the path to where FFmpeg is installed
.setFfmpegPath("C:\Users\Jay\Documents\FFMPEG")
//set the size
.withSize('50%')
// set fps
.withFps(24)
// set output format to force
.toFormat('flv')
// setup event handlers
.on('end', function() {
console.log('file has been converted successfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// save to file <-- the new file I want -->
.saveToFile('C:/Users/Jay/Documents/movie/drop.flv');It seems straightforward enough and I can do it through the FFmpeg command line, but I am trying to get it working within a node.js app, here is the error it is returning :
C:\Users\Jay\workspace\FFMPEGtest\test.js:17
.withSize('50%')
^
TypeError: Cannot call method 'withSize' of undefined
at Object.<anonymous> (C:\Users\Jay\workspace\FFMPEGtest\test.js:17:2)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
</anonymous>It throws the same error for each built in FFmpeg function (.toFormat, .withFPS etc)
If anyone has a solution to this, I’d greatly appreciate it
-
FFMPEG command from Python 3.5 does not actually create audio file
20 décembre 2017, par Nathan BlaineI have a Django web application that accepts user uploaded videos/audio and saves them into a folder ’../WebAppDirectory/media/recordings’.
I am then using a speech to text API to get a rough transcription of the audio. This is working fine for .wav and .mp4 files, but the web app also accepts videos (.MOV) that I would like to first convert to .wav, then pass off to the API.
Using ffmpeg from my command line like this
ffmpeg -i C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\media\recordings\upload_sample.MOV -ab 160k -ac 2 -ar 44100 -vn upload_sample.wav
Correctly creates the .wav file from the original .MOV.
However, when I run this from python with
subprocess.check_call(command, shell=True)
ffmpeg responds with
File ’upload_sample.wav’ already exists. Overwrite ? [y/N]
While Python tells me
FileNotFoundError : [Errno 2] No such file or directory : ’C :\Users\Nathan\Desktop\MeetingRecorderWebAPP\media\recordings\upload_sample.wav’
It is also worth noting that I do not see a ’upload_sample.wav’ file in the media/recordings/ directory.
This leads me to believe that maybe Python and ffmpeg are looking in different folders, but I am not sure where I am going wrong. When I print the command from the subprocess.check_call and copy/paste it into cmd, the file is created as expected.
Hoping someone with some experience with ffmpeg/Python subprocess can help shed some light ! Here are the files I am working with :
Folder Structure
DjangoWebApp
|---media
|---|---imgs
|---|---recordings
|---|---|---upload_sample.MOV
|---uploaded_audio_to_text.pyuploaded_audio_to_text.py
import speech_recognition as sr
from os import path
import os
import subprocess
def speech_to_text(file_name):
AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), 'media','recordings', file_name)
print("Looking at path: ",AUDIO_FILE)
# get extension
AUDIO_FILE_EXT = os.path.splitext(AUDIO_FILE)[1]
if(AUDIO_FILE_EXT == '.MOV'):
print("File is not .wav: ", AUDIO_FILE_EXT, "found. Converting...")
# We will use subprocess and ffmpeg to convert this .MOV file to .wav, so we can send to API
temp_wav = os.path.splitext(file_name)[0] + '.wav'
print("New audio file will be: ", temp_wav)
# build CMD ffmpeg command
command = "ffmpeg -i "
command += AUDIO_FILE
command += " -ab 160k -ac 2 -ar 44100 -vn "
command += temp_wav
print("Attempting to run this command: \n",command)
print(subprocess.check_call(command, shell=True))
print("Past Subprocess.call")
AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), 'media','recordings', temp_wav)
print("AUDIO_FILE now set to: ", AUDIO_FILE)
else:
# continue with what we are doing
pass
r = sr.Recognizer()
with sr.AudioFile(AUDIO_FILE) as source:
audio = r.record(source) # read the entire audio file
text_transcription = "Sentinel"
# recognize speech using Microsoft Bing Voice Recognition
BING_KEY = "MY_KEY_:)"
try:
text_transcription = r.recognize_bing(audio, key=BING_KEY)
except sr.UnknownValueError:
print("Microsoft Bing Voice Recognition could not understand audio")
except sr.RequestError as e:
print("Could not request results from Microsoft Bing Voice Recognition service; {0}".format(e))
return text_transcription
#my tests
my_relative_file_path = "upload_sample.MOV"
print(speech_to_text(my_relative_file_path))Console output (traceback and my print()’s)
Looking at path: C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\media\recordings\upload_sample.MOV
File is not .wav: .MOV found. Converting...
New audio file will be: upload_sample.wav Attempting to run this command:
ffmpeg -i C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\media\recordings\upload_sample.MOV -ab 160k -ac 2 -ar 44100 -vn upload_sample.wav
ffmpeg version git-2017-12-18-74f408c Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC)
----REMOVED SOME FFMPEG OUTPUT FOR BREVITY----
File 'upload_sample.wav' already exists. Overwrite ? [y/N] y
Stream mapping: Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, wav, to 'upload_sample.wav': Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
com.apple.quicktime.creationdate: 2017-12-19T16:06:10-0500
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 6
com.apple.quicktime.software: 10.3.3
ISFT : Lavf58.3.100
Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
creation_time : 2017-12-19T21:06:11.000000Z
handler_name : Core Media Data Handler
encoder : Lavc58.8.100 pcm_s16le size= 1036kB time=00:00:06.01 bitrate=1411.3kbits/s speed=N/A video:0kB audio:1036kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007352%
0
Traceback (most recent call last): Past Subprocess.call
File "C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\uploaded_audio_to_text.py", line 53, in <module>
AUDIO_FILE now set to: C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\media\recordings\upload_sample.wav
print(speech_to_text(my_relative_file_path))
File "C:\Users\Nathan\Desktop\MeetingRecorderWebAPP\uploaded_audio_to_text.py", line 36, in speech_to_text
with sr.AudioFile(AUDIO_FILE) as source:
File "C:\Users\Nathan\AppData\Local\Programs\Python\Python36-32\lib\site-packages\speech_recognition\__init__.py", line 203, in __enter__
self.audio_reader = wave.open(self.filename_or_fileobject, "rb")
File "C:\Users\Nathan\AppData\Local\Programs\Python\Python36-32\lib\wave.py", line 499, in open
return Wave_read(f)
File "C:\Users\Nathan\AppData\Local\Programs\Python\Python36-32\lib\wave.py", line 159, in __init__
f = builtins.open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Nathan\\Desktop\\MeetingRecorderWebAPP\\media\\recordings\\upload_sample.wav'
Process finished with exit code 1
</module>