From owner-freebsd-questions@freebsd.org Sun Aug 14 23:36:16 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE399BB97E1 for ; Sun, 14 Aug 2016 23:36:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77E1C1CB9 for ; Sun, 14 Aug 2016 23:36:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-32-240.dynamic.qsc.de [92.195.32.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 7A81E2774D for ; Mon, 15 Aug 2016 01:36:07 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u7ENa6En003098 for ; Mon, 15 Aug 2016 01:36:06 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 15 Aug 2016 01:36:06 +0200 From: Polytropon To: FreeBSD Questions Subject: Video DVD quality loss with mencoder/dvdauthor/growisofs Message-Id: <20160815013606.896d920c.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 23:36:16 -0000 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? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...