Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-14-2011, 08:34 AM
|
#1
|
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Slackware 13.37
Posts: 39
Rep:
|
ffmpeg -vf in slackware
hi all my slackware friends,
I want to change my video resolution so that I could play it at my DVD player that only support smaller vid, so I tried with 'ffmpeg -vf' in slackware but apparently I got Unrecognized option '-vf'
Code:
ffmpeg -i ToriAmos-SilentAllTheseYear.mp4 -vf scale 640:480 test.mp4
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 7 2011 00:02:26 with gcc 4.4.4
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/man --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libvorbis --enable-libxvid --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-libdc1394 --enable-libfaad --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvpx --enable-libx264 --enable-runtime-cpudetect --enable-vaapi --disable-vdpau --enable-memalign-hack --enable-pthreads --enable-x11grab --enable-bzlib --enable-zlib --enable-shared --enable-static --disable-debug --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT' --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb'
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.73. 2 / 52.73. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 1 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ToriAmos-SilentAllTheseYear.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
Duration: 00:04:11.17, start: 0.000000, bitrate: 323 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 125 kb/s
Stream #0.1(und): Video: h264, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 196 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Unrecognized option '-vf'
I noticed I did have --enable-avfilter there. So anything else I'm missing ?
Do I need to recompile ? or is there other way I could rescale with ffmpeg using other option ?
P.S: I know Mencoder could do this easily, but I tend to focus and concentrate on using ffmpeg to do the job. Thanks 
Last edited by sylye; 08-14-2011 at 08:42 AM.
|
|
|
|
08-14-2011, 09:08 AM
|
#2
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,628
|
Use:
Code:
ffmpeg -i ToriAmos-SilentAllTheseYear.mp4 -vf scale=640:480 test.mp4
I would also specify a vcodec and acodec, because it may default to something else.
If you want try avidemux, it is a GUI frontend.
|
|
|
|
08-14-2011, 09:20 AM
|
#3
|
|
Senior Member
Registered: May 2008
Posts: 2,845
|
Spooky... was only listening to that yesterday (Little Earthquakes CD)
You could also try the '-target dvd' option if that is what you're sizing it for.
|
|
|
|
08-14-2011, 10:48 AM
|
#4
|
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Slackware 13.37
Posts: 39
Original Poster
Rep:
|
hi H_TexMex_H,
I tried, still can not, it gives the same error :
Code:
ffmpeg -i ToriAmos-SilentAllTheseYear.mp4 -acodec copy -vcodec copy -vf scale=640:480 test.mp4
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 7 2011 00:02:26 with gcc 4.4.4
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/man --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libvorbis --enable-libxvid --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-libdc1394 --enable-libfaad --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvpx --enable-libx264 --enable-runtime-cpudetect --enable-vaapi --disable-vdpau --enable-memalign-hack --enable-pthreads --enable-x11grab --enable-bzlib --enable-zlib --enable-shared --enable-static --disable-debug --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT' --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb'
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.73. 2 / 52.73. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 1 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ToriAmos-SilentAllTheseYear.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
Duration: 00:04:11.17, start: 0.000000, bitrate: 323 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 125 kb/s
Stream #0.1(und): Video: h264, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 196 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Unrecognized option 'vf'
I suspect the avfilter issue is the culprit but I think slackware ffmpeg should have that already, is it ? I did recompile this ffmpeg before to get the --enable-nonfree in.
@Gazl:This song is so nice, glad that we have the same taste, ha.
Any input is most welcome 
|
|
|
|
08-14-2011, 11:21 AM
|
#5
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,950
|
I would try what GazL suggested: the "-target dvd" option saves you a lot of hassle
Code:
ffmpeg -i ToriAmos-SilentAllTheseYear.mp4 -target dvd test.mpg
to scale and to convert to mpeg2 (to use for authoring a dvd) you definitely cannot use the copy option for the audio and video streams.
|
|
|
|
08-14-2011, 11:22 AM
|
#6
|
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,686
Rep: 
|
You are using a too old version of ffmpeg I think.
Try the latest release for which I have a SlackBuild script (I see your version of ffmpeg was compiled with my SlackBuild too):
http://taper.alienbase.nl/mirrors/pe...builds/ffmpeg/
It supports a whole bunch of filters now (run "ffmpeg -filters" to get a list). I could successfully scale a video using ffmpeg 0.8.2:
Code:
ffmpeg -i originalmovie.avi -vf 'scale=320:-1' outputfile.mp4
Eric
|
|
|
|
08-15-2011, 12:39 PM
|
#7
|
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Slackware 13.37
Posts: 39
Original Poster
Rep:
|
Hi Bob,
Thanks for pointing that out, it works ! I didn't realize there is a new version from you, so I in fact was compiling from the older version from 13.1. Yeah, the latest version of ffmpeg is superb, I will be exciting trying a lot of nice features from them then.
One thing I would like to know that, I did put in
Code:
--enable-libvorbis \
--enable-libxvid \
in your ffmpeg.SlackBuild this time before compile, since I recall the compiled version will not support xvid and vorbis conversion if I don't do that last time. So is that two needed this time in order to convert source into xvid and vorbis output ?
And just curious that, for all the codec needed in this while compiling, can they being stored in some place in the disk so that it could be shared with xine, vlc, or mplayer as well ? As I found out we need to have collecting them separately for different player while compiling, so is there already some way to store them centralize at some library folder and shared together among all the players ? As it's really redundant needing to find the codec differently for different players and sometime one can play certain file format while the other can't play another. I just scared I'm using some outdated way to build my mplayer, xine..etc. So if anybody already have some way to download once all the codec and shared with other players on the fly, I will be grateful to know that, thanks. (Please forgive me if this question sound silly as I basically don't know much about how all the player works with the codec thingy)
|
|
|
|
08-15-2011, 01:08 PM
|
#8
|
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,686
Rep: 
|
I never had issues with encoding to vorbis and xvid so I have no idea if that would require "--enable-libvorbis --enable-libxvid". Basically ffmpeg has its own internal vorbis and xvid implementation so it does not have to rely on these external libraries. But you may prove me wrong if you can give me an URL which shows that these additional options are needed (in which case I would add them to my script of course).
In the meantime, ffmpeg does show encoding support for vorbis as well as xvid (xvid is a variant of mpeg4):
Code:
$ ffmpeg -codecs 2>/dev/null | egrep -i "(vorbis|mpeg4)"
DEVSDT mpeg4 MPEG-4 part 2
DEVSD msmpeg4 MPEG-4 part 2 Microsoft variant version 3
D VSD msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1
DEVSD msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
DEA vorbis Vorbis
Encoding xvid video uses these parameters if you use the mpeg4 codec instead of libxvid:
Code:
ffmpeg -vcodec mpeg4 -vtag xvid
. There are some discussions on the internet about quality differences, I"d like to hear everyone's opinions on this!
The ffmpeg package installs shared libraries into your computer which can be used by other programs. However, programs like xine, mplayer and others each have their own copy of an ffmpeg version that the developers thought was most compatible to their own code, so it will not always be easy to compile these media players against a system-ffmpeg (but it is possible!).
Eric
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:08 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|