Closed oren closed 7 years ago
Could you add --dry
to the command and paste the output back in here please.
/usr/bin/ffmpeg -hide_banner -loglevel info -thread_queue_size 512 -f x11grab -video_size 1600x900 -i ":0.0" -thread_queue_size 512 -f v4l2 -video_size 320x180 -i "/dev/video0" -thread_queue_size 512 -f alsa -ac 2 -i "hw:0,0" -c:a libfaac -c:v libx264 -c:a flac -filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' -threads 0 "/home/oren/Desktop/Screencast 2017-03-18 at 12.21.30.mkv"
And:
/usr/bin/ffmpeg -hide_banner -loglevel info -thread_queue_size 512 -f x11grab -video_size 1600x900 -i ":0.0" -thread_queue_size 512 -f v4l2 -video_size 160x90 -i "/dev/video0" -thread_queue_size 512 -f alsa -ac 2 -i "hw:0,0" -c:a libfaac -c:v libx264 -c:a flac -filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' -threads 0 "/home/oren/Desktop/Screencast 2017-03-18 at 12.21.39.mkv"
it looks like the video_size was not changes.
Could you enter the command manually and adjust the overlay=main_w-overlay_w-10:main_h-overlay_h-10
part to scale=1000:1000,overlay=main_w-overlay_w-10:main_h-overlay_h-10
Note the added scale=1000:1000,
i did that and the recording's width got smaller.
I am also not too sure about this command. Could you play around with it a bit. Maybe trying:
scale=100:100,
and
scale=10:10,
thanks for your help. I tried it but it look pretty bad (:
Did the camera overlay get bigger/smaller by adjusting these values?
Btw, what should be your expected result. How big do you want to have the camera overlay (1/4 of the screen or 1/8 ...)? I will play around and see to find a solution
i want it to be a bit smaller. the recent experiment/command made it huge. i can't even describe what i saw (:
Hi @oren
I got something to work.
ffmpeg -f alsa -i pulse -f x11grab -s 1600x900 -r 30 -i :0.0+0,0 -vf "movie=/dev/video0:f=video4linux2, scale=480:-1, fps, setpts=PTS-STARTPTS [movie]; [in][movie] overlay=main_w-overlay_w-2:main_h-overlay_h-2 [out]" -vcodec libx264 -crf 20 -preset veryfast -threads 0 ~/Desktop/video1.mkv
-f x11grab -s 1600x900
: change this to your display resolutionscale=480:-1
: here you can adjust the width of your camera (-1
means the height will scale automatically)Please let me know how it works
the size of the overlay camera changes as expected. but now I noticed two issues:
Apart from the audio, Is the camera and the desktop recording in sync?
yeah
Please open up a separate issue for the audio problem so we can keep things organised I will close this ticket for now, as the camera problem is solvable (at least via raw ffmpeg commands).
Changing the camera size easily will be integrated in ffscreencast 2.0
is there a plan to add your workaround for the video size issue into the API of ffscreencast? so i can do something like this:
ffscreencast -a1 -c --cargs="-video_size 160x90" --oargs='-c:a flac'
Both commands record with the same dimensions so I am probably passing something wrong in the arguments:
Thanks!