Display on screen, and transcode to file
Posted: 29 Jun 2022 17:40
I'm trying to take input from a capture device, show it on screen and save to a file, using Windows.
I started with this:
This works.
However, I would like my output file to be AVI/h264 instead, so I tried this:
This saves the file successfully, but doesn't display on screen (only the first frame is shown).
I am guessing that displaying a transcode of h264 is not possible due to resource (Though Windows Task Manager doesn't show VLC above ~27%). N.B. without fps=25 it works, but the out file is larger than desired.
Fine! I tried switching it, so only the file is transcoded to h264.
This displays on screen, but the file isn't transcoded (15 seconds is 3.5GB...)
Can I achieve what I'm trying to do (are there any typos in the above?), or is my machine not high spec enough?
I have looked at https://wiki.videolan.org/Documentation ... _Examples/ and the "Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce:" example seem relatively similar, but I'm not sure I see the difference. I don't know if the last apostrophe on that example is a mistake?
I started with this:
Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="USB Video Device" :dshow-adev="Microphone (USB Audio Device)" --sout "#transcode{vcodec=mp4v,acodec=mpga,fps=25,scale=0.5,vb=2100,ab=128,deinterlace}:duplicate{dst=display,dst=std{access=file,mux=mp4,dst=Recording.m4v}"
However, I would like my output file to be AVI/h264 instead, so I tried this:
Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="USB Video Device" :dshow-adev="Microphone (USB Audio Device)" --sout "#transcode{vcodec=h264,fps=25,scale=0.5}:duplicate{dst=display,dst=std{access=file,mux=avi,dst=Recording.avi}"
I am guessing that displaying a transcode of h264 is not possible due to resource (Though Windows Task Manager doesn't show VLC above ~27%). N.B. without fps=25 it works, but the out file is larger than desired.
Fine! I tried switching it, so only the file is transcoded to h264.
Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="USB Video Device" :dshow-adev="Microphone (USB Audio Device)" --sout "#duplicate{dst=display,dst="transcode{vcodec=h264,fps=25,scale=0.5}:dst=std{access=file,mux=avi,dst=Recording.avi}"}"
Can I achieve what I'm trying to do (are there any typos in the above?), or is my machine not high spec enough?
I have looked at https://wiki.videolan.org/Documentation ... _Examples/ and the "Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce:" example seem relatively similar, but I'm not sure I see the difference. I don't know if the last apostrophe on that example is a mistake?