Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2016 03:00:41 +0200
From:      Rolf Nielsen <rnmtw70@yandex.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Video DVD quality loss with mencoder/dvdauthor/growisofs
Message-ID:  <f14da89f-2e4b-69a4-2711-7d99d70d0a4d@yandex.com>
In-Reply-To: <bbf91125-74e8-bdd4-d845-26a7dd31315c@yandex.com>
References:  <20160815013606.896d920c.freebsd@edvax.de> <bbf91125-74e8-bdd4-d845-26a7dd31315c@yandex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Reposting to include the list (apologies).

On 2016-08-15 02:54, Rolf Nielsen wrote:
> 
> 
> On 2016-08-15 01:36, Polytropon wrote:
>> Currently I'm searching for a way to create MPEG files suitable
>> for creating movie DVDs. My source files are SD videos with the
>> following properties:
>>
>> 	container: AVI
>> 	video: DivX DX50, 640x360 px, 24 bpp, 25 fps
>> 	audio: MP3, 44.1 kHz, 2 ch, 128 kbps
>>
>> I'd like to "inflate" the video for DVD resolution. When I use
>> mencoder to do so, the graphics gets "blocky". There are no
>> visible compression artifacts in the source video, but the
>> result is really terrible. I know I cannot "increase quality"
>> when doing 640x360 -> 704x576, but it should not get worse.
>>
>> My solution is a script "avi2dvd" which uses mencoder, dvdauthor
>> and growisofs to prepare the required data structures and then
>> burn them onto DVD+R media. The DVD players I tested them with
>> play the result format, but show the "blocky" video just like
>> a software player (both by checking the .mpg and .vob files),
>> so the postprocessing steps do not introduce that significant
>> quality loss.
>>
>> At its heart, the script contains this step:
>>
>> 	mencoder -oac lavc -ovc lavc -of mpeg -ofps 25 \
>> 		-mpegopts format=dvd -vf scale=704:576,harddup \
>> 		-af lavcresample=44100 -srate 44100 \
>> 		-lavcopts vcodec=mpeg2video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 \
>> 		-o ${MPEGFILE} ${AVIFILE}
>>
>> This reflects the parameters I got from the mplayer documentation
>> on the web where this approach is listed for creating DVD files.
>> But as I said: The quality is terrible.
>>
>> (Sidenote: I will additionally need to experiment with -vf crop
>> in order to deal with mis-aligned video sources.)
>>
>> Can anyone provide a _verified_ method that _does not lower_ the
>> resulting video quality?
>>
>>
>>
> 
> Try -sws 9 -vf scale=704:576:0:0:10,harddup,pp=ac and see if that helps.
> 
> -sws 9 selects lanczos filter for scaling, and the 10 at the end of the
> scale filter does some settings with lanczos (I don't remember exactly
> which, but the result looks awful without it), and the pp=ac is a post
> processing filter that should reduce blockiness.
> 
> And btw, DVD video requires the audio tracks to be 48000 Hz.
> 

-- 
Vänligen / Sincerely,
Rolf Nielsen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f14da89f-2e4b-69a4-2711-7d99d70d0a4d>