
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (73)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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.
Sur d’autres sites (12124)
-
What different video split ffmpeg VS opencv ?
2 mai 2021, par 김지태I used opencv and ffmpeg to do the work of framing the video.


opencv


import cv2

# 영상의 의미지를 연속적으로 캡쳐할 수 있게 하는 class
vidcap = cv2.VideoCapture("D:/godzillakingofmonster/GodzillaKingOfMonsters_clip.mkv")

count = 0

while(vidcap.isOpened()):
 # read()는 grab()와 retrieve() 두 함수를 한 함수로 불러옴
 # 두 함수를 동시에 불러오는 이유는 프레임이 존재하지 않을 때
 # grab() 함수를 이용하여 return false 혹은 NULL 값을 넘겨 주기 때문
 ret, image = vidcap.read()

 # 캡쳐된 이미지를 저장하는 함수 
 print("D:/godzillakingofmonster/frame/frame%d.jpg" % count)
 cv2.imwrite("D:/godzillakingofmonster/frame/frame%d.jpg" % count, image)

 print('Saved frame%d.jpg' % count)
 count += 1

vidcap.release()



ffmpeg


ffmpeg -i \"{target_video}\" \"{save_folder_path}/{media_name}_%08d.{exp}\"



I am wondering which of the two methods will give you more accurate results.


When a frame is divided, another frame is saved. Why are there different results ?


Which method, ffmpeg or opencv, is more accurate and prints the results closer to the original ?


-
Piping multiple inputs to FFMPEG through Python
14 avril 2021, par D. RamsookHow do you pipe multiple byte files to ffmpeg through Python ?
I have two files (fileA, fileB) that are different inputs to some ffmpeg command.


from subprocess import run, PIPE

with open('fileA.yuv', 'rb') as f:
 fileA = f.read()

with open('fileB.yuv', 'rb') as f:
 fileB = f.read() 

input_string = """ffmpeg -f rawvideo -s:v 50x50 -pix_fmt yuv420p -r 24 -i pipe: -f rawvideo -s:v 50x50 -pix_fmt yuv420p -r 24 -i pipe: ###REMAINDER OF COMMAND """

result = run(input_string, stdout=PIPE, stderr=PIPE, input=???) #What to put as input here?
result = result.stderr.splitlines() #Returns result of command



-
Using ffmpeg to chunk a long audio file
3 novembre 2020, par Boris AdaevI have the following code here to split a long audio file (15 hours long) into shorter chunks (each a little over an hour long, except the last 16th one, which is whatever remains).


import subprocess
import os, math

def get_length(input_video):
 result = subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration',
 '-of', 'default=noprint_wrappers=1:nokey=1', input_video],
 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 return float(result.stdout)

def chunk(fname, title, split_by=3600):
 head_dir = title + ' (split)'
 if head_dir not in os.listdir():
 os.mkdir(head_dir)

 dur_seconds = get_length(fname)
 iters = math.ceil(dur_seconds / split_by)

 left_off = 0

 print(dur_seconds)

 for i in range(1, iters+1):
 last_iter = i == iters
 if not last_iter:
 go_till = left_off + 3630
 else:
 go_till = int(dur_seconds)

 print(f'from {left_off} to {go_till} for {i:02d}.mp3')
 subprocess.call(['ffmpeg', '-i', fname, '-ss', str(left_off), '-to', str(go_till),
 '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])
 left_off += 3600

fname = 'Brian C. Muraresku - The Immortality Key The Secret History of the Religion with No Name.mp3'
title = 'The Immortality Key'

chunk(fname, title)



The code makes perfect sense, and when I run it with the
subprocess.call
line commented out, what it prints also makes sense.

54681.353625
from 0 to 3630 for 01.mp3
from 3600 to 7230 for 02.mp3
from 7200 to 10830 for 03.mp3
from 10800 to 14430 for 04.mp3
from 14400 to 18030 for 05.mp3
from 18000 to 21630 for 06.mp3
from 21600 to 25230 for 07.mp3
from 25200 to 28830 for 08.mp3
from 28800 to 32430 for 09.mp3
from 32400 to 36030 for 10.mp3
from 36000 to 39630 for 11.mp3
from 39600 to 43230 for 12.mp3
from 43200 to 46830 for 13.mp3
from 46800 to 50430 for 14.mp3
from 50400 to 54030 for 15.mp3
from 54000 to 54681 for 16.mp3



But with the
subprocess.call
line, it creates these audios (01.mp3, 02.mp3, 03.mp3, etc.), but the timestamps are wrong. When the code is done running, they all start from the same place for some odd reason.

UPDATE : I also tried placing the
-i
part after the-ss
part, as well as the following

subprocess.call(['ffmpeg', '-ss', str(left_off), '-i', fname, '-t', '3630',
 '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])



But still the same problem. 15 identical audios, of which only the 15th is the way it's supposed to be, and then the last 16th ten minute remainder. When I run them separately, it goes as follows :


01.mp3 is right,


02.mp3 is right but 01.mp3 is now wrong, because it's identical to 02.mp3


03.mp3 is right, but the previous two are identical to it


04.mp3 is right, but the previous three are identical to it


... and so on