in linux I can get the video
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 71939.629989, bitrate: 745823 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 745823 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
or I can get the audio
Input #0, alsa, from 'hw:1,0':
Duration: N/A, start: 1586389697.839621, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
in linux on the command line I can get both and the audio/video is in sync too
ffmpeg -f alsa -thread_queue_size 1024 -ac 2 -i hw:0,0 -f video4linux2 -thread_queue_size 1024 -i /dev/video0 -s 1920x1080 -c:v libx264 -x264opts bitrate=2000 -profile:v baseline -preset superfast test1.mp4
in tvheadend i can pipe the video no problem
pipe:////usr/bin/ffmpeg -f video4linux2 -thread_queue_size 1024 -i /dev/video0 -s 1920x1080 -c:v libx264 -x264opts bitrate=2000 -profile:v baseline -preset superfast -f mpegts pipe:1
what I can't do is figure out the syntax/format to pipe both the audio and video together in a watchable stream in tvheadend.
the error is unable to pipe hw:0,0 or hw:0 or hw:HDMI,0 but they all work from the command line.
2020-04-09 18:16:28.721 spawn: ALSA lib pcm_hw.c:1826:(_snd_pcm_hw_open) Invalid value for card
2020-04-09 18:16:28.721 spawn: [alsa @ 0x5581a1861100] cannot open audio device hw:0 (No such file or directory)
2020-04-09 18:16:28.721 spawn: hw:0: Input/output error
2020-04-09 18:16:28.725 iptv: stdin pipe unexpectedly closed: No data
or
2020-04-09 18:30:54.261 spawn: ALSA lib conf.c:4898:(parse_args) Unknown parameter 1
2020-04-09 18:30:54.261 spawn: ALSA lib conf.c:5031:(snd_config_expand) Parse arguments error: No such file or directory
2020-04-09 18:30:54.261 spawn: ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM hw:HDMI,0
2020-04-09 18:30:54.261 spawn: [alsa @ 0x55f6b1325100] cannot open audio device default:HDMI,0 (No such file or directory)
2020-04-09 18:30:54.261 spawn: hw:HDMI,0: Input/output error
2020-04-09 18:30:54.265 iptv: stdin pipe unexpectedly closed: No data
arecord -l shows
default:CARD=HDMI
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Default Audio Device
sysdefault:CARD=HDMI
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Default Audio Device
dmix:CARD=HDMI,DEV=0
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=0
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Direct sample snooping device
hw:CARD=HDMI,DEV=0
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=0
00-00 Pro Capture Quad HDMI, Pro Capture PCM
Hardware device with all software conversions
why would it work on the command line but not in tvheadend. is it a permission issue ?
thanks