
Recherche avancée
Autres articles (22)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
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 (...)
Sur d’autres sites (3320)
-
getting Unable to find a suitable output format in ffmpeg loop
20 avril 2021, par vivofen578I have this command :


Get-ChildItem -Path D:\input -Filter *.mkv |ForEach-Object {
 ./ffmpeg -i $_.FullName -pix_fmt yuv420p10le -preset slow -map 0:v:0 -map 0:a:0 -map 0:a:1 -map 0:s:0 -map 0:s:1 -c:v libx265 -profile:v main10 -crf 15 -c:a copy -c:s copy D:\outpui
}



for use with ffmpeg in powershell on Windows 10. But I am getting an error message of :


Unable to find a suitable output format for 'D:\output'
D:\output: Invalid argument



What am I doing wrong ?


-
Find the right path to my folder on server to execute cmd php
12 avril 2021, par Medsexec("ffmpeg -i $temp_name -r $FPS -vf scale='$resolutionWidth:$resolutionHeight' -b:v $bitrateVideo -bufsize $bitrateAudio videos/$videoURLnameTemp.mp4", $res);


This command works well locally, but once in production, the files are not stored in the video folder which is at the same level as the file in the server. Is there any way to get the output on the exec function to catch an error or something ? I tried the output by reference in the method but when I do a var_dump of the result, I get an array(0) {}.


I also tried to put the realpath in the path but it doesn't seem to work. ffmpeg is located at the same level as all files and the videos folder.


-
FFMPEG Unable to find a suitable output format for 'pipe :' pipe: : Invalid argument
1er avril 2021, par ashiyaa nunhuckI want to stream video from my drone real time to a WEBUI using ffmpeg. But i get the follwong errors.
The code works but i don't think ishould have gotten this error.
Can somebody help with this issue ? This is my drone commands along with the streaming video codes. I have only added the code to get data.
Below is the error :
pipe error


My code is as follows :


logger = logging.getLogger(__name__)

DEFAULT_DISTANCE = 0.30
DEFAULT_SPEED = 10
DEFAULT_DEGREE = 10

FRAME_X = int(960/3)
FRAME_Y = int(720/3)
FRAME_AREA = FRAME_X * FRAME_Y

FRAME_SIZE = FRAME_AREA * 3
FRAME_CENTER_X = FRAME_X / 2
FRAME_CENTER_Y = FRAME_Y / 2

CMD_FFMPEG = (f'ffmpeg - hwaccel auto -hwaccel_device opencl -i pipe:0 '
 f'-pix_fmt bgr24 -s {FRAME_X}x{FRAME_Y} -f rawvideo pipe:1')


