
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (73)
-
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 -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (7463)
-
Send 2 different feeds to ffserver from ffmpeg
30 avril 2015, par Niklas Tampier HolmgrenI’m currently working in a project where I have to stream 2 webcams streams from a computer to another through a TCP connection, I can stream 1 without problem :
using
ffserver.conf :
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxClients 40
MaxBandwidth 30000
CustomLog -
NoDaemon
<stream>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</stream>
#feed for camera 1
<feed>
File /tmp/webcam1.ffm
FileMaxSize 100M
</feed>
#feed for camera 2
<feed>
File /tmp/webcam2.ffm
FileMaxSize 100M
</feed>
#stream for feed 1
<stream>
Feed webcam1.ffm
Format mjpeg
VideoSize 1280x720
VideoFrameRate 30
Preroll 0
NoAudio
Strict -1
</stream>
#stream for feed2
<stream>
Feed webcam2.ffm
Format mjpeg
VideoSize 1280x720
VideoFrameRate 30
Preroll 0
NoAudio
Strict -1
</stream>command to run ffserver :
ffserver /etc/ffserver.conf
command to feed ffserver :
ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video0 http://localhost/webcam1.ffm
and it works perfect, but when I try to run the other feed :
ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video1 http://localhost/webcam2.ffm
I can see just the second stream and the first one do not work anymore.
some idea ? -
FFMPEG make adjustment on first frame
30 avril 2022, par iDeveloperI am using FFMPEG library to convert images to video file in my software program.


Here frameRate is
1
or5
. So, I need a dynamic image based on time for first 5 seconds. So, in the images folder if there is more than 10 images then I set frameRate as5
for else frame rate is1


Algorithm :


let startNumber: Int
let blackFrame = self.sourceURL.appendingPathComponent("TIME_STAMP.jpg", isDirectory: false)
 
 if FileManager.default.fileExists(atPath: blackFrame.path){
 
 let data = try! Data(contentsOf: blackFrame)
 
 try? FileManager.default.removeItem(at: blackFrame)

 if frameRate == "1"{
 
 startNumber = 20
 
 for i in 20...24{
 
 let url = sourceURL.appendingPathComponent("img\(i).jpg", isDirectory: false)
 try? data.write(to: url)
 }
 
 }else{
 
 startNumber = 0
 for i in 0...24{
 
 let url = sourceURL.appendingPathComponent("img\(i).jpg", isDirectory: false)
 try? data.write(to: url)
 }
 }
 
 }else{
 
 startNumber = 25
 }
 
 let arguments: [String] = [
 "-y",
 "-framerate", frameRate,
 "-start_number", "\(startNumber)",
 "-i", "\(sourceURL.path)/img%0d.jpg",
 "-c:v", "libx264",
 "-crf", "28",
 outputURL.path
 ]



This is how I am constructing the arguments. It's working perfect on fast systems. but for slow systems the creation of custom time image takes time than the FFMPEG execution. So, the output video file is mixed of various frames instead of 1....N ;


So, I don't want to create the 5 or 25 images each time. Instead can am I able to set frame rate for first image only ? or is there any alternative ?


Thank you !


-
How can I automate the subtitle adding process in FFMPEG ?
23 septembre 2022, par PhoeniqzThe situation is, that I have 10 MP4 videos and a folder for each of them that has the same name as its video. In each of folders there are around 30 SRT files I need to add. I would like to automate this. I mean a script that would add each SRT file to the video and add the correct handler for the subtitles, so that the subtitle would appear as "English" instead of "Subtitle #12" in a movie player. I made a python script ; it's far from perfect and it does not add the handlers correctly.


The name of each SRT file is something like "20_Hebrew.srt"





import os
file_dir = r"Path/to/my/files"
sub_dir = file_dir + "/Subs"


def add_sub(file, file_name):
 cmd = f"ffmpeg -i '{file}' "
 sub_list = []

 no_extension = file_name.replace(".mp4", "")

 for sub_name in os.listdir(sub_dir + f"/{no_extension}"):
 s = os.path.join(sub_dir + f"/{no_extension}", sub_name)

 if os.path.isfile(s):
 cmd += f"-i '{s}' "
 sub_list.append(s)
 
 cmd += "-map 0:v -map 0:a "

 for i, v in enumerate(sub_list):
 cmd += f"-map {i+1} "
 
 cmd += "-c:v copy -c:a copy "

 for i, v in enumerate(sub_list):
 sub_lang = v.replace(".srt", "")
 index = sub_lang.index(f"/Subs/")
 sub_lang = sub_lang[index:]
 index = sub_lang.index("_")
 sub_lang = sub_lang[index+1:]

 cmd += f"-c:s:{i} mov_text -metadata:s:s:{i} language='{sub_lang}' -metadata:s:s:{i} handler='{sub_lang}' "

 cmd += f"'{file}_OUTP.mp4'"

 os.system(cmd)

for file_name in os.listdir(file_dir):
 f = os.path.join(file_dir, file_name)

 if os.path.isfile(f):
 add_sub(f, file_name)