Answers.Body: <p>Having seen the sample, this is the command</p>
  
  <pre><code>ffmpeg -i in.avi -vf pad=720:576:0:144,setdar=4/3 -target pal-dvd out.mpg
  </code></pre>
  
  <p>The video is square-pixel, so scaling is not required. The frame should be treated as 4:3, not 16:9 (which isn't the right ratio for this movie anyway).</p>
  
  <hr>
  
  <p>For widescreen playback in the PAL standard, your rendered raster has to be 1024x576. So,</p>
  
  <pre><code>ffmpeg -i in.avi -vf scale=1024:288,pad=1024:576:0:144 -target pal-dvd out.mpg
  </code></pre>
  
  <p><code>scale=1024:288</code> --> the video is scaled to the final display width.</p>
  
  <p><code>pad=1024:576:0:144</code> --> vertical pixels are added to make it to 1024x576.</p>
  
  <p><code>-target pal-dvd</code> --> this will rescale the video to 720x576 and set a DAR of 16:9.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T19:42:38.383Z
Answers.Text: This indeed fixes the aspect ratio, although I'm not sure which step actually does this. But this produces a DVD with black bands on both sides, as well as on top and bottom. Indeed it's not very clear to me why I should pass through the 1024x288 resolution, which I expect it to stretch the image even further. And how it is possible that the final scale from 1024x576 to 720x576 does not warp the video.
Answers.UserDisplayName: Mauro Molinari
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T19:52:23.257Z
Answers.Text: I must correct myself: the side bands disappear if I force 16:9 aspect ratio in my video player (VLC). So I think I also have to set the DAR to get the resulting video declaring itself as 16:9. However, forcing 16:9 shows that the resulting video is actually stretched horizontally. Also, it seems like I obtain the exact same result as you if I skip the first scaling to 1024x288, and hence if I use: `ffmpeg -i in.avi -vf pad=720x576:0:144 -target pal-dvd out.mpg`.
Answers.UserDisplayName: Mauro Molinari
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-01T19:55:56.223Z
Answers.Text: Add `setsar=1` after the pad in my command and check.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-02T19:19:43.217Z
Answers.Text: If I add setsar=1, to your command, I do not need any more to force the aspect ratio in rhe video player to 16:9 (it is automatically detected), but the video is still stretched horizontally... People look very fat :-).
Answers.UserDisplayName: Mauro Molinari
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-02T19:43:54.967Z
Answers.Text: Share a screenshot: `ffmpeg -ss 300 -i in.avi -vf setsar=1 -vframes 1 out.png`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-18T13:38:17.627Z
Answers.Text: Here it is: https://www.dropbox.com/s/7cluw19xmq26hvb/out.png?dl=0
Answers.UserDisplayName: Mauro Molinari
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-27T06:11:00.800Z
Answers.LastActivityDate: 2017-06-18T14:20:21.900Z
Answers.LastEditDate: 2017-06-18T14:20:21.900Z
Answers.UserDisplayName: Gyan
Body: <p>I have a MPEG-4 Simple Profile video with size 720x288, pixel aspect ratio of 2:21:1 (ffmpeg says SAR 1:1, DAR 5:2).
  I'm trying to use the command I usually use to convert it do DVD format:</p>
  
  <pre><code>ffmpeg -i inputfile.avi -target pal-dvd outputfile.mpg
  </code></pre>
  
  <p>This produces a 720x576 video which plays fine with video players on the PC. But when I try to burn this to a DVD (with 16:9 aspect ratio), the image is stretched. Playing around with VLC, I understand the video has a pixel aspect ratio of 2:21:1, so when reproduced at 16:9 images are vertically stretched.</p>
  
  <p>I would have expected "-target pal-dvd" to fix this automatically, but it does not. I read some information on the Internet and I think the key is about setting the correct sar/dar, but I tried some combination and I was not able to obtain the result I want, probably because I don't perfectly understand the logic to determine the right values to set.
  It's fine for me to have black bands over and below the image, but the video aspect ratio must be preserved, of course.</p>
  
  <p>By the way, I'm getting the same results with avconv instead of ffmpeg.</p>
  
  <p>Thanks in advance.</p>
  
