0

I'm working with HLS streams of MPEGTS that contains H264.

When I look at the HLS Playlist given by the server, it specifies that the codec is avc1.77.30,mp4a.40.2

Here's a snippet from the file

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1787760,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=640x360

Is there a way I can retrieve this information from ffmpeg?

I found a question that was asked before How to determine video codec of a file with FFmpeg

But the closest I can seem to get to any of their outputs is h264 and not avc1.77.30

The playlist contains 7 MPEG-TS files, I've tried using ffprobe on both the playlist file, as well as the individual video files, but they both seem to report the parser, not the encoding of the actual video.

iggy12345
  • 1,233
  • 12
  • 31

1 Answers1

1

The string avc1.77.30,mp4a.40.2 describes the codecs of the video and audio stream as per RFC 6381 section 3.3.

In avc1.77.30, avc1 identifies the codec, also known as H.264 which you've already recognized. 77 is the decimal representation of Main profile, usually written as hex 4d. 30 is 10 times the level, which is 3.0.

ffprobe -select_streams v -show_entries stream=codec_name,profile,level INPUT

will print out this info. The level is reported as its 10x value.

mp4a.40.2 stands for AAC audio codec with LC profile. For which, use

ffprobe -select_streams a -show_entries stream=codec_name,profile INPUT
Gyan
  • 85,394
  • 9
  • 169
  • 201
  • When I run `ffprobe` with the arguments above it just says `profile=High` is there a way to get the number instead? – iggy12345 Jan 10 '23 at 14:13