class DroneManager(metaclass=Singleton):
 def __init__(self, host_ip='192.168.10.2', host_port=8890,
 drone_ip='192.168.10.1', drone_port=8889,
 is_imperial=False, speed=DEFAULT_SPEED):
 self.host_ip = host_ip
 self.host_port = host_port
 self.drone_ip = drone_ip
 self.drone_port = drone_port
 self.drone_address = (drone_ip, drone_port)
 self.is_imperial = is_imperial
 self.speed = speed
 self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 self.socket.bind((self.host_ip, self.host_port))

 self.response = None
 self.stop_event = threading.Event()
 self._response_thread = threading.Thread(target=self.receive_response,
 args=(self.stop_event,))
 self._response_thread.start()

 self.patrol_event = None
 self.is_patrol = False
 self._patrol_semaphore = threading.Semaphore(1)
 self._thread_patrol = None

 self.proc = subprocess.Popen(CMD_FFMPEG.split(' '),
 stdin=subprocess.PIPE,
 stdout=subprocess.PIPE)
 self.proc_stdin = self.proc.stdin
 self.proc_stdout = self.proc.stdout

 self.video_port = 11111

 self._receive_video_thread = threading.Thread(
 target=self.receive_video,
 args=(self.stop_event, self.proc_stdin,
 self.host_ip, self.video_port,))
 self._receive_video_thread.start()

 self.send_command('command')
 self.send_command('streamon')
 self.set_speed(self.speed)

 def receive_response(self, stop_event):
 while not stop_event.is_set():
 try:
 self.response, ip = self.socket.recvfrom(3000)
 logger.info({'action': 'receive_response',
 'response': self.response})
 except socket.error as ex:
 logger.error({'action': 'receive_response',
 'ex': ex})
 break

 def __dell__(self):
 self.stop()

 def stop(self):
 self.stop_event.set()
 retry = 0
 while self._response_thread.is_alive():
 time.sleep(0.3)
 if retry > 30:
 break
 retry += 1
 self.socket.close()
 os.kill(self.proc.pid, signal.CTRL_C_EVENT)

 def send_command(self, command):
 logger.info({'action': 'send_command', 'command': command})
 self.socket.sendto(command.encode('utf-8'), self.drone_address)

 retry = 0
 while self.response is None:
 time.sleep(0.3)
 if retry > 3:
 break
 retry += 1

 if self.response is None:
 response = None
 else:
 response = self.response.decode('utf-8')
 self.response = None
 return response

 def takeoff(self):
 return self.send_command('takeoff')

 def land(self):
 return self.send_command('land')

 def move(self, direction, distance):
 distance = float(distance)
 if self.is_imperial:
 distance = int(round(distance * 30.48))
 else:
 distance = int(round(distance * 100))
 return self.send_command(f'{direction} {distance}')

 def up(self, distance=DEFAULT_DISTANCE):
 return self.move('up', distance)

 def down(self, distance=DEFAULT_DISTANCE):
 return self.move('down', distance)

 def left(self, distance=DEFAULT_DISTANCE):
 return self.move('left', distance)

 def right(self, distance=DEFAULT_DISTANCE):
 return self.move('right', distance)

 def forward(self, distance=DEFAULT_DISTANCE):
 return self.move('forward', distance)

 def back(self, distance=DEFAULT_DISTANCE):
 return self.move('back', distance)

 def set_speed(self, speed):
 return self.send_command(f'speed {speed}')

 def clockwise(self, degree=DEFAULT_DEGREE):
 return self.send_command(f'cw {degree}')

 def counter_clockwise(self, degree=DEFAULT_DEGREE):
 return self.send_command(f'ccw {degree}')

 def flip_front(self):
 return self.send_command('flip f')

 def flip_back(self):
 return self.send_command('flip b')

 def flip_left(self):
 return self.send_command('flip l')

 def flip_right(self):
 return self.send_command('flip r')

 def patrol(self):
 if not self.is_patrol:
 self.patrol_event = threading.Event()
 self._thread_patrol = threading.Thread(
 target=self._patrol,
 args=(self._patrol_semaphore, self.patrol_event,))
 self._thread_patrol.start()
 self.is_patrol = True

 def stop_patrol(self):
 if self.is_patrol:
 self.patrol_event.set()
 retry = 0
 while self._thread_patrol.is_alive():
 time.sleep(0.3)
 if retry > 300:
 break
 retry += 1
 self.is_patrol = False

 def _patrol(self, semaphore, stop_event):
 is_acquire = semaphore.acquire(blocking=False)
 if is_acquire:
 logger.info({'action': '_patrol', 'status': 'acquire'})
 with contextlib.ExitStack() as stack:
 stack.callback(semaphore.release)
 status = 0
 while not stop_event.is_set():
 status += 1
 if status == 1:
 self.up()
 if status == 2:
 self.clockwise(180)
 if status == 3:
 self.down()
 if status == 4:
 status = 0
 time.sleep(5)
 else:
 logger.warning({'action': '_patrol', 'status': 'not_acquire'})

 def receive_video(self, stop_event, pipe_in, host_ip, video_port):
 with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock_video:
 sock_video.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 sock_video.settimeout(5)
 sock_video.bind((host_ip, video_port))
 data = bytearray(2048)
 while not self.stop_event.is_set():
 try:
 size, addr = sock_video.recvfrom_into(data)
 logger.info({'action': 'receive_video', 'data': data})
 except socket.timeout as ex:
 logger.warning({'action': 'receive_video', 'ex': ex})
 time.sleep(0.5)
 continue
 except socket.error as ex:
 logger.error({'action': 'receive_video', 'ex': ex})
 break

 try:
 pipe_in.write(data[:size])
 pipe_in.flush()
 except Exception as ex:
 logger.info({'action': 'receive_video', 'ex': ex})
 break