Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #225426 > unrolled thread

Capture screen with mencoder

Started byRodolfo Medina <rodolfo.medina@gmail.com>
First post2020-07-28 20:20 +0200
Last post2020-07-30 02:20 +0200
Articles 9 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  Capture screen with mencoder Rodolfo Medina <rodolfo.medina@gmail.com> - 2020-07-28 20:20 +0200
    Re: Capture screen with mencoder Dan Ritter <dsr@randomstring.org> - 2020-07-28 21:10 +0200
    Re: Capture screen with mencoder Reco <recoverym4n@enotuniq.net> - 2020-07-28 21:30 +0200
    Re: Capture screen with mencoder Nicolas George <george@nsup.org> - 2020-07-29 00:50 +0200
      Re: Capture screen with mencoder Rodolfo Medina <rodolfo.medina@gmail.com> - 2020-07-29 09:00 +0200
        Re: Capture screen with mencoder Long Wind <longwind2@yahoo.com> - 2020-07-29 09:10 +0200
        Re: Capture screen with mencoder Nicolas George <george@nsup.org> - 2020-07-29 11:30 +0200
          Re: Capture screen with mencoder Rodolfo Medina <rodolfo.medina@gmail.com> - 2020-07-29 14:40 +0200
            Re: Capture screen with mencoder Long Wind <longwind2@yahoo.com> - 2020-07-30 02:20 +0200

#225426 — Capture screen with mencoder

FromRodolfo Medina <rodolfo.medina@gmail.com>
Date2020-07-28 20:20 +0200
SubjectCapture screen with mencoder
Message-ID<AxCmJ-6eH-1@gated-at.bofh.it>
I posted this to Mplayer mailing list but got no answer so am sharing it here
hoping someone can help...

I capture my webcam stream with:

 $ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:alsa:adevice=hw.1,0 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi

and it works fine.  How can I modify the above command so to capture desktop
screen instead (with audio)?  I suppose it's a matter of replacing /dev/video0
with something else but don't know what nor the correct syntax...

Thanks for any help,

Rodolfo

[toc] | [next] | [standalone]


#225427

FromDan Ritter <dsr@randomstring.org>
Date2020-07-28 21:10 +0200
Message-ID<AxD97-6Kd-3@gated-at.bofh.it>
In reply to#225426
Rodolfo Medina wrote: 
> I posted this to Mplayer mailing list but got no answer so am sharing it here
> hoping someone can help...
> 
> I capture my webcam stream with:
> 
>  $ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:alsa:adevice=hw.1,0 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
> 
> and it works fine.  How can I modify the above command so to capture desktop
> screen instead (with audio)?  I suppose it's a matter of replacing /dev/video0
> with something else but don't know what nor the correct syntax...
> 

Nope, it's completely different. Your desktop only generates a
video stream at the interface between the video card and the
monitor.

You can tap into that with an HDMI capture device, or you can
run software that snaps multiple still shots of your screen and
stitches them into video later:

$ apt search screencast
byzanz/stable,unstable 0.3.0+git20160312-3 amd64
  small screencast creator

gnome-flashback/stable 3.30.0-3 amd64
  helper application for the GNOME Flashback session

gnome-shell-extension-easyscreencast/stable 1.0.2-2 all
  GNOME Shell extension to simplify video recording

gtk-recordmydesktop/stable 0.3.8-4.1 all
  Graphical frontend for recordMyDesktop screencast tool

kazam/stable,unstable 1.4.5-2.1 all
  screencast and screenshot application created with design in
mind

key-mon/stable 1.17-1 all
  Utility to show live keyboard and mouse status

screenkey/stable 0.9-2 all
  screencast tool to display your keystrokes

shelr/stable,unstable 0.16.3-2 all
  Utility for plain text screencasting

vokoscreen/stable 2.5.0-dmo2 amd64
  Easy to use screencast creator

vokoscreen-ng/buster-backports 3.0.3-1~bpo10+1 amd64
  easy to use screencast creator

-dsr-

[toc] | [prev] | [next] | [standalone]


#225428

