
Recherche avancée
Autres articles (39)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 (5092)
-
How to stop ffmpeg-lavfi from changing output frame rate per second
23 mars 2020, par rupinderjeetI have an MP4 video from Giphy. This video is 200ms long with 10 fps as reported by
mediainfo
. I am trying to use ffmpeg to add filters to this video.1) Following command works perfectly. The output video keeps fps=10 and duration=200ms
ffmpeg3 \
-y \
-i input.mp4 \
-i watermark.jpg \
-filter_complex "[0][1]overlay=W-w-20:H-h-20" \
-c:a aac \
-preset ultrafast \
output.mp4But, for more filters, I need to use
lavfi
(for e.g. to place a text-source above or below video, bg color, etc)2) Following command with
lavfi
outputs a video of fps=25 and duration =520msffmpeg3 \
-y \
-i input.mp4 \
-f lavfi -i color=c=#FFFF0000@1.0:s=1022x682:d=0.5,format=rgba \
-i watermark.jpg \
-filter_complex "[0]scale=1022:682[S3];[S3][2]overlay=W-w-20:H-h-20[O4];[1][O4]overlay=0:0" \
-c:a aac \
-preset ultrafast \
output.mp43) If I add
r=10
tolavfi
input, fps changes to 10 but duration length is 500ms-f lavfi -i color=c=#FFFF0000@1.0:s=1022x682:r=10:d=0.5,format=rgba \
Even then, the output duration is wrong. And, video just freezes for remaining duration. I can’t use some kind of frame specifier because I do not know input framerate before this command. All video inputs are from user/client of this software I am writing. This is not a one off task.
This happens only when I use
lavfi
.I want
output.mp4
to have same fps and duration as first input(i.e.0
orinput.mp4
). How can I do this (preferably in single command) ? -
Stopping rq worker doesn't stop underlying ffmpeg process
23 mars 2020, par sqrI am fairly new to python and rq, and have come to a point I can’t solve by myself.
I am using ffmpeg-python to encode livestreams, this is distributed in rq workers and displayed on a web app using flask, but since the livestreams can go on forever, I need some way to stop this process while it is still in execution. Opening the terminal where the rq worker is executing the task and pressing ’q’ (ffmpeg shortcut to quit) works, and marks the job as OK, but I need to be able to do this from my web app.
I have tried getting the worker ID and sending it a SIGKILL, this stops the worker but the task continues running, which is something I don’t understand at all. It’s as if the actual ffmpeg process was being executed somewhere else and stopping the worker didn’t stop ffmpeg. Note that I am not using ffmpeg.run_async, I am using ffmpeg.run which as far as my limited knowledge goes, should not be executed asynchronously. While the streaming is being encoded the worker is marked as busy and has the Job ID properly assigned, so I really don’t understand why, when the worker is killed, the underlying process is still in execution.
If instead of sending a SIGKILL I send a SIGTERM, the worker says it’s waiting for a warm exit and is never closed, as the ffmpeg process is still doing it’s thing.
One of my ideas was trying to send a ’q’ keystroke to the worker (which I have no idea how to do even though i’ve been doing some research) or trying to switch from rq to celery, that supposedly supports the cancellation of tasks that are being executed.
This is my routes file
@app.route('/streamings', methods=['GET', 'POST'])
@login_required
def streamings():
...
if form2.submit_stop.data and form2.validate():
conn1 = Redis.from_url('redis://')
queue = rq.Queue('tasks-q', connection=Redis.from_url('redis://'))
workers = rq.Worker.all(queue=queue)
for worker in workers:
peine = worker.get_current_job_id()
if peine == form2.fld1.data:
os.kill(worker.pid, signal.SIGKILL)and this is my tasks file
def restream(origin, server, stream_key):
stream_server = generate_url(server, stream_key)
try:
stream_map = None
stream1 = ffmpeg.input(get_manifest(origin), re=None)
stream2 = ffmpeg.input('mosca_66.png')
stream_ol = ffmpeg.overlay(stream1, stream2, x='main_w-overlay_w-50', y='50')
a1 = stream1.audio
stream = ffmpeg.output(stream_ol, a1, stream_server, format='flv', vcodec='libx264', acodec='aac', preset='medium', g='120', crf='23', maxrate='4M', bufsize='5M', channel_layout='stereo')
print(stream.get_args())
ffmpeg.run(stream)
except:
set_complete()Any insight on possible solutions would be greatly appreciated.
Thanks
-
how to stop a function from a button in tkinter
11 mars 2020, par Cb9867I am trying to record audio from microphone in python with the help of ffmpeg.
By using this i am able to record voice but how can i stop this function by clicking of a button.
to stop this now i am terminating the IDLE forcefully.
import os
import subprocess
import tkinter as tk
from tkinter import *
root = Tk()
os.chdir('C://Users/ravir/desktop/')
def recording_voice():
global p
p=subprocess.Popen('ffmpeg -f dshow -i audio="Microphone (2- High Definition Audio Device)" sample.mp3' )
def stop_rec(): # ho to stop this ???
p.terminate()
rec_btn = Button(text='Start Recording', width=20, command=recording_voice)
rec_btn.pack()
stop_btn = Button(text='Stop Recording', width=20, command=stop_rec)
stop_btn.pack()
root.mainloop()