View Source ExMP4.Reader.Display (MP4 Reader and Writer v0.8.1)
Show information about MP4 files and tracks using TableRex.
To use this module, you need to add table_rex
to your dependencies.
To show basic information about the whole movie
ExMP4.Reader.Display.movie_info(reader) |> IO.puts()
+--------------------------------------------------------+
| Movie Info |
+===========================+============================+
| Duration / Timescale | 2759320/1000 (0:45:59.320) |
| Brands (major/compatible) | mp42,isom,mp42 |
| Progressive | true |
| Fragmented | false |
| Creation Date | 1904-01-01 00:00:00Z |
| Modification Date | 1904-01-01 00:00:00Z |
+---------------------------+----------------------------+
Or to show a description of the tracks
ExMP4.Reader.Display.tracks_info(reader) |> IO.puts()
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Video track(s) info |
+====+=======================+========================+===========+===================+================+=======+=======+========+=============+===============+
| ID | Presentation Duration | Duration | Timescale | Number of Samples | Bitrate (kbps) | Codec | Width | Height | Sample Rate | Channel Count |
+----+-----------------------+------------------------+-----------+-------------------+----------------+-------+-------+--------+-------------+---------------+
| 1 | 2759320 - 0:45:59.320 | 35319296 - 0:45:59.320 | 12800 | 68983 | 1684 | H264 | 1920 | 816 | | |
+----+-----------------------+------------------------+-----------+-------------------+----------------+-------+-------+--------+-------------+---------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Audio track(s) info |
+====+=======================+=========================+===========+===================+================+=======+=======+========+=============+===============+
| ID | Presentation Duration | Duration | Timescale | Number of Samples | Bitrate (kbps) | Codec | Width | Height | Sample Rate | Channel Count |
+----+-----------------------+-------------------------+-----------+-------------------+----------------+-------+-------+--------+-------------+---------------+
| 2 | 2759320 - 0:45:59.320 | 121686016 - 0:45:59.320 | 44100 | 118834 | 128 | AAC | | | 44100 | 2 |
+----+-----------------------+-------------------------+-----------+-------------------+----------------+-------+-------+--------+-------------+---------------+
Summary
Functions
Display information about the whole movie.
Display samples from a track.
Display tracks information.
Types
@type samples_options() :: [limit: non_neg_integer(), offset: non_neg_integer()]
Functions
@spec movie_info(ExMP4.Reader.t()) :: String.t()
Display information about the whole movie.
@spec samples(ExMP4.Reader.t(), ExMP4.Track.id(), Keyword.t()) :: String.t()
Display samples from a track.
@spec tracks_info(ExMP4.Reader.t()) :: String.t()
Display tracks information.