A Few Important Notes
- ‘MPEG’ is a very wide concept and can refer to many variants of things, including a broad range of different standards
- ‘MPEG-4’ can refer to also a variety of very different things
- ‘MPEG-4 Visual‘ (MPEG-4 Part 2) – then as an actual video format. Especially in surveillance industry, CCTV et c, and when people are talking about MPEG-4, cameras / media used in the 2000s, 2010s), then MPEG-4 commonly refer to the Part 2, and H.264 is used for MPEG-4 Part 10.
- Often when people talk about MPEG-4 in general, at least in 2010s and into early 2020s, they most commonly are talking about MPEG-4 Part 10, AVC media. Saying this in this way because of next, MPEG-4 as for .mp4-file:
- A .mp4 file, which is a multimedia container file format (formally standardized in MPEG-4 Part 14). A really important note on this is this is a file format that has broad allowances for what is actually contained. Including
- MPEG-4 Part 2, MPEG-4 Visual
- MPEG-4 Part 10, AVC (Advanced Video Coding), H.264
- MPEG-H Part 2, HEVC (High Efficiency Video Coding), H.265
I.e. here when talk about MPEG-4 as in mp4 file, you can actually be talking about H.265, MPEG-H Part 2, media, which is far from MPEG-4 Part 2 or Part 10.
- (When Dropbox handles the syncing of media from iPhones, file extension .mov is used and can have e.g. H.264 or HEVC video encoded material.)
Useful pages for tools for working with different media include:
- Players, Media / Video (/mlabs/video/players/), for (trying to) play /display content
- Tools, Media / Video (mlabs/lib/tools/), for analyzing content
Way More Details
https://www.google.com/search?q=ffmpeg
https://en.wikipedia.org/wiki/FFmpeg
- libswresample, libavresample, libavcodec, libavformat (Lavf), libavutil, libpostproc, libswscale, libavfilter
https://ffmpeg.org/ffmpeg.html
https://www.google.com/search?q=install+ffmpeg+ubuntu
- how many frames in a video
- pkt_duration_time
- https://www.google.com/search?q=pkt_duration_time
- https://video.stackexchange.com/questions/24976/set-display-time-of-individual-frames-in-ffmpeg
- https://ffmpeg-user.ffmpeg.narkive.com/ZlfMS0TG/ffprobe-show-frames-values
- https://stackoverflow.com/questions/28498724/diference-between-pkt-duration-and-pkt-duration-time-in-ffprobe
- https://stackoverflow.com/questions/13595288/understanding-pts-and-dts-in-video-frames
- TO SEARCH FURTHER: https://ffmpeg.org/doxygen/3.1/annotated.html
- pkt_duration
- AVFrame Struct Reference
- https://ffmpeg.org/doxygen/3.1/structAVFrame.html
- int AVFrame::coded_picture_number
- Picture Struct Reference
- https://ffmpeg.org/doxygen/3.1/structPicture.html
- a Picture has a pointer to a Frame (struct AVFrame * f)
- https://ffmpeg.org/doxygen/3.1/structPicture.html
- https://en.wikipedia.org/wiki/Presentation_timestamp
- “The presentation timestamp (PTS) is a timestamp metadata field in an MPEG transport stream or MPEG program stream that is used to achieve synchronization of programs’ separate elementary streams (for example Video, Audio, Subtitles) when presented to the viewer. The PTS is given in units related to a program’s overall clock reference, either Program Clock Reference (PCR) or System Clock Reference (SCR), which is also transmitted in the transport stream or program stream.”
Packets, Frames, Pictures, Streams, Video Recording / View
- https://en.wikipedia.org/wiki/Container_format_(computing)
- .mp4, MPEG-4 Part 14 – https://en.wikipedia.org/wiki/MPEG-4_Part_14
- https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group
- https://en.wikipedia.org/wiki/MPEG-4
- https://en.wikipedia.org/wiki/MPEG-4_Part_2
Originally, historically, referring to MPEG-4 means “MPEG-4 Part 2”
Just “MPEG-4”
Video compressions
Starting with file extensions
Level#1 | By | Level#2 | Level#3 | A.K.A. | Comments | |
1. .avi | Microsoft | |||||
2. mp4 | MPEG | MPEG-1 | ||||
MPEG-2 | Part 2 | H.262 | (1995) | |||
MPEG-4 | Part 2 | ~ H.263 | (1999 1st Ed; 2001 2nd Ed; 2004 3rd Ed.) Incl. Advanced Simple Profile (ASP) | |||
Part 10 AVC | H.264 | (2003 1s Ed; ..) | ||||
Part 14 | the .mp4 file format | |||||
MPEG-H | Part 2 HVEC | H.265 | (2013) | |||
3. .mov, .qt | Apple | QuickTime File Format | ||||
– .asf | Microsoft | Advanced Systems Format | ||||
-. .mkv, … | Matroska | – | – | – | ||
-. .ogg | Xiph.Org |
I, P, B frames
https://en.wikipedia.org/wiki/Comparison_of_video_container_formats
https://en.wikipedia.org/wiki/Ogg
- .mp4
- MPEG
AVI | MP4 | D | |
Start | 2004 | ||
By | Microsoft | ISO, MPEG | |
Supported Video formats | “Almost all” [1][2] |
|
|
Supported Audio formats | “Almost all” [1][2] |
|
|
Other support | |||
Supported Codecs | “DivX and Xvid” [1] |
|
|
Supported Devices [1] | “PCs and Game Consoles. Not supported by Macs” |
|
[1] https://videoconverter.wondershare.com/convert/avi-vs-mp4.html (2020-11-20 when R:2020-12-09), including:
“MP4 or MPEG-4 Part 14 is a digital container format founded by the International Organization for Standardization in 2004. Just like AVI, it contains both video and audio data. On top of that, MP4 can also hold captions, subtitles, and still images. It also allows internet streaming. MP4 is an embodiment of the QuickTime format of 2001 and has a standard .mp4 extension. So if you’re looking for a standard video format that’s acceptable on all devices and websites, MP4 is your go-to option.”
[2] https://en.wikipedia.org/wiki/Audio_Video_Interleave
“An AVI file may carry audio/visual data inside the chunks in virtually any compression scheme, including Full Frame (Uncompressed), Intel Real Time (Indeo), Cinepak, Motion JPEG, Editable MPEG, VDOWave, ClearVideo / RealVideo, QPEG, and MPEG-4 Video.”
- MPEG-2
- https://en.wikipedia.org/wiki/MPEG-2 (a.k.a H.222/H.262)
- MPEG-4
- https://en.wikipedia.org/wiki/MPEG-4
- MPEG-4 Part 2 (formal std), a.k.a. MPEG-4 Visual,
- MPEG-4 Part 10 (formal std), a.k.a. AVC (Advanced Video Coding), a.k.a. H.264
- MPEG-4 Part 14 – the .mp4 digital multimedia container format
- MPEG-H
- MPEG-H Part 2 (formal std), a.k.a. HEVC (High Efficiency Video Coding), a.k.a. H.265
https://en.wikipedia.org/wiki/Comparison_of_video_codecs
###
https://blog.angelcam.com/what-is-the-difference-between-mjpeg-and-h-264/:
H.264 pros/cons
+ reduces bandwidth and storage consumption significantly
+ adaptive video quality based on bandwidth
+ suitable for storage
+ / – complexity setup – sometimes tricky to set up – streaming quality, frame rate and i frame rate. GOP, VBR, CBR etc.
MJPEG pros/cons
+ consistently great image quality
+ robustness, if one frame is dropped, then it does not affect the video
– no sound
– consumes much more bandwidth and storage
– no storage support at angelcam
In conclusion, when it comes to deciding whether to use MJPEG or H.264, it always comes down to what the consumer is looking for and where the camera is being installed. Although H.264 will be the preferred way for many, MJPEG may be a format of choice for those who seek higher quality with crisp details, but can’t support the H.264 stream.