
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (53)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (5889)
-
"does not contain any stream" if "EXT-X-MEDIA-SEQUENCE" > 0
6 mars 2019, par WonsonI have a list of .ts files and want to save them as multiple video files.
First I have a .m3u8 like this obtained from streaming :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key"
#EXTINF:3.01,
aaa001_00002.ts
#EXTINF:3.01,
aaa001_00003.ts
...
#EXTINF:3.01,
aaa001_01944.ts
#EXT-X-ENDLIST
Step 1 :
So, I tried to convert it into several m3u8 like the followings :
segment1.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key"
#EXTINF:3.01,
aaa001_00002.ts
#EXTINF:3.01,
aaa001_00003.ts
...
#EXTINF:3.01,
aaa001_00569.ts
#EXT-X-ENDLISTsegment2.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:567
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key"
#EXTINF:3.01,
aaa001_00002.ts
#EXTINF:3.01,
aaa001_00003.ts
...
#EXTINF:3.01,
aaa001_01288.ts
#EXT-X-ENDLISTand so on...
then do the ffmpeg cmd one by one..
ffmpeg -i /fs/segment2.m3u8 -safe 0 -map 0:v -map 0:a -cpu-used 4 -threads 0 -preset veryfast -c copy -bsf:a aac_adtstoasc output.mp4
But those EXT-X-MEDIA-SEQUENCE > 0 (i.e. since segment2.m3u8...) will result in
"Output file #0 does not contain any stream"
Then I tried to make the ’segment2.m3u8’ looks like this
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key"
#EXTINF:3.01,
aaa001_00002.ts <--the first video chunk
#EXTINF:3.01,
aaa001_00570.ts <--the start point of segment 2
#EXTINF:3.01,
aaa001_00571.ts
...
#EXTINF:3.01,
aaa001_01288.ts
#EXT-X-ENDLIST
ffmpeg works fine, and gives me an output video, so it seems the stream channel info is in the first chunk.
However, there are still several problems
-
the first chunk of video is in segment2.mp4 which I clearly do not want it here.
-
the segment2 output video plays first the 3.01s, then freezed the image until the time reach aaa001_00570.ts and play again
So, any suggestion so that I can reference the stream info from first chunk ? or ignore it in the playlist, etc ?
UPDATE SOLUTION
As it works when #EXT-X-MEDIA-SEQUENCE:0, and #EXT-X-KEY : IV = by default
So I add IV=hex(#EXT-X-MEDIA-SEQUENCE)in every playlist
segment1.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key",IV=0x00000000000000000000000000000000
#EXTINF:3.01,
aaa001_00002.ts
#EXTINF:3.01,
aaa001_00003.ts
...
#EXTINF:3.01,
aaa001_00569.ts
#EXT-X-ENDLISTsegment2.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:567
#EXT-X-KEY:METHOD=AES-128,URI="aaa001_00001.key",IV=0x00000000000000000000000000000237
#EXTINF:3.01,
aaa001_00570.ts
...
#EXTINF:3.01,
aaa001_01288.ts
#EXT-X-ENDLIST -
-
ffmpeg issues "501 Not Implemented" while recording an RTSP stream
28 février 2019, par atsushiI have a 4K camera (Sony SNC-VB770) streaming RTSP.
I’m trying to record the stream into files (each has handy length, say, 1hour)
using a simple script to repeatedly launch ffmpeg (ver 4.1) :while : ; do
# (set $url and $outfile, and then)
ffmpeg -rtsp_transport tcp -t 3600 -y -i $url -c copy -map 0:0 -b:v 16000k $outfile
doneIf I run the script on a local PC directly connected to the camera, it works (longer than a week, at least).
However, if I do the same on a server machine located in a data center, it fails randomly with no error message.
Sometimes it runs for a few days, sometimes it dies in one minutes.Typical output looks like the following :
# devname: snc-vb770
# url: rtsp://10.40.35.90/media/video1
# vb: 16000k
# datefmt %d%H
# addtimestamp 0
no timestamp
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --prefix=/usr/local/ffmpeg-4.1 --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libx264 --enable-libvorbis --enable-filter=drawtext --enable-libfreetype --enable-libfribidi --enable-fontconfig
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, rtsp, from 'rtsp://10.40.35.90/media/video1':
Metadata:
title : Sony RTSP Server
Duration: N/A, start: 0.066667, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 14.99 fps, 14.99 tbr, 90k tbn, 29.97 tbc
Output #0, mp4, to './2811.mp4':
Metadata:
title : Sony RTSP Server
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 16000 kb/s, 14.99 fps, 14.99 tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x24e4ec0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x24e4ec0] pts has no value
[mp4 @ 0x24e4ec0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frame= 33 fps=0.0 q=-1.0 size= 1792kB time=00:00:02.00 bitrate=7332.9kbits/s speed=3.57x
...
frame= 104 fps=8.4 q=-1.0 Lsize= 6532kB time=00:00:06.74 bitrate=7939.6kbits/s speed=0.548x
video:6531kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.023506%I’ve looked into RTSP packet and found an "RTSP/1.0 501 Not Implemented" is sent from ffmpeg to the camera.
After that the camera eventually sent back "RTSP/1.0 505 RTSP Version not supported" and then ffmpeg quits shortly.The "501" packet seems to be generated by libavformat/rtsp.c:ff_rtsp_read_reply(),
when ffmpeg receive a malformed RTSP packet with method=(null), status_code=0.
I don’t know why such packets arrive at random timing and who is wrong (maybe the camera, maybe any of network switches or routers in the middle of the network path from the camera to the server machine).
But anyway, I don’t want the recording to be stopped
due to those malformed packets.Is there any workaround to make ffmpeg ignore invalid RTSP packets and just continue the recording ?
Additional information :
-
I’ve tested the recording with both ffmpeg ver4.1 and 2.8.4 and no difference observed.
-
No difference observed at lower resolution nor at lower bitrate.
-
I have 3 cameras from various manufacturers in the same network environment.
All of the three are working without problem for more than a month.
Only the Sony SNC-VB770 shows the strange behavior.
-
-
How do I fix the "PES packet size mismatch" error in FFmpeg ?
8 février 2021, par Ed999How to fix the error PES packet size mismatch in FFmpeg -



I'm going to answer my own question, because the phrase PES packet size mismatch comes up regularly in posts relating to ffmpeg, but I've nowhere seen a satisfactory solution to it.



It usually figures in a problem involving .TS transport stream files : either in relation to concatenating such files, or relating to re-muxing them (from .ts to .mp4). Somewhere in the output from ffmpeg, the deadly phrase packet size mismatch will suddenly start repeating.



A solution is to concatenate them as .ts files (i.e. in their original format), then take the output .ts file, split it into a video file (.ts) and an audio file (.ts), then remux them (to either .ts or .mp4) using the "itsoffset" option. Even if stream copy is used, outputting to .mp4 will often give worse picture quality than retaining the .ts format.



The following code does that, outputting either .mp4 video or .ts video (copy the code into a simple .bat batch file, then run that file) -



.



:: Program Location
SET ffmpeg="C:\Program Files\FFmpeg\ffmpeg.exe" -hide_banner 


:: STEP 1 -

:: Create File List
IF EXIST mylist.txt DEL mylist.txt
FOR %%i IN (*.ts) DO ECHO file '%%i'>> mylist.txt

:: Concatenate Files : TS
%ffmpeg% -f concat -safe 0 -i mylist.txt -c copy -threads 1 out.ts


:: STEP 2 -

:: Extract Video stream
%ffmpeg% -i out.ts -vcodec copy -an -sn -threads 1 video.ts

:: Extract Audio stream
%ffmpeg% -i out.ts -acodec copy -vn -sn -threads 1 audio.ts


:: STEP 3 -

:: Combine Video and Audio streams (with .MP4 options)
SET mapping=-i video.ts -itsoffset -0 -i audio.ts -map 0:v -map 1:a
SET options=-flags global_header -movflags faststart -threads 1
%ffmpeg% %mapping% -c:v copy -c:a copy %options% output.mp4

:: Combine Video and Audio streams (with .TS options)
SET mapping=-i video.ts -itsoffset -0 -i audio.ts -map 0:v -map 1:a
SET options=-threads 1
%ffmpeg% %mapping% -c:v copy -c:a copy %options% output.ts




.



Addendum :



There seems to be some dispute about my suggested solution, as detailed in the Comments below. It seems to be being said that my solution is ignoring the fact that data is missing in the source files.



I think the least I can do is admit that since ffmpeg is reporting an error in the source files, with its 'packet size mismatch' warning, the objection raised in the Comments might be valid.



However, even if data is missing, my suggested routine will at least give you a file which will play in most media players. In many cases, there will not even be an audible or visual fault at the join point specified in the reported error.



It's difficult to see how the missing data might be restored, but do please chip in with suggestions. There must be scope for improving my script, because so little attention has been paid to this type of fault previously.



Happily, it seems that this type of error will NOT cause the sound to lose synchronisation with the picture. So the audio after the join-point will not go out-of-sync, even if some data is missing at the join.