
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (108)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (10794)
-
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
-
How to convert Live video stream from YUV(HDYC) to RGB
9 août 2013, par user2499628I want to convert video streams from webcam. that video streams are called HDYC. I think it's a little special so I didn't control now.
My question is How to convert that format to rgb in c++ using ffmpeg ? but there are some constraints.
I don't want to make a file. in other wors, It needs to convert video streams from webcam. also It's a real time operation.Thanks.
-
FFMPEG Extra just codec information
18 juin 2014, par JimI am planning on using FFMPeg with Java, to detect a specific codec and convert this to another. Using the FFMpeg line -
ffprobe -v quiet -print_format json -show_streams "input.avi"
I can print off all of the stream information of the video, but this includes video information, audio information, all metadata, all tags and other information which I just don’t need.
Question : Is it possible to launch an FFMpeg command which only returns the video codec, so I don’t have to wave through unnecessary information ?