Correct aspect ratio without re-encoding video file











up vote
8
down vote

favorite
1












I have a video stream with the following properties:



Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1908 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc


When I run it in VLC, I have to press "A" to change aspect ratio to "4:3" to make the video show with the correct aspect ratio.



Looking at the video facts, Is the error that a) the actual video has been incorrectly stretched in the pixel data, or b) there is simply some metadata value that has been incorrectly set?



If the former, I know I can re-encode the video and change the width and height. But if the latter, what ffmpeg command to I run to fix the metadata without re-encoding the video itself?










share|improve this question


























    up vote
    8
    down vote

    favorite
    1












    I have a video stream with the following properties:



    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1908 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc


    When I run it in VLC, I have to press "A" to change aspect ratio to "4:3" to make the video show with the correct aspect ratio.



    Looking at the video facts, Is the error that a) the actual video has been incorrectly stretched in the pixel data, or b) there is simply some metadata value that has been incorrectly set?



    If the former, I know I can re-encode the video and change the width and height. But if the latter, what ffmpeg command to I run to fix the metadata without re-encoding the video itself?










    share|improve this question
























      up vote
      8
      down vote

      favorite
      1









      up vote
      8
      down vote

      favorite
      1






      1





      I have a video stream with the following properties:



      Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1908 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc


      When I run it in VLC, I have to press "A" to change aspect ratio to "4:3" to make the video show with the correct aspect ratio.



      Looking at the video facts, Is the error that a) the actual video has been incorrectly stretched in the pixel data, or b) there is simply some metadata value that has been incorrectly set?



      If the former, I know I can re-encode the video and change the width and height. But if the latter, what ffmpeg command to I run to fix the metadata without re-encoding the video itself?










      share|improve this question













      I have a video stream with the following properties:



      Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1908 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc


      When I run it in VLC, I have to press "A" to change aspect ratio to "4:3" to make the video show with the correct aspect ratio.



      Looking at the video facts, Is the error that a) the actual video has been incorrectly stretched in the pixel data, or b) there is simply some metadata value that has been incorrectly set?



      If the former, I know I can re-encode the video and change the width and height. But if the latter, what ffmpeg command to I run to fix the metadata without re-encoding the video itself?







      ffmpeg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 30 '15 at 6:24









      forthrin

      50831024




      50831024






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          22
          down vote



          accepted










          There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will either need to change the actual pixels in the image (by scaling the pixels and changing SAR), or by setting a metadata flag that at the container level that tells external media players to stretch the image to your desired DAR.



          You will not be able to scale the pixels and change SAR without applying a video filter. If you choose this method, you will be required to transcode the file - since you cannot "stream copy" the video stream while applying a video filter.



          To scale the image and change SAR (while transcoding), try:



          ffmpeg -i <INPUT_FILE> -vf scale=720:540 -c:v <Video_Codec> <OUTPUT_FILE>



          On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. to do this, try:



          ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]






          share|improve this answer























          • Excellent! Changing the aspect worked straight away!
            – forthrin
            Apr 30 '15 at 18:04








          • 1




            You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
            – LordNeckbeard
            Apr 30 '15 at 18:56










          • @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
            – Lumi
            Jan 3 '16 at 14:10










          • didn't work for me for MPEG2 without reencoding
            – Mikhail V
            Jul 1 '16 at 11:33










          • I don't know why it didn't work for me. It just outputs the same video!
            – Tina J
            Jul 22 '16 at 1:02


















          up vote
          2
          down vote













          ffmpeg can't change parameters of a video stream without re-encoding, MP4Box (part of gpac) and mkvmerge can. In case of one video stream and a real/correct aspect ratio of 4:3, you may want to try:



          MP4Box -par 1=3:4 VideoFile.mp4

          "-par" : PixelAspectRatio (adjusts DAR + SAR with respect to the video resolution)
          "1"= : stream number
          "3:4" : aspect ratio (lower number 1st!)
          Changes are directly applied to "VideoFile.mp4", no copy


          To verify before and after: ffmpeg -i VideoFile.mp4






          share|improve this answer






























            up vote
            1
            down vote













            Delgado's answer is correct that MP4Box can do this, but the -par option doesn't work quite as described. With an -out parameter (so as not to disturb your original file):



            mp4box source.mp4 -out target.mp4 -par stream-number=width:height


            When you use -par stream-number=width:height, you define the pixel aspect ratio – that is, the result of dividing the device aspect ratio by the storage aspect ratio. (Equivalently, you're describing the aspect ratio of a source pixel.) For example, suppose you have a DVD source that's 720×480, and the correct display aspect ratio is 4:3. For this case, you need:



            mp4box source.mp4 -out target.mp4 -par 1=8:9


            because (4/3) / (720/480) = 8/9.



            If the source represents true SD NTSC pixels (in which case only the central 704×480 pixels are supposed to map to a 4×3 screen, with 8 pixels overscan on either side), the correct command would be:



            mp4box source.mp4 -out target.mp4 -par 1=10:11


            because (4/3) / (704/480) = 10/11 – exactly the reference pixel aspect ratio for standard definition NTSC video.



            For the case given in the question, if it's really 4:3, that gives a very odd pixel aspect ratio: (4/3)/(720/416) = 104/135. It's 720 wide, which suggests a DVD source; it's a 25 fps video, suggesting PAL, but the PAR works out to less than 1, suggesting NTSC. It could be 4:5, I suppose (very close to 104:135), but I don't know of anything that produces that pixel aspect ratio; maybe try that first, and then try 3:4 if it still looks a little too stretched horizontally. If you're certain it's exactly 4:3, of course, just use 104:135.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f907933%2fcorrect-aspect-ratio-without-re-encoding-video-file%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              22
              down vote



              accepted










              There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will either need to change the actual pixels in the image (by scaling the pixels and changing SAR), or by setting a metadata flag that at the container level that tells external media players to stretch the image to your desired DAR.



              You will not be able to scale the pixels and change SAR without applying a video filter. If you choose this method, you will be required to transcode the file - since you cannot "stream copy" the video stream while applying a video filter.



              To scale the image and change SAR (while transcoding), try:



              ffmpeg -i <INPUT_FILE> -vf scale=720:540 -c:v <Video_Codec> <OUTPUT_FILE>



              On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. to do this, try:



              ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]






              share|improve this answer























              • Excellent! Changing the aspect worked straight away!
                – forthrin
                Apr 30 '15 at 18:04








              • 1




                You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
                – LordNeckbeard
                Apr 30 '15 at 18:56










              • @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
                – Lumi
                Jan 3 '16 at 14:10










              • didn't work for me for MPEG2 without reencoding
                – Mikhail V
                Jul 1 '16 at 11:33










              • I don't know why it didn't work for me. It just outputs the same video!
                – Tina J
                Jul 22 '16 at 1:02















              up vote
              22
              down vote



              accepted










              There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will either need to change the actual pixels in the image (by scaling the pixels and changing SAR), or by setting a metadata flag that at the container level that tells external media players to stretch the image to your desired DAR.



              You will not be able to scale the pixels and change SAR without applying a video filter. If you choose this method, you will be required to transcode the file - since you cannot "stream copy" the video stream while applying a video filter.



              To scale the image and change SAR (while transcoding), try:



              ffmpeg -i <INPUT_FILE> -vf scale=720:540 -c:v <Video_Codec> <OUTPUT_FILE>



              On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. to do this, try:



              ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]






              share|improve this answer























              • Excellent! Changing the aspect worked straight away!
                – forthrin
                Apr 30 '15 at 18:04








              • 1




                You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
                – LordNeckbeard
                Apr 30 '15 at 18:56










              • @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
                – Lumi
                Jan 3 '16 at 14:10










              • didn't work for me for MPEG2 without reencoding
                – Mikhail V
                Jul 1 '16 at 11:33










              • I don't know why it didn't work for me. It just outputs the same video!
                – Tina J
                Jul 22 '16 at 1:02













              up vote
              22
              down vote



              accepted







              up vote
              22
              down vote



              accepted






              There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will either need to change the actual pixels in the image (by scaling the pixels and changing SAR), or by setting a metadata flag that at the container level that tells external media players to stretch the image to your desired DAR.



              You will not be able to scale the pixels and change SAR without applying a video filter. If you choose this method, you will be required to transcode the file - since you cannot "stream copy" the video stream while applying a video filter.



              To scale the image and change SAR (while transcoding), try:



              ffmpeg -i <INPUT_FILE> -vf scale=720:540 -c:v <Video_Codec> <OUTPUT_FILE>



              On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. to do this, try:



              ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]






              share|improve this answer














              There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will either need to change the actual pixels in the image (by scaling the pixels and changing SAR), or by setting a metadata flag that at the container level that tells external media players to stretch the image to your desired DAR.



              You will not be able to scale the pixels and change SAR without applying a video filter. If you choose this method, you will be required to transcode the file - since you cannot "stream copy" the video stream while applying a video filter.



              To scale the image and change SAR (while transcoding), try:



              ffmpeg -i <INPUT_FILE> -vf scale=720:540 -c:v <Video_Codec> <OUTPUT_FILE>



              On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. to do this, try:



              ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 9 '17 at 22:44

























              answered Apr 30 '15 at 18:00









              occvtech

              6001413




              6001413












              • Excellent! Changing the aspect worked straight away!
                – forthrin
                Apr 30 '15 at 18:04








              • 1




                You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
                – LordNeckbeard
                Apr 30 '15 at 18:56










              • @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
                – Lumi
                Jan 3 '16 at 14:10










              • didn't work for me for MPEG2 without reencoding
                – Mikhail V
                Jul 1 '16 at 11:33










              • I don't know why it didn't work for me. It just outputs the same video!
                – Tina J
                Jul 22 '16 at 1:02


















              • Excellent! Changing the aspect worked straight away!
                – forthrin
                Apr 30 '15 at 18:04








              • 1




                You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
                – LordNeckbeard
                Apr 30 '15 at 18:56










              • @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
                – Lumi
                Jan 3 '16 at 14:10










              • didn't work for me for MPEG2 without reencoding
                – Mikhail V
                Jul 1 '16 at 11:33










              • I don't know why it didn't work for me. It just outputs the same video!
                – Tina J
                Jul 22 '16 at 1:02
















              Excellent! Changing the aspect worked straight away!
              – forthrin
              Apr 30 '15 at 18:04






              Excellent! Changing the aspect worked straight away!
              – forthrin
              Apr 30 '15 at 18:04






              1




              1




              You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
              – LordNeckbeard
              Apr 30 '15 at 18:56




              You can't use -c copy and scale at the same time; however you can use -aspect to change the aspect ratio at the container level (but not the stream level).
              – LordNeckbeard
              Apr 30 '15 at 18:56












              @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
              – Lumi
              Jan 3 '16 at 14:10




              @LordNeckbeard, using -aspect does work for playback in ffplay, but not in WMP or MPC-HC. It adds an additional SAR/DAR item to the Stream #… info line in FFmpeg/probe/play but doesn't seem to be solution for general playback. Stretching the video with the window seems like the easiest solution for MPC-HC playback.
              – Lumi
              Jan 3 '16 at 14:10












              didn't work for me for MPEG2 without reencoding
              – Mikhail V
              Jul 1 '16 at 11:33




              didn't work for me for MPEG2 without reencoding
              – Mikhail V
              Jul 1 '16 at 11:33












              I don't know why it didn't work for me. It just outputs the same video!
              – Tina J
              Jul 22 '16 at 1:02




              I don't know why it didn't work for me. It just outputs the same video!
              – Tina J
              Jul 22 '16 at 1:02












              up vote
              2
              down vote













              ffmpeg can't change parameters of a video stream without re-encoding, MP4Box (part of gpac) and mkvmerge can. In case of one video stream and a real/correct aspect ratio of 4:3, you may want to try:



              MP4Box -par 1=3:4 VideoFile.mp4

              "-par" : PixelAspectRatio (adjusts DAR + SAR with respect to the video resolution)
              "1"= : stream number
              "3:4" : aspect ratio (lower number 1st!)
              Changes are directly applied to "VideoFile.mp4", no copy


              To verify before and after: ffmpeg -i VideoFile.mp4






              share|improve this answer



























                up vote
                2
                down vote













                ffmpeg can't change parameters of a video stream without re-encoding, MP4Box (part of gpac) and mkvmerge can. In case of one video stream and a real/correct aspect ratio of 4:3, you may want to try:



                MP4Box -par 1=3:4 VideoFile.mp4

                "-par" : PixelAspectRatio (adjusts DAR + SAR with respect to the video resolution)
                "1"= : stream number
                "3:4" : aspect ratio (lower number 1st!)
                Changes are directly applied to "VideoFile.mp4", no copy


                To verify before and after: ffmpeg -i VideoFile.mp4






                share|improve this answer

























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  ffmpeg can't change parameters of a video stream without re-encoding, MP4Box (part of gpac) and mkvmerge can. In case of one video stream and a real/correct aspect ratio of 4:3, you may want to try:



                  MP4Box -par 1=3:4 VideoFile.mp4

                  "-par" : PixelAspectRatio (adjusts DAR + SAR with respect to the video resolution)
                  "1"= : stream number
                  "3:4" : aspect ratio (lower number 1st!)
                  Changes are directly applied to "VideoFile.mp4", no copy


                  To verify before and after: ffmpeg -i VideoFile.mp4






                  share|improve this answer














                  ffmpeg can't change parameters of a video stream without re-encoding, MP4Box (part of gpac) and mkvmerge can. In case of one video stream and a real/correct aspect ratio of 4:3, you may want to try:



                  MP4Box -par 1=3:4 VideoFile.mp4

                  "-par" : PixelAspectRatio (adjusts DAR + SAR with respect to the video resolution)
                  "1"= : stream number
                  "3:4" : aspect ratio (lower number 1st!)
                  Changes are directly applied to "VideoFile.mp4", no copy


                  To verify before and after: ffmpeg -i VideoFile.mp4







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 18 at 10:16









                  Majenko

                  27k34472




                  27k34472










                  answered Feb 1 at 0:12









                  Delgado

                  291




                  291






















                      up vote
                      1
                      down vote













                      Delgado's answer is correct that MP4Box can do this, but the -par option doesn't work quite as described. With an -out parameter (so as not to disturb your original file):



                      mp4box source.mp4 -out target.mp4 -par stream-number=width:height


                      When you use -par stream-number=width:height, you define the pixel aspect ratio – that is, the result of dividing the device aspect ratio by the storage aspect ratio. (Equivalently, you're describing the aspect ratio of a source pixel.) For example, suppose you have a DVD source that's 720×480, and the correct display aspect ratio is 4:3. For this case, you need:



                      mp4box source.mp4 -out target.mp4 -par 1=8:9


                      because (4/3) / (720/480) = 8/9.



                      If the source represents true SD NTSC pixels (in which case only the central 704×480 pixels are supposed to map to a 4×3 screen, with 8 pixels overscan on either side), the correct command would be:



                      mp4box source.mp4 -out target.mp4 -par 1=10:11


                      because (4/3) / (704/480) = 10/11 – exactly the reference pixel aspect ratio for standard definition NTSC video.



                      For the case given in the question, if it's really 4:3, that gives a very odd pixel aspect ratio: (4/3)/(720/416) = 104/135. It's 720 wide, which suggests a DVD source; it's a 25 fps video, suggesting PAL, but the PAR works out to less than 1, suggesting NTSC. It could be 4:5, I suppose (very close to 104:135), but I don't know of anything that produces that pixel aspect ratio; maybe try that first, and then try 3:4 if it still looks a little too stretched horizontally. If you're certain it's exactly 4:3, of course, just use 104:135.






                      share|improve this answer



























                        up vote
                        1
                        down vote













                        Delgado's answer is correct that MP4Box can do this, but the -par option doesn't work quite as described. With an -out parameter (so as not to disturb your original file):



                        mp4box source.mp4 -out target.mp4 -par stream-number=width:height


                        When you use -par stream-number=width:height, you define the pixel aspect ratio – that is, the result of dividing the device aspect ratio by the storage aspect ratio. (Equivalently, you're describing the aspect ratio of a source pixel.) For example, suppose you have a DVD source that's 720×480, and the correct display aspect ratio is 4:3. For this case, you need:



                        mp4box source.mp4 -out target.mp4 -par 1=8:9


                        because (4/3) / (720/480) = 8/9.



                        If the source represents true SD NTSC pixels (in which case only the central 704×480 pixels are supposed to map to a 4×3 screen, with 8 pixels overscan on either side), the correct command would be:



                        mp4box source.mp4 -out target.mp4 -par 1=10:11


                        because (4/3) / (704/480) = 10/11 – exactly the reference pixel aspect ratio for standard definition NTSC video.



                        For the case given in the question, if it's really 4:3, that gives a very odd pixel aspect ratio: (4/3)/(720/416) = 104/135. It's 720 wide, which suggests a DVD source; it's a 25 fps video, suggesting PAL, but the PAR works out to less than 1, suggesting NTSC. It could be 4:5, I suppose (very close to 104:135), but I don't know of anything that produces that pixel aspect ratio; maybe try that first, and then try 3:4 if it still looks a little too stretched horizontally. If you're certain it's exactly 4:3, of course, just use 104:135.






                        share|improve this answer

























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Delgado's answer is correct that MP4Box can do this, but the -par option doesn't work quite as described. With an -out parameter (so as not to disturb your original file):



                          mp4box source.mp4 -out target.mp4 -par stream-number=width:height


                          When you use -par stream-number=width:height, you define the pixel aspect ratio – that is, the result of dividing the device aspect ratio by the storage aspect ratio. (Equivalently, you're describing the aspect ratio of a source pixel.) For example, suppose you have a DVD source that's 720×480, and the correct display aspect ratio is 4:3. For this case, you need:



                          mp4box source.mp4 -out target.mp4 -par 1=8:9


                          because (4/3) / (720/480) = 8/9.



                          If the source represents true SD NTSC pixels (in which case only the central 704×480 pixels are supposed to map to a 4×3 screen, with 8 pixels overscan on either side), the correct command would be:



                          mp4box source.mp4 -out target.mp4 -par 1=10:11


                          because (4/3) / (704/480) = 10/11 – exactly the reference pixel aspect ratio for standard definition NTSC video.



                          For the case given in the question, if it's really 4:3, that gives a very odd pixel aspect ratio: (4/3)/(720/416) = 104/135. It's 720 wide, which suggests a DVD source; it's a 25 fps video, suggesting PAL, but the PAR works out to less than 1, suggesting NTSC. It could be 4:5, I suppose (very close to 104:135), but I don't know of anything that produces that pixel aspect ratio; maybe try that first, and then try 3:4 if it still looks a little too stretched horizontally. If you're certain it's exactly 4:3, of course, just use 104:135.






                          share|improve this answer














                          Delgado's answer is correct that MP4Box can do this, but the -par option doesn't work quite as described. With an -out parameter (so as not to disturb your original file):



                          mp4box source.mp4 -out target.mp4 -par stream-number=width:height


                          When you use -par stream-number=width:height, you define the pixel aspect ratio – that is, the result of dividing the device aspect ratio by the storage aspect ratio. (Equivalently, you're describing the aspect ratio of a source pixel.) For example, suppose you have a DVD source that's 720×480, and the correct display aspect ratio is 4:3. For this case, you need:



                          mp4box source.mp4 -out target.mp4 -par 1=8:9


                          because (4/3) / (720/480) = 8/9.



                          If the source represents true SD NTSC pixels (in which case only the central 704×480 pixels are supposed to map to a 4×3 screen, with 8 pixels overscan on either side), the correct command would be:



                          mp4box source.mp4 -out target.mp4 -par 1=10:11


                          because (4/3) / (704/480) = 10/11 – exactly the reference pixel aspect ratio for standard definition NTSC video.



                          For the case given in the question, if it's really 4:3, that gives a very odd pixel aspect ratio: (4/3)/(720/416) = 104/135. It's 720 wide, which suggests a DVD source; it's a 25 fps video, suggesting PAL, but the PAR works out to less than 1, suggesting NTSC. It could be 4:5, I suppose (very close to 104:135), but I don't know of anything that produces that pixel aspect ratio; maybe try that first, and then try 3:4 if it still looks a little too stretched horizontally. If you're certain it's exactly 4:3, of course, just use 104:135.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 22 at 0:41









                          Scott

                          15.5k113789




                          15.5k113789










                          answered Nov 21 at 23:52









                          Coises

                          111




                          111






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f907933%2fcorrect-aspect-ratio-without-re-encoding-video-file%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              AnyDesk - Fatal Program Failure

                              How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

                              QoS: MAC-Priority for clients behind a repeater