LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-14-2011, 08:34 AM   #1
sylye
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Centos 5.x,6.x,Slackware 13.37,14.0,14.1
Posts: 49

Rep: Reputation: 1
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.
 
Old 08-14-2011, 09:08 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 08-14-2011, 09:20 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,918

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
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.
 
Old 08-14-2011, 10:48 AM   #4
sylye
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Centos 5.x,6.x,Slackware 13.37,14.0,14.1
Posts: 49

Original Poster
Rep: Reputation: 1
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
 
Old 08-14-2011, 11:21 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,130

Rep: Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202Reputation: 4202
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.
 
Old 08-14-2011, 11:22 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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
 
Old 08-15-2011, 12:39 PM   #7
sylye
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Centos 5.x,6.x,Slackware 13.37,14.0,14.1
Posts: 49

Original Poster
Rep: Reputation: 1
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)
 
Old 08-15-2011, 01:08 PM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg.SlackBuild: line 194: cd: /tmp/SBo/package-ffmpeg/usr/man: No such file or dir darkstarbyte Linux - Software 7 12-29-2010 05:45 PM
Install FFMPEG and FFMPEG-PHP on fedora10 & 12 cks Linux - Server 2 09-17-2010 01:55 PM
[SOLVED] ffmpeg slackbuild error for slackware 13.1 el_jauzaa Slackware 9 06-16-2010 03:45 AM
Help me in installing ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encod mitesh.ever Red Hat 5 05-16-2009 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration