3

I want to create dash stream with multi-bitrate and serve it. I also want to use the quality selector of dash.js player. like the picture:

dash.js player quality selector what flags and configuration I need for generating .mpd file?

pesehr
  • 787
  • 2
  • 9
  • 23

1 Answers1

5

With the following command, you create two streams and after that, you can put them into adoption sets instead of seperate streams:

ffmpeg -i $INPUT.mp4 \
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \
-b:v:0 250k -filter:v:0 "scale=-2:240" -profile:v:0 baseline \ 
-b:v:1 750k -filter:v:1 "scale=-2:480" -profile:v:1 main \    
-use_timeline 1 -use_template 1 -window_size 5 \
-adaptation_sets "id=0,streams=v id=1,streams=a" -f dash $OUTPUT.mpd
agconti
  • 17,780
  • 15
  • 80
  • 114
Parham Alvani
  • 2,305
  • 2
  • 14
  • 25