CLI syntax help: burning timestamp in frame grabbed stream

About encoding, codec settings, muxers and filter usage
rloe
New Cone
New Cone
Posts: 1
Joined: 08 Feb 2024 05:11

CLI syntax help: burning timestamp in frame grabbed stream

Postby rloe » 08 Feb 2024 05:59

Hi,

I have an application where I need to burn a date/time stamp into a video (like and old-time VCR recorder) that I receive from a frame grabber.
I tried Marquee and the GUI, but this only overlays the current date/time. After a lot of forum/internet/wiki searching I came up with a couple of commands that almost work. I took the input and output command parts from the GUI and tried to marry with information I found.
What I want to do is:
  • get the stream from the device (works)
  • embed date/time with Marquee (kinda works)
  • split stream to display and file (if one works, the other doesn't)
So I thought that one of these two commands should be OK:

Code: Select all

"c:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev=DFG/USB2pro :dshow-adev= :live-caching=300 :sout='#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none,mux=ts,sfilter=marq{marquee="%Y-%m-%d_%H:%M:%S",position=9} :duplicate{dst="C:\Users\ME\test.mp4",dst=display}}'
or

Code: Select all

"c:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev=DFG/USB2pro :dshow-adev= :live-caching=300 :sout='#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none,mux=ts,sfilter=marq{marquee="%Y-%m-%d_%H:%M:%S",position=9}} :duplicate{dst="C:\Users\ME\test.mp4",dst=display}'
In both cases I get errors similar to this:
-- logger module started --
main: one instance mode ENABLED
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
stream_out_standard error: no mux specified or found by extension
main error: stream chain failed for `standard{mux="",access="",dst="'#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none,mux=ts,sfilter=marq{marquee=%Y-%m-%d_%H:%M:%S,position=9}}"}'
main error: cannot start stream output instance, aborting
-- logger module stopped --
I tried other permutations with mux, different positions for options etc., but no luck. I guess one of the things I am not clear about is the chaining syntax.
In general, the input and the output work OK, it is only the chaining and duplicating I am struggling with. I do need to have the display in parallel to the file saving for quality control.

Of course, if there is an easier way to impress the date/time, I am open to this option, too.

Thanks much! Any help or pointer is appreciated!

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: CLI syntax help: burning timestamp in frame grabbed stream

Postby unidan » 26 Feb 2024 11:36

Hi,

Multiple pointers:

- transcode is not muxing, only `standard` is muxing, so the mux= option you added is not at the correct location.
- you seem to want to transcode as `ts` but actually records a destination of `.mp4`, which muxer do you want?
- In your case, dst="C:\Users\ME\test.mp4" should be triggering standard but I'm not 100% sure it adds the std module. The best to ensure that would be to do something like

Code: Select all

:duplicate{dst=file{dst="C:\Users\ME\test.mp4"},dst=display} or :duplicate{dst=std{access=file, mux=mp4, dst="C:\Users\ME\test.mp4"}, dst=display}
You might want to read more documentation there:
- https://docs.videolan.me/vlc-user/deskt ... ction.html
- https://docs.videolan.me/vlc-user/deskt ... ction.html


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 1 guest