FromReco <recoverym4n@enotuniq.net>
Date2020-07-28 21:30 +0200
Message-ID<AxDsu-6QE-3@gated-at.bofh.it>
In reply to#225426
	Hi.

On Tue, Jul 28, 2020 at 06:18:31PM +0000, Rodolfo Medina wrote:
>  $ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:alsa:adevice=hw.1,0 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
> How can I modify the above command so to capture desktop
> screen instead (with audio)?

Start with replacing mencoder with ffmpeg, it's easy afterwards:

ffmpeg -f x11grab -r 30 -s 640x480 -i $DISPLAY \
	-f pulse -ac 2 -i 1 \
	-c:a libopus -c:v libx264 \
	screencast.mkv

It assumes that you're using X and Pulseaudio.


As far as I can tell there's no "x11grab" equivalent in mencoder.
I could be wrong, though, haven't used the thing for about 10 years or
so.

Reco

[toc] | [prev] | [next] | [standalone]


#225448

FromNicolas George <george@nsup.org>
Date2020-07-29 00:50 +0200
Message-ID<AxGA2-cx-5@gated-at.bofh.it>
In reply to#225426

[Multipart message — attachments visible in raw view] — view raw

Rodolfo Medina (12020-07-28):
>		      How can I modify the above command so to capture
> desktop screen instead (with audio)?  I suppose it's a matter of
> replacing /dev/video0 with something else but don't know what nor the
> correct syntax...

As others have explained, the desktop is a fundamentally different
source than a webcam.

mencoder does not support capturing the desktop. You may manage to tweak
it to enable libavdevice, but it is completely unsupported, and you
would have it easier using ffmpeg directly. Anyway, nowadays, using
mencoder is not recommended except for DVDs.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#225468

FromRodolfo Medina <rodolfo.medina@gmail.com>
Date2020-07-29 09:00 +0200
Message-ID<AxOed-4Sr-1@gated-at.bofh.it>
In reply to#225448
Nicolas George <george@nsup.org> writes:

> Rodolfo Medina (12020-07-28):
>>		      How can I modify the above command so to capture
>> desktop screen instead (with audio)?
>
>
> mencoder does not support capturing the desktop. You may manage to tweak
> it to enable libavdevice, but it is completely unsupported, and you
> would have it easier using ffmpeg directly. Anyway, nowadays, using
> mencoder is not recommended except for DVDs.


Thanks...  The reason why I wanted to use mencoder instead of ffmpeg is that
with the latter, when I tried to capture webcam and audio together, especially
with my old laptop (but partially also with my new desktop pc), I've been
banged against `a sea of troubles': sync problems, video freezing, video
stuttering, background noise, output interrupted... whereas with mencoder and
the command I posted above everything went fine at first try.  So that, with
desktop capture, I had to give up the idea of recording video and audio
together and am recording them separately...

Regards,

Rodolfo

[toc] | [prev] | [next] | [standalone]


#225469

FromLong Wind <longwind2@yahoo.com>
Date2020-07-29 09:10 +0200
Message-ID<AxOnT-5bc-1@gated-at.bofh.it>
In reply to#225468

[Multipart message — attachments visible in raw view] — view raw

 
is it possible to use mplayer to play video from one source and at same time play audio from another source? if it's possible, i think mencoder can be used to record desktop.
    On Wednesday, July 29, 2020, 2:52:07 AM EDT, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:  
 
 Nicolas George <george@nsup.org> writes:

> Rodolfo Medina (12020-07-28):
>>              How can I modify the above command so to capture
>> desktop screen instead (with audio)?
>
>
> mencoder does not support capturing the desktop. You may manage to tweak
> it to enable libavdevice, but it is completely unsupported, and you
> would have it easier using ffmpeg directly. Anyway, nowadays, using
> mencoder is not recommended except for DVDs.


Thanks...  The reason why I wanted to use mencoder instead of ffmpeg is that
with the latter, when I tried to capture webcam and audio together, especially
with my old laptop (but partially also with my new desktop pc), I've been
banged against `a sea of troubles': sync problems, video freezing, video
stuttering, background noise, output interrupted... whereas with mencoder and
the command I posted above everything went fine at first try.  So that, with
desktop capture, I had to give up the idea of recording video and audio
together and am recording them separately...

