
Recherche avancée
Médias (1)
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
Autres articles (95)
-
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 (8049)
-
avcodec/h264_slice : Fix container cropping
8 juillet 2015, par Michael Niedermayer -
lavf/mxf : Support video essence container uls for vc1.
5 septembre 2015, par Arnaud Bienner -
Can I have a rawvideo stream in a MPEG TS container
27 novembre 2020, par zardoshtI receive an MPEG TS container over network (UDP). It contains two streams : an mpeg2video vidoe stream with yuv420p pixel format and a data stream encoded using a propitiatory KLV format.


My receiver program must be in Python. So, I can't use FFMPEG library (like
AVFormat
,AVCodec
) directly.

Now my problem is as follows :


I need to receive video frames and save them as RGB image as raw
numpy
array. I also need for each frame to parse the corresponding KLV data. There is a one to one relationship between video frames and KLV data units.

I thought I use
ffprobe
to output the packets including their payload data from incoming container and then parse the output offfprobe
to get the images and metadata :

$ ffprobe -show_packets -show_data -print_format json udp://127.0.0.1:12345 > test_video.packets.data.json 



This gives me an output (in
test_video.packets.data.json
file) like :

{
 "codec_type": "video",
 "stream_index": 0,
 "pts": 140400,
 "pts_time": "1.560000",
 "dts": 136800,
 "dts_time": "1.520000",
 "duration": 3600,
 "duration_time": "0.040000",
 "size": "21301",
 "pos": "3788012",
 "flags": "K_",
 "side_data_list": [
 {
 "side_data_type": "MPEGTS Stream ID"
 }
 ],
 "data": "... "
},
{
 "codec_type": "data",
 "stream_index": 1,
 "pts": 140400,
 "pts_time": "1.560000",
 "dts": 140400,
 "dts_time": "1.560000",
 "size": "850",
 "pos": "3817904",
 "flags": "K_",
 "side_data_list": [
 {
 "side_data_type": "MPEGTS Stream ID"
 }
 ],
 "data": ".... "
}




I can extract the KLV data from the data packets and parse it. However the data from the video packets in encoded as mpeg2video video with yuv420p pixel format.


My Questions :


- 

- How can I get the raw pixel values from that mpeg2 encoded payload ?
- Is it possible to use ffmpeg to receive the original container and copy it (with both streams) into a new container, but with raw video instead of mpeg2 video ? if yes, how ? what should be the command ? I tried for example :
ffmpeg -i udp://127.0.0.1:12345 -map 0:0 -codec rawvideo -pix_fmt rgb24 -map 0:1 -codec copy -f mpegts udp://127.0.0.1:11112
, but it gives me again mpeg2 encoded video data in payload of video packets