LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-12-2011, 01:20 AM   #1
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Rep: Reputation: 5
ffmpeg crash on libx264...


I was trying to run record it now, and switched from recordmydesktop to ffmpeg and it kept crashing. I tried it with the command line

Code:
ffmpeg -r 30 -s 1680x1050 -f x11grab -i :0.0 -vcodec msmpg2v2 -qscale 2 filename.avi
I have the following installed, but it's wanting libx264 which I don't see at slackbuilds.org:

Code:
x264-20101023-x86_64-1_SBo
Slackware64 13.1

Where should I start looking for missing things or...?

I also looked for xvidcap and kazam at slackbuilds.org but didn't see them there. Are those available?
 
Old 06-12-2011, 02:17 AM   #2
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
You already have libx264 installed. It comes with x264
Code:
grep -i libx264 /var/log/packages/x264-20110422-x86_64-1_SBo 
usr/lib64/libx264.so.115
If ffmpeg is crashing with an output about libx264, it's because ffmpeg was built against a different version of x264 than what you have installed. Could be because you compiled your own x264, but installed a pre-compiled version of ffmpeg from elsewhere.
 
Old 06-12-2011, 03:08 AM   #3
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
Thank you very much.

I'm not sure what I did, but in desperatoin I installed all of the alien packages from taper.alienbase.nl/mirrors/people/alien/restricted_slackbuilds/ and now when i run recorditnow and choose ffmpeg it works!

But there is no sound.

So I go back to using recordmydesktop from the choices in recorditnow. That has other problems which is the reason I tried the ffmpeg.

I wanted to convert my recordmydesktop recordings.

This still gives me an error though:

Code:
mencoder -idx vid1.ogv -ovc lavc -oac mp3lame -o vid1.avi
gives this error:

Code:
MEncoder 20100926-4.4.4 (C) 2000-2010 MPlayer Team
MPlayer was compiled without libmp3lame support.
I installed lame from the alien link above, and I now have the alien lame, and slackbuild twolame I compiled. I didn't see a twolame or a x264 at the alien link though, so I don't know how to compile those slackbuilds so it works?

Two things are happening. I want sound, and ffmpeg choice isn't giving it in recorditnow. The other thing, I cannot convert my ogv to something for youtube.

the ffmpeg choice doesn't have choppy video, but no sound. And the recordmydestkop choice has very jumpy video.

I just want to make a smooth video with sound and put on youtube.

I hope you understand my problem.

EDIT: I have this installed - libmp4v2-1.9.1-x86_64-3_SBo.tgz and I found libmp3splt at slackbuilds.

Thank you for your help.

Last edited by astanton; 06-12-2011 at 03:14 AM.
 
Old 06-12-2011, 04:02 AM   #4
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
I have tried these command lines too and I get failures on them:

Code:
$ ffmpeg -r 30 -s 1680x1050 -f x11grab -i :0.0 -vcodec msmpg2v2 -qscale 2 filename.avi
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Feb  3 2011 00:17:04 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/man --enable-libmp3lame --enable-libfaac --enable-nonfree --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 --arch=x86_64 --enable-pic --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT' --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib64 -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
[x11grab @ 0x63a4f0]device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1680 height: 1050
[x11grab @ 0x63a4f0]shared memory extension  found
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  138 (MIT-SHM)
  Minor opcode of failed request:  4 (X_ShmGetImage)
  Serial number of failed request:  11
  Current serial number in output stream:  11
And this

Code:
$ ffmpeg -f alsa -i pulse -f x11grab -r 25 -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec huffyuv -sameq Screencast.avi
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Feb  3 2011 00:17:04 with gcc 4.4.4
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/man --enable-libmp3lame --enable-libfaac --enable-nonfree --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 --arch=x86_64 --enable-pic --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT' --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib64 -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
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM pulse
[alsa @ 0x63a4f0]cannot open audio device pulse (No such file or directory)
pulse: Input/output error
I just want to record some videos with sound and put them on youtube. This is very hard and I don't understand a lot of the gibberish I'm getting back from the commandline
 
Old 06-12-2011, 04:37 AM   #5
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Unknown PCM pulse
Do you have pulse audio installed?

Your mencoder error is obvious, the mplayer package you are using was not compiled while lame was installed. Install lame, then compile mplayer. The sources for mplayer are available on your Slackware DVD/CD or from any mirror.

http://www.ffmpeg.org/ffmpeg-doc.html#SEC21 <-- Thats the section for capturing audio.

