Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-27 Thread Stroller

On 26 June 2011, at 19:54, Mick wrote:
 ...
 ffmpeg -f x11grab -s xga -r 25 -i :0.0 -aspect 4:3 /tmp/out.mpg
 
 but the result is rather blurred as you can see in the attached
 screenshot, when I play it with mplayer.
 ...
 Try passing -sameq
 
 WOW!  Exceptional improvement in a single stroke!  Thanks!  :)
 
 Why is it that ffmpeg degrades the quality with default settings?  What does 
 it assume that the setting is? (sorry for the newbie Qs, but this area is 
 until now outside my cognitive map! ;-)

I don't know about the default settings, but I would interpret the file 
extension of your original command as telling mplayer that the destination 
file should be encoded as mpeg2. This is a pretty poor codec by today's 
standards.

I could well be wrong, though. Do you know what format the output file is?

IMO you're best encoding to h264 (in an mp4 container) for distribution, but I 
think it's possible the encoding load of that might affect your screencast. So 
you might wish to use sameq or the r210 or rawvideo codecs and then transcode 
to h264 (or WebM or whatever) afterwards.

 Now, I hope I'm not getting greedy, but how do I add voice recording to the 
 above stanza?  Or do I have to record voice and then package it along with 
 the 
 video in a container as a separate step?

EXAMPLES
   Video and Audio grabbing 
   FFmpeg can grab video and audio from devices given that you specify the  
   input format and device. 

   ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 
/tmp/out.mpg

   Note that you must activate the right video source and channel before
   launching FFmpeg with any TV viewer such as xawtv
   (http://linux.bytesex.org/xawtv/) by Gerd Knorr. You also have to set  
   the audio recording levels correctly with a standard mixer. 

Audacity is widely used for simple audio editing.

Stroller.




Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-27 Thread Mick
On Monday 27 Jun 2011 12:08:17 Stroller wrote:
 On 26 June 2011, at 19:54, Mick wrote:

  Try passing -sameq
  
  WOW!  Exceptional improvement in a single stroke!  Thanks!  :)
  
  Why is it that ffmpeg degrades the quality with default settings?  What
  does it assume that the setting is? (sorry for the newbie Qs, but this
  area is until now outside my cognitive map! ;-)
 
 I don't know about the default settings, but I would interpret the file
 extension of your original command as telling mplayer that the
 destination file should be encoded as mpeg2. This is a pretty poor codec
 by today's standards.
 
 I could well be wrong, though. Do you know what format the output file is?

No, I have no idea.  I assume it is capturing my desktop in some raw video 
format - whatever that means.  What would X11 feed to x11grab?


 IMO you're best encoding to h264 (in an mp4 container) for distribution,
 but I think it's possible the encoding load of that might affect your
 screencast. So you might wish to use sameq or the r210 or rawvideo codecs
 and then transcode to h264 (or WebM or whatever) afterwards.

I changed the output file to mp4 and it transcodes it accordingly!  :)

 ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq -aspect 4:3 /tmp/out.mp4
FFmpeg version SVN-r25767, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 30 2011 17:04:59 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --
mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-
gnu-gcc --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --
disable-stripping --disable-debug --disable-doc --disable-network --disable-
static --disable-vdpau --enable-libmp3lame --enable-libvorbis --enable-libx264 
--enable-libxvid --enable-libfaac --enable-nonfree --disable-indev=v4l --
disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss 
--enable-libopencore-amrwb --enable-libopencore-amrnb --enable-librtmp --
disable-altivec --cpu=core2 --enable-hardcoded-tables
  libavutil 50.33. 0 / 50.33. 0
  libavcore  0.13. 0 /  0.13. 0
  libavcodec52.96. 0 / 52.96. 0
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.62. 0 /  1.62. 0
  libswscale 0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[x11grab @ 0x1a52510] device: :0.0 - display: :0.0 x: 0 y: 0 width: 1024 
height: 768
[x11grab @ 0x1a52510] shared memory extension  found
[x11grab @ 0x1a52510] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1309180986.812527, bitrate: 629145 kb/s
Stream #0.0: Video: rawvideo, bgra, 1024x768, 629145 kb/s, 25 tbr, 1000k 
tbn, 25 tbc
[buffer @ 0x1a7db80] w:1024 h:768 pixfmt:bgra
[ffsink @ 0x1a7ddf0] auto-inserting filter 'auto-inserted scaler 0' between 
the filter 'src' and the filter 'out'
[scale @ 0x1a7e110] w:1024 h:768 fmt:bgra - w:1024 h:768 fmt:yuv420p 
flags:0xa004
Output #0, mp4, to '/tmp/out.mp4':
  Metadata:
encoder : Lavf52.84.0
Stream #0.0: Video: mpeg4, yuv420p, 1024x768 [PAR 1:1 DAR 4:3], q=2-31, 
200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 - #0.0
Press [q] to stop encoding
frame=   14 fps=  0 q=0.0 size= 702kB time=0.68 bitrate=8454.1kbits/s 
dup=frame=   27 fps= 25 q=0.0 size=1056kB time=1.20 bitrate=7212.1kbits/s 
dup=frame=   40 fps= 25 q=0.0 size=1411kB time=1.72 bitrate=6720.9kbits/s 
dup=
[snip...]


Then it plays it as such:

mplayer /tmp/out.mp4 
MPlayer SVN-r32624-4.4.4 (C) 2000-2010 MPlayer Team

Playing /tmp/out.mp4.
libavformat file format detected.
[lavf] stream 0: video (mpeg4), -vid 0
VIDEO:  [MP4V]  1024x768  24bpp  25.000 fps  5798.3 kbps (707.8 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2mp41
 encoder: Lavf52.84.0
==
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==
Audio: no sound
Starting playback...
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 1024x768 = 1024x768 Planar YV12 
V:  19.1   0/  0  5%  0%  0.0% 0 0 


Exiting... (End of file)


Not sure how to define the vcodec to be h264.  Is ffodivx the same as h264?


  Now, I hope I'm not getting greedy, but how do I add voice recording to
  the above stanza?  Or do I have to record voice and then package it
  along with the video in a container as a separate step?
 
 EXAMPLES
Video and Audio grabbing
FFmpeg can grab video and audio from devices given that you specify
 the input format and device.
 
ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0
 /tmp/out.mpg
 
Note that you must activate the right video source and channel
 before launching FFmpeg with any TV viewer such as xawtv

Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-27 Thread Leonardo Guilherme
2011/6/27 Mick michaelkintz...@gmail.com

 On Monday 27 Jun 2011 12:08:17 Stroller wrote:
  On 26 June 2011, at 19:54, Mick wrote:

   Try passing -sameq
  
   WOW!  Exceptional improvement in a single stroke!  Thanks!  :)
  
   Why is it that ffmpeg degrades the quality with default settings?  What
   does it assume that the setting is? (sorry for the newbie Qs, but this
   area is until now outside my cognitive map! ;-)
 
  I don't know about the default settings, but I would interpret the file
  extension of your original command as telling mplayer that the
  destination file should be encoded as mpeg2. This is a pretty poor codec
  by today's standards.
 
  I could well be wrong, though. Do you know what format the output file
 is?

 No, I have no idea.  I assume it is capturing my desktop in some raw video
 format - whatever that means.  What would X11 feed to x11grab?


  IMO you're best encoding to h264 (in an mp4 container) for distribution,
  but I think it's possible the encoding load of that might affect your
  screencast. So you might wish to use sameq or the r210 or rawvideo codecs
  and then transcode to h264 (or WebM or whatever) afterwards.

 I changed the output file to mp4 and it transcodes it accordingly!  :)

  ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq -aspect 4:3 /tmp/out.mp4
 FFmpeg version SVN-r25767, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 30 2011 17:04:59 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --
 mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-
 gnu-gcc --enable-gpl --enable-version3 --enable-postproc --enable-avfilter
 --
 disable-stripping --disable-debug --disable-doc --disable-network
 --disable-
 static --disable-vdpau --enable-libmp3lame --enable-libvorbis
 --enable-libx264
 --enable-libxvid --enable-libfaac --enable-nonfree --disable-indev=v4l --
 disable-indev=oss --disable-indev=jack --enable-x11grab
 --disable-outdev=oss
 --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-librtmp --
 disable-altivec --cpu=core2 --enable-hardcoded-tables
  libavutil 50.33. 0 / 50.33. 0
  libavcore  0.13. 0 /  0.13. 0
  libavcodec52.96. 0 / 52.96. 0
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.62. 0 /  1.62. 0
  libswscale 0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
 [x11grab @ 0x1a52510] device: :0.0 - display: :0.0 x: 0 y: 0 width: 1024
 height: 768
 [x11grab @ 0x1a52510] shared memory extension  found
 [x11grab @ 0x1a52510] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1309180986.812527, bitrate: 629145 kb/s
Stream #0.0: Video: rawvideo, bgra, 1024x768, 629145 kb/s, 25 tbr, 1000k
 tbn, 25 tbc
 [buffer @ 0x1a7db80] w:1024 h:768 pixfmt:bgra
 [ffsink @ 0x1a7ddf0] auto-inserting filter 'auto-inserted scaler 0' between
 the filter 'src' and the filter 'out'
 [scale @ 0x1a7e110] w:1024 h:768 fmt:bgra - w:1024 h:768 fmt:yuv420p
 flags:0xa004
 Output #0, mp4, to '/tmp/out.mp4':
  Metadata:
