'Distinguish between MPEG-1 container and MPEG-2 container
I am looking at concrete ways to distinguish between files that use MPEG-1 and MPEG-2 containers as most of the resources that I find suggest that the start code is 00 00 01 BA for both containers.
I have tried to convert a video in MP4 container to MPEG-1 container using VLC's GUI and the packet start code for the resulting file was 00 00 01 BA which is the cause of my confusion.
Is it even possible to convert a video in a MP4 to a MPEG-1 container using FFMPEG as whatever I try generates a file in a MPEG-2 program stream container instead. The command used was ffmpeg -i video.mp4 video.mpg
Solution 1:[1]
The command ffmpeg -i video.mp4 video.mpg
will produce a MPEG-1 systems container. Use ffmpeg -i video.mp4 -f vob video.mpg
for MPEG-2 PS.
Immediately after the PACK START CODE 00 00 01 BA
. if the next two bits are 01
, it's MPEG-2 PS (VOB, DVD-VOB or SVCD), else if it's 0010
. it's MPEG-1 Systems or VCD.
Solution 2:[2]
MPEG-1 video encodes video intended to be used with a particular generation of video CD and the corresponding players. It was restricted to this on-disk format. The purpose of the systems layer is, for example, to explain how video and audio are interleaved for storage and sync’d for playout.
MPEG-2 video builds on some of the basic encoding concepts of the earlier standard but broadens its application to what might roughly be described as “broadcast TV quality” at roughly “standard definition”, leading to the first generation of digital STBs and associated services. It is what I understand by “DVD format”. Most DVDs are encoded in MPEG-2 format, you need to play DVD with MPEG-2 decoder.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Gyan |
Solution 2 | Bella Brown |