In general, any options before -i denote the input file parameters. For this, we have -f image2 -r 1 -i your_image%02d.jpg
-f is to force the input file format as image2. Image2 denote input file as jpeg
-r is to denote the input frame rate. This is important and is a common mistake made by user. If you do not put -r, it will default -r as 25. Thus, if you see your ffmpeg output contains a lot of duplicate or dropped frame. You need to define the frame rate of the input file that match with the output frame rate.
-i is to set your input file names. %02 means that ffmpeg will take your_image00.jpg to your_image99.jpg as input consideration.
Next, any option after -i denote the output file parameters. For this, we have -r 15 -s hd1080 …
This is a MP4 file format notes that reference from ISO IEC 14496-12 2005 edition about Information technology — Coding of audio-visual objects — Part 12: ISO base media file format This is not designed for details explanation of each atom. For detail information, please read the ISO IEC 14496-12 document. General Format
In general, MP4 file format has the following structure ftyp File type box that denote the mp4 media type mdat Media data box which contains the actual AV frames.Within a mdat, there are chunks and samples moov Movie box which is the container for all metadataEach moov has have a mvhd (Movie header box)It can contains N trak box. Each trak box contains media specific meta data information Usually, it will have 2 tracks (video and audio)More importantly, it contains sample information such as stsd, stts, stsz stsc, stco, etc... Mdat Atom MPEG4 sample
Mdat is the media data atom which contain video and audio frames. As you can see from the screenshot, it is separated in…
Normally, RTSP provide streaming over UDP. By nature, UDP is a better choice as it provides robust streaming capability for media. However, it is unlikely to use UDP for streaming over the Internet. Some issues with UDP are 1. RTSP/RTP over UDP requires many UDP ports to be opened (each media stream requires 2 UDP port for data and control). 2. Point 1 is a real problem as routers in the Internet may not open these ports. 3. It is normal for intermediate Internet router to filter and ignore UDP packets. 4. UDP is unreliable. Media packets may be lost when travelling along the Internet
RTSP/RTP over TCP may resolve this issue. 1. RTSP/RTP will communicate via 1 port for command and data. That is the RTSP port. 2. TCP provide reliable streaming 3. It is more likely that the intermediate Internet router allow these TCP packets to go through. Using RTSP/RTP over TCP come with a price. 1. It complicated the packetization and depacketization process due to binary interleave. 2. TCP is reliable but…