Start a new topic

How to record audio and video from a BC-H08240A using ffmpeg (or mencoder or ...)?

I want to record audio and video simultaneously from a BC-H08240A using ffmpeg.

Right now I managed to record just video with the following command:

  1. /usr/bin/ffmpeg -s 352x240 -f v4l2 -input_format h264 -i /dev/video1 -map 0:0 -vcodec copy /tmp/video1.mp4

Unfortunatelly I can't record the audio also.

The following command:

  1. /usr/bin/ffmpeg -s 352x240 -f v4l2 -input_format h264 -i /dev/video1 -f alsa -acodec g723_1 -i hw:2,0,0 -ar 8000 -ac 1 -map 0:0 -map 1:0 -vcodec copy -acodec copy /tmp/video1.mp4

is failing with the following error:

ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers

built on May 22 2014 16:58:15 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5)

configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -mtune=generic -fomit-frame-pointer -pipe' --extra-cflags='-O2 -mtune=generic -fomit-frame-pointer -pipe' --extra-cxxflags='-O2 -mtune=generic -fomit-frame-pointer -pipe' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --enable-nonfree --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --enable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --enable-libfaac --enable-libtheora --disable-libtwolame --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --enable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --enable-libgsm --disable-libmodplug --enable-libopus --disable-libquvi --disable-librtmp --disable-libssh --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-avx2 --disable-ssse3 --disable-sse42 --cpu=generic

libavutil 52. 66.100 / 52. 66.100

libavcodec 55. 52.102 / 55. 52.102

libavformat 55. 33.100 / 55. 33.100

libavdevice 55. 10.100 / 55. 10.100

libavfilter 4. 2.100 / 4. 2.100

libavresample 1. 2. 0 / 1. 2. 0

libswscale 2. 5.102 / 2. 5.102

libswresample 0. 18.100 / 0. 18.100

libpostproc 52. 3.100 / 52. 3.100

[h264 @ 0xfed100] non-existing PPS 0 referenced

Last message repeated 1 times

[h264 @ 0xfed100] decode_slice_header error

[h264 @ 0xfed100] no frame!

Input #0, video4linux2,v4l2, from '/dev/video1':

Duration: N/A, start: 9924.798485, bitrate: N/A

Stream #0:0: Video: h264 (Baseline), yuv420p, 352x240, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 2000k tbc

[alsa @ 0xfee3a0] sample format 0x15035 is not supported

hw:2,0,0: Input/output error

Conversion failed!

Can someone show a working example on how to record both audio AND video from a BC-H08240A using ffmpeg? Or mencoder? OR some other command line tool available for Linux?


Rodrigo Severo

Login or Signup to post a comment