
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (98)
-
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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...)
Sur d’autres sites (7775)
-
variable length of segments in HLS
12 août 2019, par shubham vashishtI am using FFmpeg to create a hls streaming manifest from a audio file.
So far i can break the audio file into several segments based on the duration. Let’s say 10. But the requirement is to break audio file in such way that first few segments are of lesser size say 4 seconds and following segments of 10 seconds long.
I am calling ffmpeg from a python script like thisresult = subprocess.Popen(['ffmpeg -y -i {} -acodec copy -f segment -segment_time {} -segment_list {}.m3u8 {}%03d.ts'.format(pathToDownloadedMediaFile, 10, mediaFileName,mediaFileName)],stdout=subprocess.PIPE,stderr=subprocess.STDOUT, shell=True)
is there any way to create first few segments of different duration than the rest ?
-
How do I timestamp an excel document using Pandas ?
16 juillet 2015, par Andy DoI have a script that uses FFMPEG and CMD to cut video files based off of an excel document row by row. I would like python to add a timestamp after it is done with a row. Can you guys please help ?
import subprocess as sp, pandas as pd
ffmpeg = 'C:/FFMPEG/bin/ffmpeg.exe' # on Windows
datafile = r'C:\Users\A_Do\Dropbox\1. Projects\2. Python\TM Creator\tm_creator_test1.xlsx'
xl = pd.ExcelFile(datafile,index = False)
df = xl.parse('Sheet1')
def create_tm():
row_iterator = df.iterrows()
# take first item from row_iterator
for i, row in row_iterator:
infile = row['filename']
outputfile = row['outputfilename']
timein = row['timein']
duration = row['duration']
decision = row['Create TM?']
if decision == "Y":
sp.call(ffmpeg + " -y -i " + infile + " -map 0:0 -map 0:1 -map 0:2 -acodec copy -ss " + str(timein) + " -codec copy -t " + str(duration) + " " + outputfile,shell=True) #this works
elif decision != decision: #this gets rid of the NaN
break
else:
print "You said you didn't want to make a TM for " + str(infile)
create_tm()Thanks !
My final code :
import subprocess as sp, pandas as pd
# (1) new import
from openpyxl import load_workbook
# (2) new import
from datetime import datetime
ffmpeg = 'D:/FFMPEG/bin/ffmpeg.exe' # on Windows
datafile = r'D:\Dropbox\1. Projects\2. Python\TM Creator\tm_creator_test1.xlsx'
# (3) open the file in openpyxl first:
book = load_workbook(datafile)
xl = pd.ExcelFile(datafile,index = False)
df = xl.parse('Sheet1')
def create_tm():
row_iterator = df.iterrows()
# take first item from row_iterator
for i, row in row_iterator:
infile = row['filename']
outputfile = row['outputfilename']
timein = row['timein']
duration = row['duration']
decision = row['Create TM?']
if decision == "Y":
sp.call(ffmpeg + " -y -i " + infile + " -map 0:0 -map 0:1 -acodec copy -ss " + str(timein) + " -codec copy -t " + str(duration) + " " + outputfile,shell=True) #this works
# (4) Wherever in the code you want to put the timestamp:
df.loc[i, 'Timestamp'] = str(datetime.now())
# (5) This saves the sheet back into the original file, without removing
# any of the old sheets.
writer = pd.ExcelWriter(datafile)
writer.book = book
writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
df.to_excel(writer, index=False)
writer.save()
elif decision != decision: #this gets rid of the NaN
break
else:
print "You said you didn't want to make a TM for " + str(infile) -
How to add blurred border on top and bottom based on the video
5 avril 2023, par Noob69I am trying to modify a video to 1080x1920 scale and I want to add to the borders on top and bottom, a blurred version of the video based on the pixel on the edge.


import subprocess

input_file = "my_video1.mp4"
output_file = "my_video_processed1.mp4"

command = f'ffmpeg -i {input_file} -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2,eq=saturation=2.0:gamma=1.2:contrast=1.2,unsharp=lx=5:ly=5:la=0.5:cx=5:cy=5:ca=0.5" -c:v libx264 -preset slow -crf 18 -c:a copy {output_file}'
subprocess.call(command, shell=True)




I tried

mode = replicate
, however it is not working for the latest version of ffmpeg from Windows builds by BtbN.