
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (67)
-
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 (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (9222)
-
H.264 conversion with FFmpeg (from a RTP stream)
12 juillet 2014, par TobyEnvironment :
I have an IP Camera, which is capable of streaming it’s data over RTP in a H.264 encoded format. This raw stream is recorded from the ethernet. With that data I have to work.
Goal :
In the end I want to have a *.mp4 file, which I can play with common Media Players (like VLC or Windows MP).
What have I done so far :
I take that raw stream data I have and parse it. Since the data has been transmitted via RTP I need to take care of the NAL Bytes, SPS and PPS.
1. Write a raw file
First I determine the type of each frame received over Ethernet. To do so, I parse the first two bytes of every RTP Payload, so I can get the 8 NAL Unit Bit, the Fragment Type Bits and the Start, Reserved and End Bit. In the payload, they’re arranged like this :
Byte 1: [ 3 NAL Unit Bits | 5 Fragment Type Bits]
Byte 2: [Start Bit | Reserved Bit | End Bit | 5 NAL Unit Bits]From this I can determine :
- Start and End of
a Video Frame -> Start Bit and End Bit - Type of the Payload -> 5 Fragment Type Bits
- NAL Unit Byte
The Fragment types which are necessary in my case are :
Fragment Type 7 = SPS
Fragment Type 8 = PPS
Fragment Type 28 = Video FragmentThe NAL Byte is created by putting the NAL Unit Bits from Byte 1 and 2 together.
Now depending on the fragmentation type I do the following :
SPS/PPS :
- Write the NAL Prefix (
0x00 0x00 0x01
) and then the SPS or PPS data
Fragmentation with Start Bit
- Write NAL Prefix
- Write NAL Unit Byte
- Write remaining raw data
Fragmentation without Start Bit
- Write raw data
This means my raw file looks something like this :
[NAL Prefix][SPS][NAL Prefix][PPS][NAL Prefix][NAL Unit Byte][Raw Video Data][Raw Video Data]....[NAL Prefix][NAL Unit Byte][Raw Video Data]...
For every PPS and SPS I find in my stream data, I just write a NAL Prefix ( 0x00 0x00 0x01 ) and then the SPS/PPS itself.
Now I can’t play this data with some media player, which leads me to :
2. Convert the file
Since I wanted to avoid working much with codecs I just went to use an existing application -> FFmpeg. This I am calling with those parameters :
ffmpeg.exe -f h264 -i <rawinputfile> -vcodec copy -r 25 <outputfilename>.mp4</outputfilename></rawinputfile>
-f h264
: This should tell ffmpeg I have a h264 coded stream-vcodec copy
: Quote from the manpage :Force video codec to codec. Use the "copy" special value to tell that the raw codec data must be copied as is.
-r 25
: Sets the framerate to 25 FPS.When I call ffmpeg with those parameters I get an .mp4 File, which I can play with VLC and Windows MP, so it actually works. But the file now looks a bit different from my raw file.
This leads me to my question :
What did I actually do ?
My problem is not that it is not working. I just want/need to know what I have actually done with calling ffmpeg. I had a raw H264 file which I could not play. After using FFmpeg I can play it.
There are the following differences between the original raw file (which I have written) and the one written by FFmpeg :
- Header : The FFmpeg File has like about 0x30 Bytes of Header
- Footer : The FFmpeg File also has a footer
- Changed Prefix and 2 new Bytes :
While a new Video Frame from the Raw File started like
[NAL Prefix][NAL Unit Byte][Raw Video Data]
in the new file it looks like this :[0x00 0x00][2 "Random" Bytes][NAL Unit Byte][Raw Video Data].....[0x00 0x00[2 other "Random" Bytes][NAL Unit Byte][Raw Video Data]...
I understand that the Video Stream needs a container format (correct me if I am wrong but I assume that the new header and footer are responsible for that). But why does it change actually some Bytes in the raw data ? It can’t be some decoding since the stream itself should get decoded by the player and not ffmpeg.
As you can see I don’t need a new solution for my problem as far more an explanation (so I can explain it by myself). What does ffmpeg actually do ? And why does it change some bytes within the video data ?
- Start and End of
-
configure : remove superfluous check for AVX/FMA3 support in Yasm
19 juin 2014, par James Almer -
Revision 6122ca87a3 : Simplify 2 pass KF bitrate allocation Simplify the calculation of KF bitrate in
14 mai 2014, par Paul WilkinsChanged Paths :
Modify /vp9/encoder/vp9_firstpass.c
Simplify 2 pass KF bitrate allocationSimplify the calculation of KF bitrate in similar way
to previous patch for GF/arf.This has no impact on derf or std hd sets but gives a
small net gain of 0.1% for yt and yt-hd sets.Change-Id : Ida64ac1428d9c2a62adb67056fadbf0180eff030