The format would be something similar to (you'll need to adjust to fit your hardware)
Code:
ffmpeg -f alsa -i plughw:0,0 -f x11grab -r 25 -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec huffyuv -sameq Screencast.avi
If you're trying to capture opengl footage (such as a game) look into glc instead. https://github.com/nullkey/glc/wiki
 
Old 06-12-2011, 05:26 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
If you want ffmpeg to record sound in mp3 or aac format, you need the package in my "restricted" resository. The one that I keep on slackware.com has the mp3 and aac encoding capability stripped off because I am not allowed to host these encoders on a US server due to patent infringement regulations.

My repository outside the US does have a version of my ffmpeg package which is able to record mp3 audio (aac as well but I guess you want mp3).
Get it either here: http://taper.alienbase.nl/mirrors/pe...builds/ffmpeg/ or here: http://slackware.org.uk/people/alien...builds/ffmpeg/

And by the way, my ffmpeg package has twolame and x264 built-in, along with lame, aac and everything else you can think of. It does not need any other package to work.

Eric

EDIT: ah, I saw you already used that version of my ffmpeg package... hm then I have no idea why it did not record sound.

Last edited by Alien Bob; 06-12-2011 at 05:30 AM.
 
Old 06-12-2011, 07:15 AM   #7
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by disturbed1 View Post
Do you have pulse audio installed?
No I don't think I do.

Quote:
Originally Posted by disturbed1 View Post
Your mencoder error is obvious, the mplayer package you are using was not compiled while lame was installed. Install lame, then compile mplayer. The sources for mplayer are available on your Slackware DVD/CD or from any mirror.
Okay will do. Thank you.

Quote:
Originally Posted by disturbed1 View Post
The format would be something similar to (you'll need to adjust to fit your hardware)
Code:
ffmpeg -f alsa -i plughw:0,0 -f x11grab -r 25 -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec huffyuv -sameq Screencast.avi
Okay I'm getting somewhere now. I'm not trying to capture any games. Actually, just an xterm right now, and other programs on my desktop. It is doing that now with recorditnow using either recordmydesktop (very sluggish, and the sound is out of sync too) or with ffmpeg using recorditnow front end or cli (no sound either way)

The command line you gave is working, and it also works with

Code:
ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 25 -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
No matter which one, no sound.

I have a hp dv9000 laptop, and the sound with recordmydesktop is using the builtin mic, if that helps.
 
Old 06-12-2011, 03:02 PM   #8
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Quote:
Originally Posted by astanton View Post
I have a hp dv9000 laptop, and the sound with recordmydesktop is using the builtin mic, if that helps.
Then you'll want to change plughw:0,0 to plughw:0,1 or some other number. For a better description read this http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html . It also gives examples. If plughw:#,# is not working, you can also try hw:0,0.
 
Old 06-12-2011, 05:45 PM   #9
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by disturbed1 View Post
Then you'll want to change plughw:0,0 to plughw:0,1 or some other number.... If plughw:#,# is not working, you can also try hw:0,0.
I tried variations of the command lines above (with the mkv and avi containers), and it all seems to work well, except there still is no sound.

Adjusting

Code:
-f alsa -i plughw:0,0
Some of the variations included

-f alsa -i plughw:0,1 (All numbers after the comma gave errors - no device)

-f alsa -i hw:0 (worked fine w/o comma,num)

-f oss (errors - no device)

But on all variations I noticed I'm getting something like:

Code:
[alsa @ 0x63a4f0]ALSA buffer xrun.
frame=   12 fps=  1 q=0.0 Lsize=   18678kB time=0.01 bitrate=15301204.8kbits/s
I found this link: http://www.alsa-project.org/main/index.php/XRUN_Debug

But trying to get a debug with:

Code:
# echo 1 > /proc/asound/card0/pcm0p/xrun_debug
-bash: /proc/asound/card0/pcm0p/xrun_debug: No such file or directory
There is no xrun_debug

Code:
# ls /proc/asound
NVidia@  card0/  cards  devices  hwdep  modules  oss/  pcm  seq/  timers  version
# ls /proc/asound/card0
codec#0  id  oss_mixer  pcm0c/  pcm0p/  pcm1p/
# ls /proc/asound/card0/pcm0p
info  oss  sub0/
# ls /proc/asound/card0/pcm0p/info
/proc/asound/card0/pcm0p/info
# cat /proc/asound/card0/pcm0p/info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CONEXANT Analog
name: CONEXANT Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0
NVidia@ is a symlink to card0.

Using the example at the link you gave me, I get an error when I use hw:0, but when I use this:

Code:
ffmpeg -f alsa i plughw:0 alsaout.wav
I get sound!!!!!

So it looks like I should use plughw:0 or plughw:0,0 from now on? Now I just need to make sound and video at the same time. mostly an xterm, but some of my desktop too. no games though.

So progress is beind made and AlienBob will be happy to know that his 'restricted' ffmpeg is really working for me! I didn't thank him yet for offering help with a post.

Any ideas on where I might go from here?
 
Old 06-12-2011, 07:53 PM   #10
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Quote:
Originally Posted by astanton View Post
So progress is beind made and AlienBob will be happy to know that his 'restricted' ffmpeg is really working for me! I didn't thank him yet for offering help with a post.

Any ideas on where I might go from here?
We would all be lost without Pat, Robby, Eric, and the other less vocal members of Slackware.


Honestly, I personally don't have a clue where to go from here
I tried it here on my end, and came up with the same output as you - Video works, Audio works, Audio + Video results in no Audio. I'd cover the basics, and check alsamixer to make sure the correct device is flagged for recording, and reference the output of arecord -l which gives a listing of available recording devices.
If someone with more knowledge doesn't chime in, I'd take it to the ffmpeg/libav mailing list. And please post your results. For good of the community, and I'm personally perturbed about this now
 
Old 06-12-2011, 09:43 PM   #11
astanton
Member
 
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by disturbed1 View Post
. And please post your results. For good of the community...
Oh I certainly will. I like to see those [SOLVED] thread headers - it usually means I can go there first and skip most of the anguish and kruft
 
  


Reply

Tags
ffmpeg, recording, video


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] problem with --enable-libx264 option in ffmpeg sumeet inani Linux - Newbie 17 09-22-2012 09:55 PM
[SOLVED] installing ffmpeg from tarball with libx264 enabled sumeet inani Linux - Newbie 6 06-21-2010 10:35 PM
LINUX UBUNTU PHP FFMPEG INSTALLED BUT libx264 while installing ERROR??? trinay123 Ubuntu 2 03-13-2010 10:22 AM
[FFMPEG] Error with libx264 not found nikhil010586 Linux - Software 11 09-23-2009 03:48 AM
dependency issue: libx264.so.54 needed by ffmpeg PhilTR Fedora 22 01-23-2007 11:06 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration