
Recherche avancée
Autres articles (91)
-
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (2422)
-
close ffmpeg subprocess in python
8 septembre 2018, par LiamI’mh having issues with ffmpeg in a python subprocess,
I’m downloading videos from v.redd.it and stiching them up together with ffmpeg before sending them up to instagram
So here’s what I’m using to download and stick them up together
print('[ TASK ] Downloading video...')
media_url = submission.media['reddit_video']['fallback_url']
mp4_path = ("./media/cache/%s.mp4" % (submission.id))
mp3_path = ("./media/cache/%s.mp3" % (submission.id))
output_path = ("./media/%s.mp4" % (submission.id))
cmd = './ffmpeg.exe -y -i %s -i %s -codec copy -shortest %s' % (mp4_path, mp3_path, output_path)
try:
mute = False
urllib.request.urlretrieve(media_url, mp4_path)
urllib.request.urlretrieve(media_url[:media_url.find('/', 18)] + "/audio", mp3_path)
except urllib.error.HTTPError: # A 'muted sound' video.
print("[ Task ] Muted sound video found...")
mute = True
pass
except Exception as e:
print(e)
pass
if mute is False:
try:
print ("[ TASK ] Merging audio and video with ffpmeg...")
subprocess.call(cmd)
except Exception as e:
print(e)
pass
path = output_path
os.remove(mp3_path)
os.remove(mp4_path)
else:
path = mp4_path
if os.path.getsize(path) >= 20*10**6:
print("[ ERROR ] Video file is larger than max file size")
print("[ INFO ] Currently at " + str(os.path.getsize(path)/1000000) + " MB")
print("[ INFO ] Goal is 20 MB")
print("[ TASK ] Making file smaller... (this might take up to a few minutes)")
subprocess.call("./ffmpeg.exe -y -i %s -vcodec libx264 -crf 24 %s" % (path, output_path.replace(".mp4", "_new.mp4")))
os.remove(path)
path = output_path.replace(".mp4", "_new.mp4")
print("[ INFO ] New size is now " + str(os.path.getsize(path)/1000000) + " MB" )
time.sleep(5)
print(path)
return pathAnd then to upload to instagram :
print("[ INFO ] Post will be a video")
thumb_path = "./media/thumb.jpg"
print("[ TASK ] Currently downloading the video thumbnail")
urllib.request.urlretrieve(str(submission.thumbnail), thumb_path)
video_local_path = path
thumbnail_local_path = thumb_path
print("[ TASK ] Uploading video to Instagram Servers...")
API.uploadVideo(video_local_path, thumbnail_local_path, caption=submission.title)
try:
os.remove(thumb_path)
os.remove(path)
except Exception as e:
print(e)However after it download and ffmpeg up’s the video fine it gives me this error when trying to delete :
[WinError 32] The process cannot access the file because it is being used by another process: './media/9e2zd5_new.mp4'
And I don’t get it, because the ffmpeg task should be alright ? Maybe it’s a conflict between moviepy (used by Instagram-python-API) and ffmpeg subprocess ?
-
Add buffering to real time input stream with c++ ffmpeg
7 octobre 2018, par JoelI am writing a c++ program in which I am handling a real time udp video stream with the ffmpeg library.
The video input fps is 25 frames per second in avarage. The gap between two frames can be 10 , 20, 40 milliseconds, but sometimes it can be around 80 milliseconds.
In those times, when the gap is around 80 milliseconds, the video seems choppy or stuck,When I open the same stream with the ffplay player(using the ffplay.exe), using a simple
"ffplay.exe udp ://ip:port" command, the video has a little delay (around 50 millisends) with respect to the origin stream, but it runs much more smoothly.Can I set a buffering time or any minimal delay so that the delay between the frames will be much more steady, in my c++ program ?
If so, how can I do this ?Thanks,
Joel -
ffmpeg get frame time stamp
19 novembre 2018, par Anshul G.I am trying to record a webcam video using ffmpeg. I have a logitech c922 Pro Stream Webcam. This is the command that I use :
ffmpeg -f v4l2 -framerate 60 -video_size 1280x720 -input_format mjpeg -i /dev/video1 out.mp4
My application requires me to get the exact timestamp for every frame. While I could use my knowledge of the framerate and frame number to add the required interval to the start time, I am afraid that this might not be completely accurate.
Firstly, I have noticed that while recording, the console seems to initially display a far higher fps than the one I have set :
Press [q] to stop, [?] for help
frame= 177 fps= 85 q=-1.0 Lsize= 502kB time=00:00:02.91 bitrate=1410.8kbits/s dup=144 drop=0Also, I think that ffmpeg drops frames in between sometimes.
However, my videos seem to have the correct number of frames so I think that the fps value displayed could instead be referring to the encoding/ decoding speed. I am not sure about frame dropping.
I would be happy of you could let me know what you think, or suggest an alternative so that I can timestamp my frames accurately. Thanks !
Edit :
I have understood that frame rate is correlated to ambient light which can lead to high duplication in frames. I am currently recording on windows and have set frame rate as the priority in logitech gaming software. However there is still the occasional drop in frame or duplication. Does this affect time stamp of the frames ? Or can I extrapolate from the start time ?