Regards,

Rodolfo

  

[toc] | [prev] | [next] | [standalone]


#225472

FromNicolas George <george@nsup.org>
Date2020-07-29 11:30 +0200
Message-ID<AxQzo-6qX-3@gated-at.bofh.it>
In reply to#225468

[Multipart message — attachments visible in raw view] — view raw

Rodolfo Medina (12020-07-29):
> Thanks...  The reason why I wanted to use mencoder instead of ffmpeg is that
> with the latter, when I tried to capture webcam and audio together, especially
> with my old laptop (but partially also with my new desktop pc), I've been
> banged against `a sea of troubles': sync problems, video freezing, video
> stuttering, background noise, output interrupted... whereas with mencoder and
> the command I posted above everything went fine at first try.  So that, with
> desktop capture, I had to give up the idea of recording video and audio
> together and am recording them separately...

AFAIK, people manage to use ffmpeg for that. I strongly suggest you try
to get this working rather than relying on a project in vegetative
state. Help can be fond on the ffmpeg-user mailing-list, but you will
need to give much more details than you did here.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#225488

FromRodolfo Medina <rodolfo.medina@gmail.com>
Date2020-07-29 14:40 +0200
Message-ID<AxTxg-8bz-13@gated-at.bofh.it>
In reply to#225472
Nicolas George <george@nsup.org> writes:

> Rodolfo Medina (12020-07-29):
>> Thanks...  The reason why I wanted to use mencoder instead of ffmpeg is that
>> with the latter, when I tried to capture webcam and audio together,
>> especially with my old laptop (but partially also with my new desktop pc),
>> I've been banged against `a sea of troubles': sync problems, video freezing,
>> video stuttering, background noise, output interrupted... whereas with
>> mencoder and the command I posted above everything went fine at first try.
>> So that, with desktop capture, I had to give up the idea of recording video
>> and audio together and am recording them separately...
>
> AFAIK, people manage to use ffmpeg for that. I strongly suggest you try
> to get this working rather than relying on a project in vegetative
> state. Help can be fond on the ffmpeg-user mailing-list, but you will
> need to give much more details than you did here.


No help came from ffmpeg mailing list apart from user Leonardo who helped me
privately but, in the end, with my 10 years old netbook, I had to give up...
maybe I was asking too much.  Mencoder instead worked immediately like a charm.

Thanks,

Rodolfo

[toc] | [prev] | [next] | [standalone]


#225511

FromLong Wind <longwind2@yahoo.com>
Date2020-07-30 02:20 +0200
Message-ID<Ay4sF-6zb-1@gated-at.bofh.it>
In reply to#225488

[Multipart message — attachments visible in raw view] — view raw

 
surely your old hardware isn't a problemyou can capture desktop as you can capture webcam
i've just capture desktop plus audio with ffmpegi use pulse audio because it seems easy to use than alsa
    On Wednesday, July 29, 2020, 8:32:04 AM EDT, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:  
 
 Nicolas George <george@nsup.org> writes:

> Rodolfo Medina (12020-07-29):
>> Thanks...  The reason why I wanted to use mencoder instead of ffmpeg is that
>> with the latter, when I tried to capture webcam and audio together,
>> especially with my old laptop (but partially also with my new desktop pc),
>> I've been banged against `a sea of troubles': sync problems, video freezing,
>> video stuttering, background noise, output interrupted... whereas with
>> mencoder and the command I posted above everything went fine at first try.
>> So that, with desktop capture, I had to give up the idea of recording video
>> and audio together and am recording them separately...
>
> AFAIK, people manage to use ffmpeg for that. I strongly suggest you try
> to get this working rather than relying on a project in vegetative
> state. Help can be fond on the ffmpeg-user mailing-list, but you will
> need to give much more details than you did here.


No help came from ffmpeg mailing list apart from user Leonardo who helped me
privately but, in the end, with my 10 years old netbook, I had to give up...
maybe I was asking too much.  Mencoder instead worked immediately like a charm.

Thanks,

Rodolfo

  

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web