I converted a .ts file to .mp4 using the following command:
ffmpeg -i hls-360p.ts -codec copy -bsf:a aac_adtstoasc hls-360p.mp4Altough no reencoding was intended, VLC states a just slightly different video codec string:
- Input
.tsfile:H264 - MPEG-4 AVC (part 10)(h264) - Output
.mp4file:H264 - MPEG-4 AVC (part 10)(avc1)
What's the difference?
Input file screenshot:
Output file screenshot:
2 Answers
From H.264 Video Types,
avc1 indicates H.264 bitstream without start codes
The MP4 container format stores H.264 data without start codes. Instead, each NALU is prefixed by a length field, which gives the length of the NALU in bytes. The size of the length field can vary, but is typically 1, 2, or 4 bytes.
And h264 indicates H.264 bitstream with start codes.
H.264 bitstreams that are transmitted over the air, or contained in MPEG-2 program or transport streams, or recorded on HD-DVD, are formatted as described in Annex B of ITU-T Rec. H.264. According to this specification, the bitstream consists of a sequence of network abstraction layer units (NALUs), each of which is prefixed with a start code equal to 0x000001 or 0x00000001.
Just to add to @Gyan's answer, the size of the length field is called NALULengthSizeMinusOne and is present in the avCc part of the avc1 box. This answer: Link shows a good difference between them.
1