
Recherche avancée
Autres articles (72)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (3547)
-
FFMPEG : Error while opening encoder - when resizing
10 août 2015, par pufAmufI am trying to resize a video so that the height is 240px.
Here is the code I used :
ffmpeg -i input.mp4 -vf scale=-1:240 -acodec mp3 -vcodec libx264 output.mp4
The error I received was this :
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or heightSpecifically, here is the complete response :
> [libx264 @ 042e0200] width not divisible by 2 (427x240) Output #0,
> mp4, to 'output_240p.mp4': Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf53.24.2
> Stream #0:0(und): Video: h264, none, q=2-31, 128 kb/s, SAR 1280:1281 DAR 0:0 , 25 fps (default)
> Metadata:
> creation_time : 1970-01-01 00:00:00
> handler_name : VideoHandler
> encoder : Lavc56.57.100 libx264
> Stream #0:1(und): Audio: mp3, 0 channels, 128 kb/s (default)
> Metadata:
> creation_time : 1970-01-01 00:00:00
> handler_name : SoundHandler
> encoder : Lavc56.57.100 libmp3lame Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 ->
> #0:1 (aac (native) -> mp3 (libmp3lame)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate,
> rate, width or heightIf I use the below code, it works great, except then I can’t keep on using my aspect ratio :
ffmpeg -i input.mp4 -s 320x240 -acodec mp3 -vcodec libx264 output.mp4
Any idea what is going on here ? Thanks !
-
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) -
Join us for the Piwik Community Meetup 2015 !
We’re excited to announce that our third Piwik Community Meetup will be held in Berlin on Tuesday, the 4th of August, 2015. Don’t miss this great opportunity to connect with other users and meet the core team behind Piwik. It’s free, so REGISTER TODAY ! And maybe you would like to share your Piwik use case ? We’re also waiting for your presentation ideas.
We will cover some of the upcoming features, discuss the future of Piwik, share tricks and hacks to help you get the most out of your Piwik platform, and socialise. If you use Piwik to improve your websites and apps, or are just generally curious about digital analytics and marketing – this event is not to be missed. As our core team is scattered all over the world, this will be a rare opportunity for you to meet and talk to us all at once – especially for those of you interested in the platform, integrating your app with Piwik, and building plugins.
After the official part, we would like to enjoy drinks with all the participants in the nearby bars. We hope you will be able to join us !
All Piwik community members are warmly invited to take part in the meetup !
Piwik Community Meetup 2015
When ?
Tuesday, the 4th of August, from 5-9pm
Where ?
Kulturbrauerei
Schönhauser Allee
Prenzlauer Berg area
Berlin, Germany
exact directions tbc.Languages :
English and German
Book tickets :
BOOK YOUR FREE INVITATION HERE
Open call for YOUR presentation ideas
We would also like to hear how you use Piwik – we’ll be delighted if you’d share your interesting use case during the Meetup. Please send your presentation ideas (speaking time : 5 to 7 minutes) to : meetup@piwik.pro ! Deadline : 20th of July 2015.
Contact the organisers :