2

I'm trying to create a DVD from a .wmv file. It is very important to keep the current .wmv's quality when the DVD is created.

I'm sure ffmpeg --as almighty as it is-- can do the job. Right know I'm just issuing the dumbest command ffmpeg -i input.wmv output.vob and it's already working. The problem is that major quality is lost. I've read some questions here about the topic but none had helped. I'm reading ffmpeg's doc as well but they take a while (because are pretty long :) )

Can someone provide me a shortcut?

Paulo Bu
  • 288
  • 3
  • 8

1 Answers1

2

ffmpeg has a -target option as a set-and-forget means to create DVDs, VCDs, etc. Basically, you can just use this if you need a PAL standard DVD:

ffmpeg -i input.wmv -target pal-dvd output.vob

Or use ntsc-dvd for NTSC. The -target option ensures that all criteria for compliance are met.

Now, you're losing quality during conversion. The problem is… this is absolutely expected. Depending on the original quality of the WMV file (its frame size, frame rate, compression, …) and the type of content you're encoding, a certain amount of generation loss is guaranteed.

Unless you have a better version of the original, the only choice you have is setting the bitrate manually. By default, ffmpeg uses 6,000 kBit/s (that's kilobits, not kibibits, AFAICT) for the MPEG-2 video stream that the DVD needs (-b:v 6000000). It also sets -maxrate 9000000 and -bufsize 1835008. If you want better video quality, you can increase the bitrate.

You must, however, guarantee that the file size doesn't become too large to fit the DVD. You can calculate this yourself, of course, taking into account the video length. You also need to factor in the audio stream with a bitrate of 448000, and a bit of container overhead (the percentage of which I don't know by heart, but it should be negligible).

Don't forget that you can always stop an encoding process by pressing Q. You can then inspect the file visually without wasting precious time on encoding a movie you don't like, quality-wise.

slhck
  • 223,558
  • 70
  • 607
  • 592
  • Thanks, your answer is very good. I am no audio experts so terms like `bitrates, audio stream, video stream` don't tell me much. Do I need to increase deliberately those values you provide me, or by some factor? Are these values what you're suggesting me or just the ffmpeg's defaults? – Paulo Bu Nov 07 '13 at 16:07
  • Well, actually I just issued `ffmpeg -i input.wmv -target pal-dvd output.vob` and the quality I got seems **very** improved. – Paulo Bu Nov 07 '13 at 16:10
  • I'm glad it already improved. The values I mentioned are the defaults you get when you set `-target pal-dvd`. You can increase them, but at some point you're going to get a video too large for the DVD. If you're really new to this topic, maybe have a look at: [What is a Codec (e.g. DivX?), and how does it differ from a File Format (e.g. MPG)?](http://superuser.com/questions/300897/) – slhck Nov 07 '13 at 16:22
  • I'll read the link. I'm also accepting your answer. You're very kind. Thanks for your time. – Paulo Bu Nov 07 '13 at 16:24
  • Sure thing! Actually, I just remembered I wrote a blog article about FFmpeg – if you're really new to it and want a quick overview of the options, it should be a good introduction: [FFmpeg: The ultimate Video and Audio Manipulation Tool](http://blog.superuser.com/2012/02/24/ffmpeg-the-ultimate-video-and-audio-manipulation-tool/) – slhck Nov 07 '13 at 16:26
  • Ok I'll read it as well. I enjoy the topic. The other answer you posted is almost a blog entry as well ;) I'll read them both. Are you a core developer of ffmpeg? – Paulo Bu Nov 07 '13 at 16:30
  • No, not really. I'm just a guy who loves the tool and wants to help out others using it :) By the way, when you have a problem with a command, it's always helpful to include the full console output as well, so we have a better idea of what you're talking about. Just in case you have questions in the future. – slhck Nov 07 '13 at 16:34
  • @PauloBu There is also `-target ntsc-dvd` if your source or output is more suitable for NTSC video frame rate (often called 29.97 frames per second, but more a accurate description is 30000/1001). – llogan Nov 07 '13 at 19:20
  • @LordNeckbeard I know, I read about it, thanks for the heads up! Actually, it is. – Paulo Bu Nov 07 '13 at 19:25