
Recherche avancée
Autres articles (60)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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 (5663)
-
Ffmpeg libx264rgb and libx264 yuv444p gives very different results
1er février 2020, par Mustafa Akın YılmazI am trying to create a lossy compressed video from several .png files. I am using the following ffmpeg commdans :



ffmpeg -i %8d.png -frames:v 4 -c:v libx264rgb -pix_fmt rgb24 -g 4 -qp 30 -r 25 out.mp4




and



ffmpeg -i %8d.png -frames:v 4 -c:v libx264 -pix_fmt yuv444p -g 4 -qp 30 -r 25 out.mp4




Then I am extracting frames from the videos with the command :



ffmpeg -i out.mp4 -r 25 %8d.png




When I compare the bitrate and PSNR, I found that the yuv444p gives about 2 db gain at the same bitrate. Why such a huge difference is observed even I did set yuv444p which does not apply chroma subsampling ?


-
Find videos with specific codec in a directory and move them to another directory [closed]
31 janvier 2020, par sergeantSaltyiam trying to find all videos in a directory that have the h264 codec and then move them to another directory.
The problem iam facing is not to move them but to find the videos.Here is what I have so far.
> @echo off
set "ffprobe=C:\ffmpeg\bin\ffprobe.exe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1"
FOR /R %%f IN (*.mkv) DO (
%ffprobe% "%%f"
)
PAUSE()When I run this, I see the codecs in cmd correctly. But when I try to compare the codec and then move them it wont do anything.
Some pseudocode
if outputOfFFprobe == "h264" then move
How can I compare the output from ffprobe.exe to the string "h264" and if it matches then move the file to another directory.
Iam grateful for any suggestions !
-
How do I encode iOS videos as .mp4 from UIImagePickerController so that Android devices can play them ?
22 septembre 2022, par Iain ColemanI am using UIImagePickerController to record short (<30s) videos which are then saved and uploaded via our API. The app is cross-platform and so I need recorded videos to be encoded into mp4 format so that Android devices can play them.



I used instructions from the following questions to create my solution :



Swift - How to record video in MP4 format with UIImagePickerController ?



AVFoundation record video in MP4 format



https://forums.developer.apple.com/thread/94762



I record my video through the UIImagePickerController like so :



func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
 // Local variable inserted by Swift 4.2 migrator.
 let info = convertFromUIImagePickerControllerInfoKeyDictionary(info)


 let videoNSURL = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.mediaURL)] as? NSURL

 videoURL = videoNSURL!.absoluteURL
 if let videoURL = videoURL {
 let avAsset = AVURLAsset(url: videoURL, options: nil)

 avAsset.exportVideo { (exportedURL) in
 if let uploadVC = self.uploadVC {
 uploadVC.incomingFileURL = exportedURL
 uploadVC.myJewelleryID = self.myJewelleryID
 uploadVC.topicID = self.topicID
 }
 DispatchQueue.main.async { [weak self] in
 //Update UI with results from previous closure
 self?.dismiss(animated: true, completion: nil)
 self?.showUploadContainer()
 self?.updateVideoContainerWithURL(url: exportedURL)
 }
 }
 }
}




This then passes the exported MP4 url to the upload container view, where it saves the file to the device :



private func saveVideoFileToDevice() {

 //Filename Struct = [AssetID]_[TopicID]_[CustomerID]_[Datestamp]
 let date = Date()
 let formater = DateFormatter()
 formater.locale = Locale(identifier: "en_US_POSIX")
 formater.dateFormat = "YYYY-MM-dd-HH-mm-ss"

 uploadFileName = ""
 if let mjID = myJewelleryID {
 uploadFileName = "ASID_\(mjID)_\(User.instance.customerID)_\(formater.string(from: date)).mp4"
 } else if let tID = topicID {
 uploadFileName = "ASID_\(tID)_\(User.instance.customerID)_\(formater.string(from: date)).mp4"
 }

 let fileManager = FileManager.default

 if let destURL = URL(string: "file://\(NSHomeDirectory())/Documents/\(uploadFileName!)") {

 var fileData: Data!
 print("destURL = \(destURL)")
 do {
 try fileManager.copyItem(at: incomingFileURL! as URL, to: destURL)
 fileData = try Data(contentsOf: incomingFileURL! as URL)

 try fileData.write(to: destURL)


 }
 catch {
 print("DEBUG: Failed to save video data")
 }
 }
}




and then uploads the file to our API. Although the file is MP4, it does not play on Android. On inspection, the file looks very similar to a file that will actually play on an Android device when we compare the codec data :






Does anyone have any ideas on how I can fix this ?



Thanks !