encoder : Lavf52.84.0
Stream #0.0: Video: mpeg4, yuv420p, 1024x768 [PAR 1:1 DAR 4:3], q=2-31,
 200 kb/s, 25 tbn, 25 tbc
 Stream mapping:
  Stream #0.0 - #0.0
 Press [q] to stop encoding
 frame=   14 fps=  0 q=0.0 size= 702kB time=0.68 bitrate=8454.1kbits/s
 dup=frame=   27 fps= 25 q=0.0 size=1056kB time=1.20
 bitrate=7212.1kbits/s
 dup=frame=   40 fps= 25 q=0.0 size=1411kB time=1.72
 bitrate=6720.9kbits/s
 dup=
 [snip...]


 Then it plays it as such:

 mplayer /tmp/out.mp4
 MPlayer SVN-r32624-4.4.4 (C) 2000-2010 MPlayer Team

 Playing /tmp/out.mp4.
 libavformat file format detected.
 [lavf] stream 0: video (mpeg4), -vid 0
 VIDEO:  [MP4V]  1024x768  24bpp  25.000 fps  5798.3 kbps (707.8 kbyte/s)
 Clip info:
  major_brand: isom
  minor_version: 512
  compatible_brands: isomiso2mp41
  encoder: Lavf52.84.0
 ==
 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
 Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
 ==
 Audio: no sound
 Starting playback...
 Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
 VO: [xv] 1024x768 = 1024x768 Planar YV12
 V:  19.1   0/  0  5%  0%  0.0% 0 0


 Exiting... (End of file)


 Not sure how to define the vcodec to be h264.  Is ffodivx the same as h264?


   Now, I hope I'm not getting greedy, but how do I add voice recording to
   the above stanza?  Or do I have to record voice and then package it
   along with the video in a container as a separate step?
 
  EXAMPLES
 Video and Audio grabbing
 FFmpeg can grab video and audio from devices given that you
 specify
  the input format and device.
 
 ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0
  /tmp/out.mpg
 
 Note that you 

Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-27 Thread Mick
On Monday 27 Jun 2011 15:14:28 Leonardo Guilherme wrote:

 This link was very helpful to me, maybe it can be to you:
 
 http://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linu
 x/

This is excellent info.  Just what I was looking for, with a lot of detailed 
explanation and examples too.  Thanks for sharing!
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-26 Thread David Abbott
On Sun, Jun 26, 2011 at 1:28 PM, Mick michaelkintz...@gmail.com wrote:
 Hi All,

 I was trying to record my desktop using:

 ffmpeg -f x11grab -s xga -r 25 -i :0.0 -aspect 4:3 /tmp/out.mpg

 but the result is rather blurred as you can see in the attached screenshot,
 when I play it with mplayer.

 Is there some other option (codec) I should add to improve the quality of the
 captured image?
 --
 Regards,
 Mick

I have used recordmydesktop and received good results;
recordmydesktop -device hw:1 --width 1200 --height 800 -x 1900 -y 30 -o test.ogv

control alt p to pause
control alt s to stop

Adjust to taste that is on a dual screen.
HTH
David



Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-26 Thread Albert Hopkins


On Sunday, June 26 at 18:28 (+0100), Mick said:

 Hi All,
 
 I was trying to record my desktop using:
 
 ffmpeg -f x11grab -s xga -r 25 -i :0.0 -aspect 4:3 /tmp/out.mpg
 
 but the result is rather blurred as you can see in the attached screenshot, 
 when I play it with mplayer.
 
 Is there some other option (codec) I should add to improve the quality of the 
 captured image?

Try passing -sameq

-a





Re: [gentoo-user] [OT] using ffmpeg for screen cast

2011-06-26 Thread Mick
On Sunday 26 Jun 2011 19:09:40 Albert Hopkins wrote:
 On Sunday, June 26 at 18:28 (+0100), Mick said:
  Hi All,
  
  I was trying to record my desktop using:
  
  ffmpeg -f x11grab -s xga -r 25 -i :0.0 -aspect 4:3 /tmp/out.mpg
  
  but the result is rather blurred as you can see in the attached
  screenshot, when I play it with mplayer.
  
  Is there some other option (codec) I should add to improve the quality of
  the captured image?
 
 Try passing -sameq
 
 -a

WOW!  Exceptional improvement in a single stroke!  Thanks!  :)

Why is it that ffmpeg degrades the quality with default settings?  What does 
it assume that the setting is? (sorry for the newbie Qs, but this area is 
until now outside my cognitive map! ;-)

Thank you both for your suggestions.  The recordmydesktop looks good, but I am 
not sure if I will have to transcode it to make sure that it would also work 
for MSWindows users?  Is ogg MSWindows 'compatible'?

Now, I hope I'm not getting greedy, but how do I add voice recording to the 
above stanza?  Or do I have to record voice and then package it along with the 
video in a container as a separate step?

Once I achieve that how can I go back and edit the voice part?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.