Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
16th December 2010, 08:02 | #1 | Link |
Registered User
Join Date: Jun 2007
Posts: 48
|
Macroblocking problem in downconverted MPEG2, need ffmpeg help
I have a source AVC video as follows:
Code:
Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 8 frames Muxing mode : Container profile=Unknown@4.1 Codec ID : V_MPEG4/ISO/AVC Duration : 1h 34mn Bit rate : 2 460 Kbps Width : 1 280 pixels Height : 688 pixels Display aspect ratio : 1.850 Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.117 Code:
ffmpeg -i INPUT.mp4 -f dvd -vcodec mpeg2video -s 720x462 -aspect 16:9 -vf "pad=720:480:0:9" -b 2800k -minrate 2800k -maxrate 3200k -bufsize 1835k -g 12 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -bf 2 -flags qprd -flags mv0 -flags2 skiprd OUTPUT.mpg Code:
Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : Yes Format settings, Matrix : Default Format settings, GOP : M=3, N=12 Duration : 1h 34mn Bit rate mode : Variable Bit rate : 3 200 Kbps Width : 720 pixels Height : 480 pixels Display aspect ratio : 16:9 Frame rate : 23.976 fps Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.386 |
16th December 2010, 09:15 | #3 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,993
|
Looks like he's doing VBR to me, but not very smart VBR.
I'd set minrate to 500k, maxrate to 9000k, and avg to at least 4000k if possible... 2800 is very low for full resolution SD MPEG-2. 1h 34m should afford you at least 6mbps even on a DVD5. Why such a low bitrate? Derek
__________________
These are all my personal statements, not those of my employer :) Last edited by Blue_MiSfit; 16th December 2010 at 09:17. |
18th December 2010, 11:17 | #4 | Link | |
Registered User
Join Date: Jun 2007
Posts: 48
|
Quote:
I will try your suggestions above, but do you know of any options that reduce blockyness or are you saying that it could be because of the way I specified the VBR rates? I will try anyway and let you know. |
|
18th December 2010, 12:20 | #5 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
Try Blue_MisFit's settings with your average bitrate of 2800 kbps. And use 2-pass encoding if you want high-quality output at a fixed size! |
|
18th December 2010, 20:11 | #6 | Link |
Registered User
Join Date: Jun 2007
Posts: 48
|
I reencoded using Blue_MisFit's tips and it worked, no blockiness. I was misunderstanding how VBR should be setup.
Regarding 2 pass mode, I also kind of forgot about using this. Can you confirm that my understanding of it is correct per below example? Is the -fs necessary to get the target filesize, or just use the bitrate to control it? Pass 1: Code:
ffmpeg -i INPUT.mp4 -f dvd -fs 2200000000 -vcodec mpeg2video -s 720x462 -aspect 16:9 -vf "pad=720:480:0:9" -b 2800k -minrate 500k -maxrate 9000k -bufsize 1835k -g 12 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -bf 2 -flags qprd -flags mv0 -flags2 skiprd -an -pass 1 -y /dev/null Code:
ffmpeg -i INPUT.mp4 -f dvd -fs 2200000000 -vcodec mpeg2video -s 720x462 -aspect 16:9 -vf "pad=720:480:0:9" -b 2800k -minrate 500k -maxrate 9000k -bufsize 1835k -g 12 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -bf 2 -flags qprd -flags mv0 -flags2 skiprd -pass 2 OUTPUT.mpg Last edited by mocham; 18th December 2010 at 20:17. |
19th December 2010, 01:22 | #7 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
There will also be some overhead in the MPEG-PS format that you might need to consider. Last edited by nm; 19th December 2010 at 01:25. |
|
Tags |
avc, downconvert, dvd, ffmpeg, mpg |
Thread Tools | Search this Thread |
Display Modes | |
|
|