Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-12-2011, 01:20 AM
|
#1
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Rep:
|
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?
|
|
|
|
06-12-2011, 02:17 AM
|
#2
|
|
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
|
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.
|
|
|
|
06-12-2011, 03:08 AM
|
#3
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Original Poster
Rep:
|
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.
|
|
|
|
06-12-2011, 04:02 AM
|
#4
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Original Poster
Rep:
|
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
|
|
|
|
06-12-2011, 04:37 AM
|
#5
|
|
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
|
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
|
|
|
|
06-12-2011, 05:26 AM
|
#6
|
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,734
Rep: 
|
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.
|
|
|
|
06-12-2011, 07:15 AM
|
#7
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Original Poster
Rep:
|
Quote:
Originally Posted by disturbed1
Do you have pulse audio installed?
|
No I don't think I do.
Quote:
Originally Posted by disturbed1
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
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.
|
|
|
|
06-12-2011, 03:02 PM
|
#8
|
|
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
|
Quote:
Originally Posted by astanton
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.
|
|
|
|
06-12-2011, 05:45 PM
|
#9
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Original Poster
Rep:
|
Quote:
Originally Posted by disturbed1
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?
|
|
|
|
06-12-2011, 07:53 PM
|
#10
|
|
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
|
Quote:
Originally Posted by astanton
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 
|
|
|
|
06-12-2011, 09:43 PM
|
#11
|
|
Member
Registered: Nov 2010
Distribution: Slackware64 -current
Posts: 82
Original Poster
Rep:
|
Quote:
Originally Posted by disturbed1
. 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 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:52 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|