
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (50)
-
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 (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...)
Sur d’autres sites (5820)
-
FFmpeg live rtmp capture to segments and encoding to mp4 is causing time glitches in the output
19 août 2020, par ezwrighterI am having issues with capturing live video and converting the latest x minutes to a useable mp4 on demand.


Currently i am capturing the latest 15m of a live rtmp stream and recording it with visual timestamp on it and saving it to segment files like this :


ffmpeg -i rtmps://domain/myawesomestream.stream -map 0 -vf drawtext=x=10:y=10:shadowcolor=white:shadowx=1:shadowy=1:text='%{localtime\:%m/%d/%Y %H\\\:%M\\\:%S MST}' -vcodec libx264 -crf 21 -acodec copy -an -start_at_zero -f segment -segment_time 15 -segment_wrap 61 -segment_list_type ffconcat -segment_list_size 60 -segment_list bufferTime.ffcat -segment_format mpegts /dvr/captureTime-%03d.ts


This works and allows me to always have the latest 15m of video captured with usable segments that I can then roll into mp4 files on demand like this without any re-encoding :


/usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 /var/www/chat/dvr/ugb/fifteenminutesofvideo.mp4


This does a great job of giving me the last 15 minutes of video from the live stream at any given moment. However, I would like to be able to get the last X minutes of video from the current segments instead of having to get the whole 15m minutes, without more encoding. I can sort of do it with two passes like this :


/usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 -y /dvr/tmp/mywhole15minutes.mp4

/usr/bin/ffmpeg -sseof -120 -i /dvr/tmp/myshole15minutes.mp4 -c copy -f mp4 -y /dvr/my120secondsofvideo.mp4


This gives me the last 120 seconds of video, but the front of the video has timestamp or keyframe issues at the front of it. It shows the visual timestamp between 5-12 seconds behind and then pauses or jumps the empty frames (Depending on the player) and then starts to play normally. I would love to fix the front of this video and have played with genpts and other flags to no avail :-( Any hints that might push me in the right direction ? Thanks ffmpeg pros out there ! I don't have a great place to publicly host the bad encoded video file, but would be happy to PM a link.


-
Convert ogg byte array to wav byte array Python
2 février 2023, par Ramish RasoolI want to convert ogg byte array/bytes with Opus codec to wav byte array/bytes without saving to disk. I have downloaded audio from telegram api and it is in byte array format with .ogg extension. I do not want to save it to filesystem to eliminate filesystem io latencey.


Currently what I am doing is after saving the audio file in .ogg format using code the below code using telegram api for reference https://docs.python-telegram-bot.org/en/stable/telegram.file.html#telegram.File.download_to_drive


# listen for audio messages
async def audio(update, context):
 newFile = await context.bot.get_file(update.message.voice.file_id)
 await newFile.download_to_drive(output_path)



I am using the code


subprocess.call(["ffmpeg", "-i", output_path, output_path.replace(".ogg", ".wav"), '-y'], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)



to convert ogg file to wav file. But this is not what I want.


I want the code


async def audio(update, context):
 newFile = await context.bot.get_file(update.message.voice.file_id)
 byte_array = await newFile.download_as_bytearray()



to get byte_array and now I want this byte_array to be converted to wav without saving to disk and without using ffmpeg. Let me know in comments if something is unclear. Thanks !


Note : I have setted up a telegram bot at the backend which listens for audios sent to private chat which I do manually for testing purposes.


-
FFMPEG stream RTSP to RTMP (Youtube) add logo
16 juin 2017, par Māris PurviņšTo stream video from IP cam to Youtube I’m using code (through Ubunu) :
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp ://user:psw@192.168.0.100:554 -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp ://a.rtmp.youtube.com/live2/ -nostdin -nostats /dev/null 2>&1 &It is a bee project for school
I have two cameras and two streams :
https://www.youtube.com/watch?v=ws-VcLXo-hIEverything is ok, but... I would like to know :
1. How to add png logo to this strem. I have tried -i /home/user/rvvg_logo_round.png -codec:v libx264 -preset ultrafast -filter_complex overlay and another methods but without a result.
2. Sometimes there is some problem during night and video streaming stops. How to automatically check process status and restart stream.
I have tried to create sh file as described in http://videos.cctvcamerapros.com/raspberry-pi/ip-camera-raspberry-pi-youtube-live-video-streaming-server.html and put in cron job, bet that is only to check one cam process. Is there some better idea ?