Opened 12 years ago

Last modified 12 years ago

#2434 new defect

-target pal-dvd incorrectly forces 704x576 to 720x576

Reported by: Francois Visagie Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: dvd
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The '-target pal-dvd' option incorrectly scales 704x576/480 to 720x576/480. For Rec.601-sourced video with 59:54 pixel aspect ratio a horizontal resolution of 704 pixels is required to produce undistorted output to 4:3 and 16:9 display aspect ratios. The DVD Video standard makes provision for authoring in this resolution, e.g. http://en.wikipedia.org/wiki/Dvd_video and http://www.videohelp.com/dvd. However, this behaviour (of '-target pal-dvd' at least) makes it impossible to produce undistorted output.
How to reproduce:

C:\Users\fvisagie\Videos\Home Videos\Testing\Sony DCR-TRV330E>ffmpeg -i New.avs -target pal-dvd -aspect 4:3 New.avs.mpg
ffmpeg version N-51511-g599866f Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr  1 2013 12:44:46 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 24.100 / 52. 24.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, avisynth, from 'New.avs':
  Duration: 00:01:57.28, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 704x576, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, dvd, to 'New.avs.mpg':
  Metadata:
    encoder         : Lavf55.1.100
    Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 6000 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
  Stream #0:1 -> #0:1 (pcm_s16le -> ac3)
Press [q] to stop, [?] for help
frame= 2933 fps= 22 q=2.0 Lsize=   80944kB time=00:01:57.31 bitrate=5652.3kbits/s dup=1 drop=0
video:72936kB audio:6414kB subtitle:0 global headers:0kB muxing overhead 2.009441%

Work-around:
Omit -target pal-dvd and use other options to specify a DVD-compliant encode on the command line, e.g. '-codec:a ac3 -b:a 128000 -vcodec mpeg2video -g 15 -bf 2 -bufsize 1835000 -b:v 6090000 -maxrate 9800000 -muxrate 10080000'.

Change History (3)

comment:1 by Francois Visagie, 12 years ago

For the DVD-compliant command line I meant to say:
'-codec:a ac3 -b:a 128000 -codec:v mpeg2video -g 15 -bf 2 -bufsize 1835000 -b:v 6090000 -maxrate 9800000 -muxrate 10080000'

Version 0, edited 12 years ago by Francois Visagie (next)

in reply to:  description ; comment:2 by Carl Eugen Hoyos, 12 years ago

Cc: Francois Visagie removed
Keywords: dvd added; -target pal-dvd scales 704 720 removed
Version: 1.2git-master

Replying to francois.visagie@…:

The '-target pal-dvd' option incorrectly scales 704x576/480 to 720x576/480.

This sounds unclear:
Does '-target pal-dvd' really scale 704x480 to 720x480? Or does it always scale to 720x576?
I suspect what you want - that -target pal-dvd sometimes scales to 704x576 and sometimes to 720x576 is not possible, but adding another target - pal-dvd-narrow - should be trivial, patch welcome.

in reply to:  2 comment:3 by Francois Visagie, 12 years ago

Replying to cehoyos:

Replying to francois.visagie@…:

The '-target pal-dvd' option incorrectly scales 704x576/480 to 720x576/480.

This sounds unclear:
Does '-target pal-dvd' really scale 704x480 to 720x480? Or does it always scale to 720x576?
I suspect what you want - that -target pal-dvd sometimes scales to 704x576 and sometimes to 720x576 is not possible, but adding another target - pal-dvd-narrow - should be trivial, patch welcome.

In my testing 'target pal-dvd' scales 704x576 to 720x576, and leaves 720x576 untouched. 704x576 _is_ PAL DVD - as is 720x576 - so what I want is for 'target pal-dvd' to leave both 704x576 and 720x576 unchanged. Which is what I think would make sense to other users in general.

Note: See TracTickets for help on using tickets.