
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (18)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (5920)
-
Unable to get a continuous video of last N seconds using ffmpeg [duplicate]
28 juin 2021, par trycatch22I am trying to create a dashcam from an RTSP streaming device using ffmpeg (in Python). I have it working, but I am losing a small bit of video between stopping a file and starting a new file.


My pseudocode looks like this :


Start recording in 5s increments
while True:
 now = get current time
 if now > split:
 stop recording
 start recording with new file name



At any point when I send a trigger, I wait (up to 5s) for the current file to be written to disk, and then I stitch the required number of files to get a video of the desired length. The issue is that I am losing time between the stop and the start.


I am starting a new file like so :


process_cmd = "ffmpeg -y -loglevel panic -i rtsp://{}:{}@{} -vf scale={}:{} -t {} {}".format(self._rtsp_login, self._rtsp_pwd, self._rtsp_server, self._width, self._height,self._rtsp_video_duration,output_file)
self._process_handle = subprocess.Popen(process_cmd, shell=True)



I am waiting for the video to be done recording by :


self._process_handle.wait()



What's a cleaner way to do this ? One option would be to write a longer file and then use ffmpeg to extract the desired N seconds from it.


proc = subprocess.Popen("ffmpeg -y -i rtsp://admin:ambi1234@192.168.1.200 -profile:v high -pix_fmt nv12 -b:v 15M -acodec aac out.mp4", stdin=subprocess.PIPE,shell=True)



This requires me to stop the recording first by sending 'q' to the process and then :


subprocess.Popen("ffmpeg -y -sseof -00:00:3 -i out.mp4 -vcodec copy -acodec copy test.mp4", shell=True)



But that source file (out.mp4) would have to be cleaned up every so often and if an event happens at that point, then I won't be able to capture the data.


-
resending a stream causes ffmpeg to crash
18 août 2020, par Arikaelwe use ffmpeg 3.4.8 to get udp streams from a source.

While the streams may be sent 24/7 or just from time to time, ffmpeg should always listen 24/7.

Those streams are out of my control.

The streams which are sent from time to time, are not just paused during the time they are not sent, they are not existing.

This means while they are always send with on the same address/port and our application sees them as one stream (or one input in ffmpeg terminology) they are technically multiple separate streams sent to the same address.

The problem is when one of those stream stops, ffmpeg keeps listening for the input (which is good) but it crashes as soon as we send the stream again giving the error :


Application provided invalid, non monotonically increasing dts to muxer in stream 4... 
av_interleaved_write_frame(): invalid argument.



Stream 4 contains synchronous klv metadata.


This is to be expected since the new stream will probably have a lower
dts
than the old stream.

I cant use the
reconnect_*
flags since we use anudp
source

example

ffmpeg -i udp://192.168.2.255:1234 -map 0 -c copy -f mpegts udp://192.168.2.255:1235


log (with loglevel verbose)


[mpegts @ 0x1eb8e60] Timestamps are unset in a packet for stream 3. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x1eb8e60] Application provided invalid, non monotonically increasing dts to muxer in stream 4: 2097600 >= 1732800
av_interleaved_write_frame(): Invalid argument
No more output streams to write to, finishing.
frame= 317 fps= 20 q=-1.0 Lsize= 7252kB time=00:00:23.30 bitrate=2549.1kbits/s speed=1.44x
video:6166kB audio:400kB subtitle:0kB other streams:58kB global headers:0kB muxing overhead: 9.481929%
Input file #0 (udp://192.168.2.255:1234):
 Input stream #0:0 (video): 318 packets read (6334176 bytes);
 Input stream #0:1 (audio): 534 packets read (410112 bytes);
 Input stream #0:2 (data): 0 packets read (0 bytes);
 Input stream #0:3 (data): 56 packets read (9968 bytes);
 Input stream #0:4 (data): 252 packets read (49542 bytes);
 Total: 1160 packets (6803798 bytes) demuxed
Output file #0 (udp://192.168.2.255:1235?broadcast=1):
 Output stream #0:0 (video): 317 packets muxed (6313576 bytes);
 Output stream #0:1 (audio): 534 packets muxed (410112 bytes);
 Output stream #0:2 (data): 0 packets muxed (0 bytes);
 Output stream #0:3 (data): 56 packets muxed (9968 bytes);
 Output stream #0:4 (data): 252 packets muxed (49542 bytes);
 Total: 1159 packets (6783198 bytes) muxed
Conversion failed!



Like mentioned this only happens if the input stream is stopped and started again.


So the question is :

Is it somehow possible to give ffmpeg a timeout after which it treats an input as a new stream and/or ignores those dts errors or how can I solve the problem ?

I know I could probably just wait for ffmpeg to fail and then restart it, but maybe there's a cleaner solution.


-
avformat/matroskadec : Don't use fake default value for ReferenceBlock
16 février 2021, par Andreas Rheinhardtavformat/matroskadec : Don't use fake default value for ReferenceBlock
This has been done in order to find out whether this element is present
at all ; but this can now be done in a cleaner way by using a CountedElement
for it.Reviewed-by : Ridley Combs <rcombs@rcombs.me>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>