Hello ,
how to convert .avi file to .mpg with the exact quality of the original file ?
tried:but it wasnt the same qualityffmpeg -i input.avi output.mpg
Hello ,
how to convert .avi file to .mpg with the exact quality of the original file ?
tried:but it wasnt the same qualityffmpeg -i input.avi output.mpg
This is a nice how-to: http://howto-pages.org/ffmpeg/
But yeah the container/codec relationship can be confusing, in your case I guess you want to change the container type but keep the same codec whatever that is, on the file if you right-click>properties>Audio/Video what does it show for a codec?
I'm not much help but at least a bump.
Hardware: Intel Core 2 Quad 2.4GHz/ 4GB DDR2 800MHz RAM/ nVidia 9600GT 512MB/ Gigabyte GA-P35-S3G
That fuzzy feeling in your head is your brain working, thanks to Linux!
Some will be lost but if you know what you're doing it can be negligible
Code:ffmpeg -i input.avi -sameq -vcodec -libx264 -acodec libfaac ouput.mp4
Here is what i got:
well i guess that is the main reason: Unknown encoder 'libx264'Code:ffmpeg -i *.avi -sameq -vcodec libx264 -acodec libmp3lame output.mpg FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5+svn20090706-2ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 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 Aug 26 2009 09:45:20, gcc: 4.4.1 Input #0, avi, from 'Earth 2009 DVDRip XviD.avi': Duration: 01:35:00.04, start: 0.000000, bitrate: 1027 kb/s Stream #0.0: Video: mpeg4, yuv420p, 608x336 [PAR 1:1 DAR 38:21], 25 tbr, 25 tbn, 25 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 80 kb/s Unknown encoder 'libx264'
IC , i have to manually install x264
i'll install it and give a try
Last edited by rashwan; October 4th, 2009 at 10:09 PM.
You can use VLC media player, start VLC then do this:
Media>Open File (choose the media file you want to convert)>Convert (bottom right corner drop down box arrow, next to the "Play" button)>Profile (choose Windows wmv/asf)>Save
It will, I assume, convert it to the correct container and codec or you can actually choose which container, video codec and audio codec you want by manually selecting each from the Profile tabs.
I'm converting a Diggnation h.264 mp4 to a wmv (asf codec?)right now I'll let you know how it works out.
edit: As Supersonic mentioned I'm pretty sure you'll lose some quality since you're converted something again and it will probably degrade the quality.
Last edited by dhughes; October 4th, 2009 at 10:42 PM.
Hardware: Intel Core 2 Quad 2.4GHz/ 4GB DDR2 800MHz RAM/ nVidia 9600GT 512MB/ Gigabyte GA-P35-S3G
That fuzzy feeling in your head is your brain working, thanks to Linux!
Hi rashwan,
Is there a particular reason that you are after mpg? This imposes some pretty substantial limitations on your encoding options that would not be seen in containers like mp4 or matroska. The default codecs for such an encode under FFmpeg, which is what you have seen, are mpeg1video audio and mp2 audio.
Andrew
You think that's air you're breathing now?
The -sameq option is not compatible with libx264. Also, I believe the mpg container format does not officially support H.264 video. If you want to encode H.264 video using libx264 you should be using the libx264 presets:
You can see more examples at FFmpeg x264 encoding guide. Ubuntu Jaunty Jackalope 9.04 can use the presets, but restricted encoders need to be enabled:Code:ffmpeg -i input.avi -acodec libfaac -ab 128k -vcodec libx264 -vpre hq -crf 24 -threads 0 output.mp4
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg
Ubuntu Karmic Koala 9.10 removed libfaac support from FFmpeg due to ambiguous license issues, so you will need to compile FFmpeg to take advantage of encoding to AAC audio:
HOWTO: Install and use the latest FFmpeg and x264
I'm guessing you're using Ubuntu Karmic Koala 9.10. You do not need to manually install x264, but instead you can install libavcodec-extra-52. This package will enable restricted encoders in FFmpeg including libx264, but not libfaac as you can see in my threads above. Right now I recommend Karmic users to compile their own FFmpeg to gain access to AAC encoding.
Last edited by FakeOutdoorsman; October 5th, 2009 at 05:27 AM. Reason: now = not
Bookmarks