um3k
28th July 2011, 17:30
I'm trying to transcode a video from WMV to MPEG2 with ffmpeg, but I'm experiencing a strange problem where it is not saving the aspect ratio I set. Here's an example of the command line I'm using, called from a PHP script:
ffmpeg -i theShow72.wmv -target ntsc-dvd -b 2500k -aspect 1.7777 L:/theShow72.mpg 2>&1
And here's what I'm guessing is the relevant part of ffmpeg's output:
[0] => FFmpeg version SVN-r23418, Copyright (c) 2000-2010 the FFmpeg developers
[1] => built on Jun 2 2010 04:12:01 with gcc 4.4.2
[2] => configuration: *snip*
[3] => libavutil 50.16. 0 / 50.16. 0
[4] => libavcodec 52.72. 1 / 52.72. 1
[5] => libavformat 52.67. 0 / 52.67. 0
[6] => libavdevice 52. 2. 0 / 52. 2. 0
[7] => libavfilter 1.20. 0 / 1.20. 0
[8] => libswscale 0.11. 0 / 0.11. 0
[9] => [asf @ 01bcd430]ff asf skip 960 (unknown stream)
[10] =>
[11] => Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
[12] => Last message repeated 8 times
[13] => Input #0, asf, from 'theShow72.wmv':
[14] => Metadata:
[15] => WM/ParentalRating: 16+
[16] => WMFSDKVersion : 9.00.00.4509
[17] => WMFSDKNeeded : 0.0.0.0000
[18] => IsVBR : 0
[19] => title : the Blurry Dude show
[20] => author :
[21] => copyright : 2010
[22] => comment :
[23] => Duration: 01:00:08.02, start: 5.064000, bitrate: 335 kb/s
[24] => Stream #0.0: Audio: wmav2, 32000 Hz, 2 channels, s16, 40 kb/s
[25] => Stream #0.1: Video: wmv3, yuv420p, 480x270, 29.97 tbr, 1k tbn, 1k tbc
[26] => [scale @ 02faaac0]w:480 h:270 fmt:yuv420p -> w:720 h:480 fmt:yuv420p flags:0x4
[27] => [ac3 @ 02f4f070]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[28] => Output #0, dvd, to 'L:/theShow72.mpg':
[29] => Metadata:
[30] => encoder : Lavf52.67.0
[31] => Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], q=2-31, 2500 kb/s, 90k tbn, 29.97 tbc
[32] => Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
[33] => Stream mapping:
[34] => Stream #0.1 -> #0.0
[35] => Stream #0.0 -> #0.1
[36] => Press [q] to stop encoding\
...
[41] => frame=107972 fps=134 q=2.0 size= 803028kB time=3602.63 bitrate=1826.0kbits/s dup=19226 drop=0
frame=107989 fps=134 q=2.0 Lsize= 803210kB time=3603.20 bitrate=1826.1kbits/s dup=19239 drop=0
[42] => video:577049kB audio:197057kB global headers:0kB muxing overhead 3.759726%
And here is the MediaInfo of the output file:
General
CompleteName : L:\theShow72.mpg
Format : MPEG-PS
FileSize/String : 784 MiB
Duration/String : 1h 0mn
OverallBitRate/String : 1826 Kbps
Video
ID/String : 224 (0xE0)
Format : MPEG Video
Format_Version : Version 2
Format_Profile : Main@Main
Format_Settings_BVOP/String : No
Format_Settings_Matrix/String : Default
Format_Settings_GOP : M=1, N=18
Duration/String : 1h 0mn
BitRate_Mode/String : VBR
BitRate/String : 1342 Kbps
BitRate_Maximum/String : 9000 Kbps
Width/String : 720 pixel3
Height/String : 480 pixel3
DisplayAspectRatio/String : 3:2
FrameRate/String : 29.970 fps3
Standard : NTSC
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8 bit3
ScanType/String : Progressive
Compression_Mode/String : Lossy
Bits-(Pixel*Frame) : 0.130
StreamSize/String : 576 MiB (73%)
Audio
ID/String : 189 (0xBD)-128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Format_Settings_ModeExtension : CM (complete main)
MuxingMode : DVD-Video
Duration/String : 1h 0mn
BitRate_Mode/String : CBR
BitRate/String : 448 Kbps
Channel(s)/String : 2 channel2
ChannelPositions : Front: L R
SamplingRate/String : 48.0 KHz
BitDepth/String : 16 bit3
Compression_Mode/String : Lossy
StreamSize/String : 192 MiB (25%)
Menu
As you can see, for some reason the aspect ratio setting is not saved in the output file. I've tried using 16:9 instead of 1.7777, no dice. Any suggestions?
EDIT: By the way, this is under Windows 7 Home Premium 64 bit, not sure if that's at all relevant.
ffmpeg -i theShow72.wmv -target ntsc-dvd -b 2500k -aspect 1.7777 L:/theShow72.mpg 2>&1
And here's what I'm guessing is the relevant part of ffmpeg's output:
[0] => FFmpeg version SVN-r23418, Copyright (c) 2000-2010 the FFmpeg developers
[1] => built on Jun 2 2010 04:12:01 with gcc 4.4.2
[2] => configuration: *snip*
[3] => libavutil 50.16. 0 / 50.16. 0
[4] => libavcodec 52.72. 1 / 52.72. 1
[5] => libavformat 52.67. 0 / 52.67. 0
[6] => libavdevice 52. 2. 0 / 52. 2. 0
[7] => libavfilter 1.20. 0 / 1.20. 0
[8] => libswscale 0.11. 0 / 0.11. 0
[9] => [asf @ 01bcd430]ff asf skip 960 (unknown stream)
[10] =>
[11] => Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
[12] => Last message repeated 8 times
[13] => Input #0, asf, from 'theShow72.wmv':
[14] => Metadata:
[15] => WM/ParentalRating: 16+
[16] => WMFSDKVersion : 9.00.00.4509
[17] => WMFSDKNeeded : 0.0.0.0000
[18] => IsVBR : 0
[19] => title : the Blurry Dude show
[20] => author :
[21] => copyright : 2010
[22] => comment :
[23] => Duration: 01:00:08.02, start: 5.064000, bitrate: 335 kb/s
[24] => Stream #0.0: Audio: wmav2, 32000 Hz, 2 channels, s16, 40 kb/s
[25] => Stream #0.1: Video: wmv3, yuv420p, 480x270, 29.97 tbr, 1k tbn, 1k tbc
[26] => [scale @ 02faaac0]w:480 h:270 fmt:yuv420p -> w:720 h:480 fmt:yuv420p flags:0x4
[27] => [ac3 @ 02f4f070]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[28] => Output #0, dvd, to 'L:/theShow72.mpg':
[29] => Metadata:
[30] => encoder : Lavf52.67.0
[31] => Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], q=2-31, 2500 kb/s, 90k tbn, 29.97 tbc
[32] => Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
[33] => Stream mapping:
[34] => Stream #0.1 -> #0.0
[35] => Stream #0.0 -> #0.1
[36] => Press [q] to stop encoding\
...
[41] => frame=107972 fps=134 q=2.0 size= 803028kB time=3602.63 bitrate=1826.0kbits/s dup=19226 drop=0
frame=107989 fps=134 q=2.0 Lsize= 803210kB time=3603.20 bitrate=1826.1kbits/s dup=19239 drop=0
[42] => video:577049kB audio:197057kB global headers:0kB muxing overhead 3.759726%
And here is the MediaInfo of the output file:
General
CompleteName : L:\theShow72.mpg
Format : MPEG-PS
FileSize/String : 784 MiB
Duration/String : 1h 0mn
OverallBitRate/String : 1826 Kbps
Video
ID/String : 224 (0xE0)
Format : MPEG Video
Format_Version : Version 2
Format_Profile : Main@Main
Format_Settings_BVOP/String : No
Format_Settings_Matrix/String : Default
Format_Settings_GOP : M=1, N=18
Duration/String : 1h 0mn
BitRate_Mode/String : VBR
BitRate/String : 1342 Kbps
BitRate_Maximum/String : 9000 Kbps
Width/String : 720 pixel3
Height/String : 480 pixel3
DisplayAspectRatio/String : 3:2
FrameRate/String : 29.970 fps3
Standard : NTSC
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8 bit3
ScanType/String : Progressive
Compression_Mode/String : Lossy
Bits-(Pixel*Frame) : 0.130
StreamSize/String : 576 MiB (73%)
Audio
ID/String : 189 (0xBD)-128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Format_Settings_ModeExtension : CM (complete main)
MuxingMode : DVD-Video
Duration/String : 1h 0mn
BitRate_Mode/String : CBR
BitRate/String : 448 Kbps
Channel(s)/String : 2 channel2
ChannelPositions : Front: L R
SamplingRate/String : 48.0 KHz
BitDepth/String : 16 bit3
Compression_Mode/String : Lossy
StreamSize/String : 192 MiB (25%)
Menu
As you can see, for some reason the aspect ratio setting is not saved in the output file. I've tried using 16:9 instead of 1.7777, no dice. Any suggestions?
EDIT: By the way, this is under Windows 7 Home Premium 64 bit, not sure if that's at all relevant.