LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-24-2007, 04:33 AM   #1
/y0shi
Member
 
Registered: Jan 2006
Location: berlin, germany
Distribution: slackware 12.0
Posts: 58

Rep: Reputation: 17
ffmpeg x11grab unknown format


hi folks,

i did compile ffmpeg from
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
without any errors (as far as i am concerned)
and ffmpeg is also kind of working - i did some conversion of audiofiles ...

now i wanted to test this X11 grabbing as stated in the FFmpeg Documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC4).

so i did:
ffmpeg -f x11grab -vd x11:0.0 out.mpg

and got:
FFmpeg version SVN-r7676, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --enable-libogg --enable-mp3lame --enable-vorbis --enable-x11grab --enable-gpl
libavutil version: 49.2.0
libavcodec version: 51.29.0
libavformat version: 51.8.0
built on Jan 23 2007 23:15:59, gcc: 3.4.6
Unknown input or output format: x11grab

do i have to configure my xserver?
i run Slackware 11.0 with dri according to http://dri.freedesktop.org/wiki/Building and my xserver is running with 1024x768 and Depth 16.

i would really appreciate some help.
 
Old 01-25-2007, 02:16 PM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
I reckon you might wanna try this line:

Code:
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1280x1024 test.avi
From:
http://clemens.endorphin.org/weblog/...5T11_41_03.txt
Linked from:
http://ubuntu.wordpress.com/2006/06/...ast-in-ubuntu/
Googled from:
http://www.google.co.uk/search?q=ffm...utf-8&oe=utf-8

- Piete
 
Old 01-26-2007, 03:09 AM   #3
/y0shi
Member
 
Registered: Jan 2006
Location: berlin, germany
Distribution: slackware 12.0
Posts: 58

Original Poster
Rep: Reputation: 17
thank you for your reply, but this doesnt help - i did this allready ...
but with -s 1024x768 (i have this resolution)
i also tested the whole thing with Screen Depth 24 - no difference ...

do i need some extra libs, or do i have to patch the source?
 
Old 01-26-2007, 07:48 AM   #4
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
What does it do when you run the line i posted (with -s 1024x768) ? Exactly the same as it did before, or a different error?

If it compiled without failure (and it sounds like it did) then you shouldn't need any extra libs, because they're already there. And the source-patching malarky is only if you have old ffmpeg verions (it got included into the newer ones) - so no, no need to patch the source.

I'm just rebuilding ffmpeg with my setup and the extra x11grab option, so, i'll let you know how I get on ...

Edit:

It works fine!

Code:
CFLAGS=-fPIC ./configure  --prefix=/usr --libdir=/usr/lib64 --enable-a52 --enable-gpl \
--enable-xvid --enable-mp3lame --enable-libogg --enable-vorbis --enable-shared \
--disable-static --enable-pthreads --enable-x11grab

administrator@Melchior:~/src/ffmpeg-svn$ ffmpeg -f x11grab -vd x11:0.0 out.mpg
FFmpeg version SVN-r7716, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --prefix=/usr --libdir=/usr/lib64 --enable-a52 --enable-gpl --enable-xvid --enable-mp3lame --enable-libogg --enable-vorbis --enable-shared --disable-static --enable-pthreads --enable-x11grab 
  libavutil version: 49.2.0
  libavcodec version: 51.29.0
  libavformat version: 51.8.0
  built on Jan 26 2007 14:08:07, gcc: 3.4.3
[x11grab @ 0x2aaaaad41040]device: x11:0.0 -> display: :0.0 x: 0 y: 0 width: 0 height: 0
[x11grab @ 0x2aaaaad41040]AVParameters don't have any video size. Use -s.
Could not find video grab device

administrator@Melchior:~/src/ffmpeg-svn$ ffmpeg -f x11grab -vd x11:0.0 -s 1024x768 out.mpg
FFmpeg version SVN-r7716, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --prefix=/usr --libdir=/usr/lib64 --enable-a52 --enable-gpl --enable-xvid --enable-mp3lame --enable-libogg --enable-vorbis --enable-shared --disable-static --enable-pthreads --enable-x11grab 
  libavutil version: 49.2.0
  libavcodec version: 51.29.0
  libavformat version: 51.8.0
  built on Jan 26 2007 14:08:07, gcc: 3.4.3
File 'out.mpg' already exists. Overwrite ? [y/N] y
[x11grab @ 0x2aaaaad41040]device: x11:0.0 -> display: :0.0 x: 0 y: 0 width: 1024 height: 768
[x11grab @ 0x2aaaaad41040]shared memory extension  found
Input #0, x11grab, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, rgba32, 1024x768, 629145 kb/s, 25.00 fps(r)
Input #1, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #1.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
Output #0, mpeg, to 'out.mpg':
  Stream #0.0: Video: mpeg1video, yuv420p, 1024x768, q=2-31, 200 kb/s, 25.00 fps(c)
  Stream #0.1: Audio: mp2, 44100 Hz, mono, 64 kb/s
Only difference I see is that mine is slightly newer SVN (I used your C/O line, too).

So, try a redownload and try it again, and then ... we need to know about your hardware and x11 graphics drivers.

- Piete.

Last edited by piete; 01-26-2007 at 08:09 AM.
 
Old 01-28-2007, 01:40 PM   #5
/y0shi
Member
 
Registered: Jan 2006
Location: berlin, germany
Distribution: slackware 12.0
Posts: 58

Original Poster
Rep: Reputation: 17
Thank you again, i really appreciate your help.
So now i'm back and did a svn update - thought maybe its this shared/static thing so compiled it a little more like you:

