Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
dannyboy79
i would suggest turning down your frames per second. give that a try
I tried that. When I lower the framerate, the desynchronization actually becomes a bit higher.
+ my computer is powerful enough to handle such framerates easily. Heck, I can even even run it with "veryfast" preset and still have a lot of CPU headroom. I actually get a less desynchronization if I run it with "veryfast" preset along with using a bit more compression on-the-fly.
Yes, I know, that makes no sense.
I would really like to figure out what exactly goes wrong. As I not only want to properly record videos, but it also "activated my curiosity". Weird things are interesting ;)
Re: HOWTO: Proper Screencasting on Linux
I followed the instructions on the ffmpeg site for ubuntu (precise) and successfully compiled all the tools.
I used ffmpeg to make a screencast (mkv) but when I try to convert it to webm I get an error.
Code:
ffmpeg version git-2013-02-13-15e7533 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 13 2013 19:59:40 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Code:
coldraven@happy:~$ ffmpeg -i our-final-product.mkv -vcodec libvpx -acodec libvorbis test.webm
ffmpeg version git-2013-02-13-15e7533 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 13 2013 19:59:40 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[matroska,webm @ 0x2b74020] max_analyze_duration 5000000 reached at 5017000 microseconds
[matroska,webm @ 0x2b74020] Could not find codec parameters for stream 0 (Video: h264, 680x430): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from 'our-final-product.mkv':
Metadata:
ENCODER : Lavf54.63.100
Duration: 00:00:40.67, start: 0.000000, bitrate: 163 kb/s
Stream #0:0: Video: h264, 680x430, SAR 1:1 DAR 68:43, 25 fps, 25 tbr, 1k tbn, 2k tbc (default)
Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
File 'test.webm' already exists. Overwrite ? [y/N] y
Unable to parse option value "-1" as pixel format
Error opening filters!
Any ideas?
Re: HOWTO: Proper Screencasting on Linux
I can't duplicate the issue. Can you provide the input?
Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
FakeOutdoorsman
I can't duplicate the issue. Can you provide the input?
Please excuse the bad quality audio, that was going to be another question.
This is Kubuntu 12.04 and the sound mixer Kmix crashes on loading.
I want to go back to Ubuntu but my laptop video card has problems with Unity.
The source file is here:
http://ubuntuone.com/2ESC5TMnzQi95UIuFP4y8p
Thanks for looking :)
Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
coldraven
[matroska,webm @ 0x2b74020] max_analyze_duration 5000000 reached at 5017000 microseconds
[matroska,webm @ 0x2b74020] Could not find codec parameters for stream 0 (Video: h264, 680x430): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
This is the important message, although it understandably might be confusing given the un-user-friendly "Unable to parse option value "-1" as pixel format" error.
So you need to increase the -analyzeduration value (default is 5000000). Generally you don't have to do this, and I'm not sure what is going on with your file. How did you make the file/what was your encoding command? Also, since your input already contains Vorbis audio you probably don't need to re-encode it:
Code:
ffmpeg -analyzeduration 6000000 -i our-final-product.mkv -vcodec libvpx -acodec copy test.webm
I wish I had some more advice to give about using libvpx, because the default settings are probably poor, but that's an encoder I have no experience with.
Quote:
Originally Posted by
coldraven
Please excuse the bad quality audio, that was going to be another question.
This is Kubuntu 12.04 and the sound mixer Kmix crashes on loading.
Sorry, I've never used Kmix. I generally just use alsamixer. Some info: Capturing audio with FFmpeg and ALSA.
Quote:
Originally Posted by
coldraven
I want to go back to Ubuntu but my laptop video card has problems with Unity.
Everything has problems with Unity.
Re: HOWTO: Proper Screencasting on Linux
Quote:
but that's an encoder I have no experience with.
You are lucky :) I have no experience with any of this stuff!
I just wiped my drive and installed Ubuntu 12.10 so I may not try your suggestions for a day or so.
I had previously tried alsamixer but the microphone level controls would jump from 53% to 100%. That's why the sound is distorting.
Do you think that the ffmpeg deb files I compiled for Precise will work in Quantal or would it be better to compile them again?
In case you are wondering, the videos are for a friends cattle program as tutorials.
He tried using Windows programs and the result was low res, and large file size.
The good news is that 12.10 and Unity are behaving nicely on my laptop :p
Thanks for your time.
Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
coldraven
Do you think that the ffmpeg deb files I compiled for Precise will work in Quantal or would it be better to compile them again?
You should re-compile. Also, the so-called "ffmpeg" version from the repo is quite buggy, so there's another reason to compile.
Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
FakeOutdoorsman
You should re-compile. Also, the so-called "ffmpeg" version from the repo is quite buggy, so there's another reason to compile.
Thanks, I had a feeling that would be the answer.
I just realised that I had not replied with my original command, I copied it from the beginning of this thread and added the crop dimensions.
Code:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 680x430 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 2 output.mkv
What format would you recommend for a cross platform web video?
Re: HOWTO: Proper Screencasting on Linux
Quote:
Originally Posted by
coldraven
Code:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 680x430 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 2 output.mkv
This doesn't look like what you used to make the troublesome sample because this has pcm_s16le audio and the sample contained Vorbis audio.
See "How do I get the exact size and coordinates of a specific window I want to capture?" in the tutorial at the beginning of this thread on how to capture just the program window and not extra desktop stuff.
Quote:
Originally Posted by
coldraven
What format would you recommend for a cross platform web video?
Other than being lazy and using YouTube or Vimeo? Probably something like the free videojs or mediaelementjs with both a H.264 video with AAC audio in mp4 container, and VP8 video and Vorbis audio in webm container. Don't waste your time with Theora video and Vorbis audio in ogg for that shrinking 5% browser market share.
Re: HOWTO: Proper Screencasting on Linux
Quote:
Other than being lazy and using YouTube or Vimeo? Probably something like the free
videojs or
mediaelementjs with both a H.264 video with AAC audio in mp4 container, and VP8 video and Vorbis audio in webm container. Don't waste your time with Theora video and Vorbis audio in ogg for that shrinking 5% browser market share.
Thanks, those links look like what I need.
I will re-compile ffmpeg later today and do some more research and experimenting.
Just one quick question, if I want medium quality mono sound where do I alter the argument?
Is it ?
alsa -ac 1
I cannot seem to find the correct piece of documentation and all examples are for high quality stereo.
I'm presuming that it is better to capture directly into the format I want rather than transcoding afterwards.
Cheers!