LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to convert VOB file using ffmpeg ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-convert-vob-file-using-ffmpeg-4175413915/)

PayNow 06-28-2012 05:57 PM

How to convert VOB file using ffmpeg ?
 
hey guys,

i want to know how to convert .VOB to .mp4 using ffmpeg

i have do
Quote:

ffmpeg -i outss.VOB video.mp4
but see what i am getting can anyone help me ?


Code:

root@ks3092546:/var/www/video/VIDEO_TS ffmpeg -i outss.VOB video.mp4
FFmpeg version SVN-r0.5.9-4:0.5.9-1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.9-1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
  libavutil    49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat  52.31. 0 / 52.31. 0
  libavdevice  52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale    0. 7. 1 /  0. 7. 1
  libpostproc  51. 2. 0 / 51. 2. 0
  built on Jun 10 2012 08:33:06, gcc: 4.4.5

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, avi, from 'outss.VOB':
  Duration: 00:40:00.39, start: 0.000000, bitrate: 3453 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], 8000 kb/s, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to 'video.mp4':
    Stream #0.0: Video: mpeg4, yuv420p, 720x480 [PAR 32:27 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
    Stream #0.1: Audio: 0x0000, 48000 Hz, 5.1, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1
root@ks3092546:/var/www/video/VIDEO_TS

Thanks

macemoneta 06-28-2012 10:24 PM

The problem is the output audio stream; no codec was specified. If you want to copy the input audio, you can use '-acodec copy' or if you want mp3 audio you can specify '-acodec libmp3lame -ac 2 -ar 22050' for example.

Code:

ffmpeg -i outss.VOB -acodec libmp3lame -ac 2 -ar 22050 video.mp4
You can get the details for all options with 'man ffmpeg'.

PayNow 06-29-2012 05:36 AM

i am getting this error why ?

Code:

root@ks3092546:/var/www/video/VIDEO_TS# ffmpeg -i outss.VOB -acodec libmp3lame -ac 2 -ar 22050 video.mp4
FFmpeg version SVN-r0.5.9-4:0.5.9-1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.9-1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
  libavutil    49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat  52.31. 0 / 52.31. 0
  libavdevice  52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale    0. 7. 1 /  0. 7. 1
  libpostproc  51. 2. 0 / 51. 2. 0
  built on Jun 10 2012 08:33:06, gcc: 4.4.5

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mpeg, from 'outss.VOB':
  Duration: 02:13:54.91, start: 0.060000, bitrate: 4447 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], 7000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
Unknown encoder 'libmp3lame'
root@ks3092546:/var/www/video/VIDEO_TS#


David the H. 06-29-2012 08:36 AM

Why don't you start by trying to actually read the error messages and interpret what they mean?

Code:

Unknown encoder 'libmp3lame'
You apparently either don't have libmp3lame installed, or it's otherwise unlocatable, so ffmpeg can't use it.

Do you see the line at the top with all the "--enable" options? It tells you what external libraries and certain other features your version of ffmpeg has been compiled to use. Since I don't see "--enable-libmp3lame" listed, it appears you are using a version that doesn't support it. This isn't surprising. Since mp3 is a patent-encumbered codec, many Free distributions can't legally compile it into in their packages. So you'll have to find a version from a separate source that does have it enabled, or else compile your own version.

Another option is to simply use a codec that is enabled instead. mp2 is commonly available and supported by most media formats, for example. ffmpeg also has a built-in mp3 encoder of its own that might possibly be enabled (although lame is generally much better). Run "ffmpeg -codecs" for a full list of what's available to your version.

Since this is a common problem, a google search or two should turn up a source for you. Someone here might also be able to tell you if you tell us what distribution you're using.

travalon 06-29-2012 11:33 AM

Just try Handbrake
 
Handbrake found Here:http://handbrake.fr/downloads.php

schneidz 06-29-2012 01:53 PM

also, xvidenc, h264enc are good.

PayNow 06-30-2012 05:09 AM

i am using debian ssh i can't find handbreak for debian

jschiwal 06-30-2012 07:32 AM

You will want to specify the "q" range to use or the bitrate you want. The default (200k) in your example is to low for reasonable quality. Using "-sameq" is another possibility, but may result in too high of a bitrate from what you want.

Try looking for examples with Google. They are a good way to pick up esoteric options you may want to use to lower the size while not degrading quality.

DVD audio is MP2. You could use -acodec copy. The results should be acceptable.
The sweatspot for mp2 audio is "-acodec mp2 -ab 224k -ar 44100".

For mp3 audio, a sampling rate of "-ar 48k" is very common.

For most distros, there is a repository that that has restricted versions of media packages with features like mp3 builtin. You need this as well as downloading and installing the library & codecs.
I don't use Debian, but I think ftp.deb-multimedia.org may be such a repository.

David the H. 07-01-2012 10:13 AM

Yes, for fully-enabled versions of most media apps on debian, use deb-multimedia.org as your source.


Actually, dvd audio can be mp2, ac3, DTS, or raw pcm, with ac3 being the most common. The output posted above shows that that source has ac3 audio. You should be able to use -acodec copy to keep the ac3 track, but if file-size is important, you can save a few megabytes by re-encoding it to mp2 or mp3 (and if audio quality isn't important, use a lower bitrate to shave off even more).

http://en.wikipedia.org/wiki/DVD-VIDEO


All times are GMT -5. The time now is 05:26 AM.