here is my try same as before ...

Code:
user@darkstar:~/src/ffmpeg$ ./ffmpeg -f x11grab -vd x11:0.0 -s 1024x768 out.mpg
FFmpeg version SVN-r7751, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --enable-x11grab --enable-gpl --enable-shared --disable-static 
  libavutil version: 49.2.0
  libavcodec version: 51.29.0
  libavformat version: 51.8.0
  built on Jan 28 2007 20:21:00, gcc: 3.4.6
Unknown input or output format: x11grab
it compiled without any errors i think
here is what it says after configure (i dont see any x11grab?):

PHP Code:
user@darkstar:~/src/ffmpeg$ ./configure --enable-x11grab --enable-gpl --enable-shared --disable-static
install prefix            /usr/local
source path               
/home/hiro/src/ffmpeg
C compiler                gcc
make                      make
.align is power-of-two    no
ARCH                      x86_32 
(generic)
big-endian                no
MMX enabled               yes
CMOV enabled              no
CMOV is fast              no
gprof enabled             no
debug symbols             yes
strip symbols             yes
optimize                  yes
static                    no
shared                    yes
postprocessing support    no
software scaler enabled   no
video hooking             yes
Imlib2 support            yes
FreeType support          yes
network support           yes
IPv6 support              yes
threading support         no
SDL support               yes
Sun medialib support      no
AVISynth enabled          no
liba52 support            no
liba52 dlopened           no
libdts support            no
libfaac enabled           no
libfaad enabled           no
faadbin enabled           no
libgsm enabled            no
libmp3lame enabled        no
libnut enabled            no
libogg enabled            no
libtheora enabled         no
libvorbis enabled         no
x264 enabled              no
XviD enabled              no
zlib enabled              yes
AMR
-NB float support      no
AMR
-NB fixed support      no
AMR
-WB float support      no
AMR
-WB IF2 support        no
License
GPL
Creating config
.mak and config.h... 


i'm some how lost ...

edit:
sry forgot this one:

Code:
user@darkstar:~/src/ffmpeg$ ./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1024x768 test.avi
FFmpeg version SVN-r7751, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --enable-x11grab --enable-gpl --enable-shared --disable-static 
  libavutil version: 49.2.0
  libavcodec version: 51.29.0
  libavformat version: 51.8.0
  built on Jan 28 2007 20:21:00, gcc: 3.4.6
Could not find video grab device

Last edited by /y0shi; 01-28-2007 at 01:44 PM.
 
Old 01-28-2007, 05:01 PM   #6
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
The only thing left I can think of is that I'm using the nVidia drivers (i have an xv video driver), which have some extra headers. I think these are for opengl, however.

What video driver are using?

[Edit]

Two more things ...

1. I don't have x11grab in the final ./configure report
2. I *DO* have video formats compiled in, although why that would affect any raw grab idk.

Last edited by piete; 01-28-2007 at 05:30 PM.
 
Old 05-26-2008, 10:11 AM   #7
soohyunc
LQ Newbie
 
Registered: May 2008
Distribution: Ubuntu
Posts: 1

Rep: Reputation: 0
ffmpeg with x11grab option enabled

i have used the following configuration options. and it works okay. (by the way, i'm on ubuntu 8.04)

./configure --enable-gpl --enable-pp --enable-swscaler --enable-pthreads \
--enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm \
--enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin \
--enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 \
--enable-amr_nb --enable-amr_wb --enable-shared --enable-pthreads \
--enable-x11grab --prefix=/usr


cheers,
soo-hyun
 
Old 09-29-2009, 08:59 PM   #8
jond578
LQ Newbie
 
Registered: Sep 2009
Location: New England, USA
Distribution: Ubuntu 9.04 - Jaunty Jackalope
Posts: 1

Rep: Reputation: 0
Thought I'd post this for the poor folks like me trying to get this to work; After a few hours digging, I finally got this to work.

I was missing libxext-dev, X11 miscellaneous extensions library (development headers). Once I added that pkg, the ./configure output gave me these "indevs"

Enabled indevs:
dv1394 v4l x11_grab_device
oss v4l2

If you don't see "x11_grab_device", then you haven't got the support.

Hope it helps.
 
Old 09-29-2009, 09:16 PM   #9
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Hi y0shi,

Quote:
Originally Posted by /y0shi View Post
FFmpeg version SVN-r7676, Copyright (c) 2000-2006 Fabrice Bellard, et al.
That is a pretty ancient version, are you sure it came from svn? Current svn is:
Code:
FFmpeg version SVN-r20088, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Sep 30 2009 10:00:02 with gcc 4.3.3
Andrew

Last edited by andrew.46; 09-29-2009 at 09:17 PM.
 
Old 09-30-2009, 09:11 AM   #10
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Andrew - back in January 2007 when the thread started, that was bleeding edge
 
Old 09-30-2009, 04:16 PM   #11
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Hi piete,

Quote:
Originally Posted by piete View Post
Andrew - back in January 2007 when the thread started, that was bleeding edge
Oops..... now I see the date .

Andrew
 
  


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
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
Linux Format readers - help me find an FFMPEG software frontend recently reviewed lefty.crupps Linux - Software 9 08-15-2006 09:35 AM
replace empty function from the old format to the new format powah Programming 4 07-12-2005 08:07 PM
When playing RealAudio I get an Unknown data format error message Notbobdylan Linux - Newbie 0 01-19-2004 09:23 PM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 04:23 PM

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

All times are GMT -5. The time now is 08:17 AM.

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