
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (55)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7569)
-
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 ?


-
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



-
How to find out which audio sample belongs to which frame in a video - with ffmpeg or other tools ?
30 mars 2021, par tlau5I am wondering how I would find out which frame in a video belongs to which audio sample.


Lets say : I know audio sample 39822 has the characteristic I am looking for. Using the information contained in the container, I want to find out to which frame the audio sample was recorded. (Key frames/ Samples ?)


I was thinking ffmpeg could help me with this problem.


I tried to find the answer within the ffmpeg documentation but did not succeed.


Maybe you guys can give me a hint which tool (maybe even other than ffmpeg) to use or where to look specific.


Thanks in advance
Tim