My current working on AVxCAT (v2 beta) works well with webcam using Wim's webcam.exe progam.
I can record video + audio in syncro or record video only or audio only.
(no stream out to the network)
Currently, I only enable high quality which is copy received streams into output which is then AVI for video or WAV for audio.
I did a few test to have output into any other format (it works but I have to adjust some coding parts in this mode and should be available in a several days - use of any other video format results into higher storage use which increase up to several 10th of megabytes (between 8M to about 35M) into share low memory)
If some are interested into testing my current v2 beta, please left a comment here.
(Of course, it has many other added features like icecast, front cover when copy disc or using discid etc... and many other improvements, optimizations, all available with ffmpeg 4.x)
Rémy
Update (ffmpeg): I did a test streaming my webcam video+audio directly as mp4 to udp and it works (having both video and audio in the stream)
e.g. I tested using my webcam stream as input and using for final output ( -tune fastdecode -tune zerolatency -fflags nobuffer -f mpegts "udp://127.0.0.1:8888?pkt_size=1316" )
I opened VLC player and put in udp://@127.0.0.1:8888?pkt_size=1316 and got video + audio (with a latency of course)
I may be able to borrow a Logitech Pro Stream Webcam, any idea of it would be supported?
Following webcam's are working with Wim's webcam.exe
Logitech
c250/c270/pro9000/C920 HD pro
I tested output streamming using following sample with mine parameters providing good results
(do not invert input file order or you not been able to get a correct syncro)
warning: It consumes many MiB of shared below storage (could be above 35MiB, up to nearly 70MiB)
If after tests, you see that below is low and not well freed, restart wps only should return many memory
To resume: ffmpeg with both pipe inputs \Audio and \Video to pipe output into ffmpeg (for single file with syncro audio/video) to output udp
/* ------------ ffmpeg version : 4.2.2 ------------ */
/* ------------------------------------------------ */
ffmpeg_exe=" fullpath ffmpeg including ffmpeg.exe "
ff_outfile="udp://127.0.0.1:8888?pkt_size=1316"
ff_outfile='-f mpegts "'||ff_outfile||'"'
Out_AVmap=" -map 0:0 -map 0:1"
/* new for test */
ffmpeg_prms="-use_wallclock_as_timestamps 1 -thread_queue_size 32 -i \PIPE\Webcam\Audio -itsoffset 1.250 -use_wallclock_as_timestamps 1 -thread_queue_size 48 -f mjpeg -i \PIPE\Webcam\Video"
ffmpeg_prms=ffmpeg_prms||" -r 25 -video_track_timescale 25.00 -c:v copy -c:a copy -map 1:v:0 -map 0:a:0 -f avi - |"||ffmpeg_exe||" -y "
/* ------------ */
ffmpeg_prms=ffmpeg_prms||' -i - -hide_banner '||Out_AVmap||' -c:v libx264 -b:v 800k -async 1'
ffmpeg_prms=ffmpeg_prms||' -movflags faststart -preset medium'
ffmpeg_prms=ffmpeg_prms||' -tune fastdecode -tune zerolatency'
ffmpeg_prms=ffmpeg_prms||' -c:a aac -strict -2 -b:a 128k -threads 1'
ffmpeg_prms=ffmpeg_prms||' '||ff_outfile
''||ffmpeg_exe||' -y '||ffmpeg_prms
Return
Before run it:
e.g. Start webcam.exe /u/n/x640/y480/a:32000
Start VLC opening a network resource udt://@127.0.0.1:8888?pkt_size=1316 (LVC is than waiting on UDP inputs)
By default VLC is buffering 1s before play (this introduces a latency of 1s and you may see about 1s additional latency from the full process + UDP
In cas of out of syncro between audio and video, try to adjust -itsoffset 1.250 (this value is ok with C270 webcam)
Only need to adjust one time.
About webcam.exe =>
https://www.os2world.com/forum/index.php/topic,2712.60.htmlYou can use my little tool (widget) to control webcam.exe ( [ S ] for settings, show to display webcam, green or red button to on/off the webcam )
http://remydodin.levillage.org/doc/realisations/downloads/WCC_26072020.zip regards
Update (20220122): replacing libx264 by mpeg4 reduces a little latency
It should be possible to send the udp stream to a server converting them into hls stream readable by browsers.