Skip to content

Commit

Permalink
Manifest: Add Timescale parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniketh01 committed Aug 26, 2020
1 parent 2834bb4 commit 04141b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion htdocs/bbb_m.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"segment_duration_ms": "1",
"start_number": 0,
"segment_duration_ms": "1",
"total_duration": 10,
"timescale": 1,
"total_segments": 298,
"total_representation": 4,
"bitrates_kbps": [
Expand Down
8 changes: 7 additions & 1 deletion scripts/abr/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def prepare_mpd(
seg_duration: int,
start_number: int,
total_representation: int,
timescale: int,
output_dir: Optional[str]
) -> None:
# NOTE: seg_duration in ms
Expand All @@ -124,6 +125,8 @@ def prepare_mpd(
start_number = 0
if total_duration is None:
total_duration = 10
if timescale is None:
timescale = 1

bitrates_kbps = []
resolution = []
Expand All @@ -140,9 +143,10 @@ def prepare_mpd(
seg_size= list(map(list, zip(*seg_size)))

manifest = {
"segment_duration_ms": seg_duration,
"start_number": start_number,
"segment_duration_ms": seg_duration,
"total_duration": total_duration,
"timescale": timescale,
"total_segments": len(seg_size),
"total_representation": total_representation,
"bitrates_kbps": bitrates_kbps,
Expand All @@ -165,6 +169,7 @@ def main():
parser.add_argument('--seg_duration', '-sd', help='segment duration in ms')
parser.add_argument('--start_number', '-sn', help='Start number')
parser.add_argument('--total_duration', '-td', help='Total duration in seconds')
parser.add_argument('--timescale', '-ts', help='Timescale is time in ms')
parser.add_argument('--total_representation', '-tr', help='Total number of representation')
parser.add_argument('--action', required=True, help='Action to be performed by the script. Possible actions are: encode, segmentation, mpd')
parser.add_argument('--fps', help="Frames per second to use for re-encoding")
Expand Down Expand Up @@ -231,6 +236,7 @@ def main():
args.seg_duration,
args.start_number,
args.total_representation,
args.timescale,
args.output_dir
)
else:
Expand Down

0 comments on commit 04141b0

Please # to comment.