Tags: <ffmpeg><aspect><avconv>
Title: How to convert a 2:21:1 video to 16:9 DVD using ffmpeg?
UserDisplayName: Mauro Molinari
ThreadText: # How to convert a 2:21:1 video to 16:9 DVD using ffmpeg?
  
  (Asked by: username_0 on 2017-05-26)
  
  I have a MPEG-4 Simple Profile video with size 720x288, pixel aspect ratio of 2:21:1 (ffmpeg says SAR 1:1, DAR 5:2).
  I'm trying to use the command I usually use to convert it do DVD format:
  
  ```
  ffmpeg -i inputfile.avi -target pal-dvd outputfile.mpg
  
  ```
  
  This produces a 720x576 video which plays fine with video players on the PC. But when I try to burn this to a DVD (with 16:9 aspect ratio), the image is stretched. Playing around with VLC, I understand the video has a pixel aspect ratio of 2:21:1, so when reproduced at 16:9 images are vertically stretched.
  
  I would have expected "-target pal-dvd" to fix this automatically, but it does not. I read some information on the Internet and I think the key is about setting the correct sar/dar, but I tried some combination and I was not able to obtain the result I want, probably because I don't perfectly understand the logic to determine the right values to set.
  It's fine for me to have black bands over and below the image, but the video aspect ratio must be preserved, of course.
  
  By the way, I'm getting the same results with avconv instead of ffmpeg.
  
  Thanks in advance.
  
  **Tags:** ffmpeg, aspect, avconv
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-05-27. Score: 2
  
  Having seen the sample, this is the command
  
  ```
  ffmpeg -i in.avi -vf pad=720:576:0:144,setdar=4/3 -target pal-dvd out.mpg
  
  ```
  
  The video is square-pixel, so scaling is not required. The frame should be treated as 4:3, not 16:9 (which isn't the right ratio for this movie anyway).
  
  ---
  
  For widescreen playback in the PAL standard, your rendered raster has to be 1024x576. So,
  
  ```
  ffmpeg -i in.avi -vf scale=1024:288,pad=1024:576:0:144 -target pal-dvd out.mpg
  
  ```
  
  `scale=1024:288` --> the video is scaled to the final display width.
  
  `pad=1024:576:0:144` --> vertical pixels are added to make it to 1024x576.
  
  `-target pal-dvd` --> this will rescale the video to 720x576 and set a DAR of 16:9.
  
  > **Comments:**
  > **username_0**: This indeed fixes the aspect ratio, although I'm not sure which step actually does this. But this produces a DVD with black bands on both sides, as well as on top and bottom. Indeed it's not very clear to me why I should pass through the 1024x288 resolution, which I expect it to stretch the image even further. And how it is possible that the final scale from 1024x576 to 720x576 does not warp the video.  
  > **username_0**: I must correct myself: the side bands disappear if I force 16:9 aspect ratio in my video player (VLC). So I think I also have to set the DAR to get the resulting video declaring itself as 16:9. However, forcing 16:9 shows that the resulting video is actually stretched horizontally. Also, it seems like I obtain the exact same result as you if I skip the first scaling to 1024x288, and hence if I use: `ffmpeg -i in.avi -vf pad=720x576:0:144 -target pal-dvd out.mpg`.  
  > **username_1**: Add `setsar=1` after the pad in my command and check.  
  > **username_0**: If I add setsar=1, to your command, I do not need any more to force the aspect ratio in rhe video player to 16:9 (it is automatically detected), but the video is still stretched horizontally... People look very fat :-).  
  > **username_1**: Share a screenshot: `ffmpeg -ss 300 -i in.avi -vf setsar=1 -vframes 1 out.png`  
  > **username_0**: Here it is: https://www.dropbox.com/s/7cluw19xmq26hvb/out.png?dl=0  
  
  ---
  
  