Quero usar um videoclipe em loop como fonte da minha webcam em um Hangout do Google+. Instalei o v4l2loopback e criei um dispositivo de loopback de vídeo . Mas ainda não descobri como gravar os quadros de vídeo no dispositivo. O exemplo dado é:
gst-launch videotestsrc ! v4l2sink device=/dev/video1
Então, depois de ler a página de manual do gst-launch e tentar entender o que estava acontecendo, fiz minha fraca tentativa:
sudo gst-launch-0.10 filesrc location=/home/briankb/Videos/darthvaderdancing.mp4 ! v4l2sink device=/dev/video0
O que resultou em:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
(gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed
New clock: GstSystemClock
(gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed
Caught SIGSEGV accessing address (nil)
#0 0x00007fc1890f0b03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fc18962bff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fc18962c45a in g_main_loop_run ()
#3 0x00007fc189b5c4cb in gst_bus_poll ()
#4 0x0000000000404587 in ?? ()
#5 0x0000000000403c34 in ?? ()
#6 0x00007fc18902b76d in __libc_start_main ()
#7 0x00000000004043bd in ?? ()
#8 0x00007fff88253ed8 in ?? ()
#9 0x000000000000001c in ?? ()
#10 0x0000000000000006 in ?? ()
#11 0x00007fff882548c4 in ?? ()
#12 0x00007fff882548d4 in ?? ()
#13 0x00007fff882548dc in ?? ()
#14 0x00007fff88254904 in ?? ()
#15 0x00007fff88254906 in ?? ()
#16 0x00007fff8825490f in ?? ()
#17 0x0000000000000000 in ?? ()
Spinning. Please run 'gdb gst-launch 12622' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
O clipe que estou tentando usar um vídeo h264 a 29,97 fps, 320x240 e em um contêiner mp4 (é do Youtube).