<p>I am using this command, to generate 2 resolution(640x360 and 1920x1080) with single file mpd.</p>
<pre><code>ffmpeg -re -i naruto.mp4 -map 0 -map 0 -c:a aac
 -c:v libx264
 -b:v:0 300k -b:v:1 3000k -s:v:0 640x360 -s:v:1 1920x1080
 -profile:v:1 baseline -profile:v:0 main -bf 1 -keyint_min 120 -g 120
 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1
 -adaptation_sets &quot;id=0,streams=v id=1,streams=a&quot;
 -f dash out.mpd
</code></pre>

CC BY-SA 4.0
2023-08-30T13:33:02.167Z
2023-08-30T13:33:02.167Z
iamkdblue
<p>I am using ffmpeg to convert an input stream into multiple resolutions and creating an mpd for each resolution.
So far, so good.
But I am trying to find a way to create a single mpd for all resolutions. This will reduce a lot of pain for me, downstream.
Is there an option available for this in ffmpeg natively or should I look at ways to merge mpd files ?</p>
<p>This is how my script looks so far. Please do the needful.</p>
<pre><code>&quot;ffmpeg -f avfoundation -framerate 30 -i 0:0 -filter_complex '[0:v]split=3[out1][out2][out3]' \ -map '[out1]' -s 1280x720 -vcodec libx264 -single_file 1 -f dash /path/to/720.mpd \  -map '[out2]' -s 854x480  -vcodec libx264 -single_file 1 -f dash /path/to/480.mpd \  -map '[out3]' -s 640x360  -vcodec libx264 -single_file 1 -f dash /path/to/360.mpd&quot;
</code></pre>

<ffmpeg><streaming><hls><mpeg-dash>
ffmpeg dash output for multiple resolutions to be in the same mpd file
Rajkumar Somasundaram
# ffmpeg dash output for multiple resolutions to be in the same mpd file

(Asked by: username_0 on 2023-02-09)

I am using ffmpeg to convert an input stream into multiple resolutions and creating an mpd for each resolution.
So far, so good.
But I am trying to find a way to create a single mpd for all resolutions. This will reduce a lot of pain for me, downstream.
Is there an option available for this in ffmpeg natively or should I look at ways to merge mpd files ?
This is how my script looks so far. Please do the needful.
"ffmpeg -f avfoundation -framerate 30 -i 0:0 -filter_complex '[0:v]split=3[out1][out2][out3]' \ -map '[out1]' -s 1280x720 -vcodec libx264 -single_file 1 -f dash /path/to/720.mpd \  -map '[out2]' -s 854x480  -vcodec libx264 -single_file 1 -f dash /path/to/480.mpd \  -map '[out3]' -s 640x360  -vcodec libx264 -single_file 1 -f dash /path/to/360.mpd"

**Tags:** ffmpeg, streaming, hls, mpeg-dash


---

## 1 answers

### Answer by username_1 on 2023-08-30. Score: 0

I am using this command, to generate 2 resolution(640x360 and 1920x1080) with single file mpd.
ffmpeg -re -i naruto.mp4 -map 0 -map 0 -c:a aac
 -c:v libx264
 -b:v:0 300k -b:v:1 3000k -s:v:0 640x360 -s:v:1 1920x1080
 -profile:v:1 baseline -profile:v:0 main -bf 1 -keyint_min 120 -g 120
 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1
 -adaptation_sets "id=0,streams=v id=1,streams=a"
 -f dash out.mpd


---

