I'm trying to work out how to use a command line approach to making
sheduled TV captures using a DVB-T2 USB dongle + VLC using a Linux
machine. Eventually to understand it well enough to write a simple ROX app that gives a simple interface which then generates the relevant output.
Thus far I've got be being able to write executable files that will launch VLC playing the TV station of choice. e.g. one that contain commands like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
which when executed starts VLC playing the "Talking Pictures" channel. It then puts the result into a .ts file in the default location (Downloads) using the default naming.
IIUC I can add a "-runtime=<ssss>" to specify how long the recording will
be, but the snag at present is how to get the command run to *start* at the correct time.
I have installed the "at" command for this but for whatever reason can't
get the command correct to do what I want. Looked on the web but not found
an example that works.
e.g. I can't seem to specify correctly what/where the file to put the recording should be. Which may be a sign I've muddled something else that throws the command off recognising the full-path name I give.
Can someone point out how to get this to work, please? Once I've twigged
this I can write a simple prog to generate a suitable set of 'at' commands
to get them to record the required items. (I hope!)
Ta.
Jim
I'm trying to work out how to use a command line approach to making
sheduled TV captures using a DVB-T2 USB dongle + VLC using a Linux
machine. Eventually to understand it well enough to write a simple ROX app that gives a simple interface which then generates the relevant output.
Thus far I've got be being able to write executable files that will launch VLC playing the TV station of choice. e.g. one that contain commands like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
which when executed starts VLC playing the "Talking Pictures" channel. It then puts the result into a .ts file in the default location (Downloads) using the default naming.
IIUC I can add a "-runtime=<ssss>" to specify how long the recording will
be, but the snag at present is how to get the command run to *start* at the correct time.
I have installed the "at" command for this but for whatever reason can't
get the command correct to do what I want. Looked on the web but not found
an example that works.
e.g. I can't seem to specify correctly what/where the file to put the recording should be. Which may be a sign I've muddled something else that throws the command off recognising the full-path name I give.
Can someone point out how to get this to work, please? Once I've twigged
this I can write a simple prog to generate a suitable set of 'at' commands
to get them to record the required items. (I hope!)
I'm trying to work out how to use a command line approach to making
sheduled TV captures using a DVB-T2 USB dongle + VLC using a Linux
machine. Eventually to understand it well enough to write a simple ROX app >that gives a simple interface which then generates the relevant output.
Thus far I've got be being able to write executable files that will launch >VLC playing the TV station of choice. e.g. one that contain commands like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
which when executed starts VLC playing the "Talking Pictures" channel. It >then puts the result into a .ts file in the default location (Downloads) >using the default naming.
IIUC I can add a "-runtime=<ssss>" to specify how long the recording will
be, but the snag at present is how to get the command run to *start* at the >correct time.
I have installed the "at" command for this but for whatever reason can't
get the command correct to do what I want. Looked on the web but not found
an example that works.
e.g. I can't seem to specify correctly what/where the file to put the >recording should be. Which may be a sign I've muddled something else that >throws the command off recognising the full-path name I give.
On Tue, 15 Nov 2022 12:24:38 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
I use "at" with "get_iplayer" so that part is easy, assuming
that IUYC. Let's say you want run a file at 21:00 tomorrow, the
16th November.
at -t 202211162100 -f vlc_script
The time is "CC YY MM DD hh mm" without spaces. I like to
specify the date and time in full. "vlc_script" is the program
you want started at that time.
I should have thought that you would need to specify the
destination in the "vlc_script" file. Nothing to do with
"at" which does nothing except run the file specified.
In article <vn67nhd848h7skl2fbngljoup4tm3qpcat@4ax.com>,
Roger <invalid@invalid.invalid> wrote:
On Tue, 15 Nov 2022 12:24:38 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
I use "at" with "get_iplayer" so that part is easy, assuming
that IUYC. Let's say you want run a file at 21:00 tomorrow, the
16th November.
at -t 202211162100 -f vlc_script
The time is "CC YY MM DD hh mm" without spaces. I like to
specify the date and time in full. "vlc_script" is the program
you want started at that time.
FWIW I'm just using hhmm at present, and from the jobs listed by atq it
seems to work. i.e. the jobs get listed as being to started at that time today. They also duly vanish from the list... but without giving a coconut.
I should have thought that you would need to specify the
destination in the "vlc_script" file. Nothing to do with
"at" which does nothing except run the file specified.
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
Alternatively, TVHeadend.
"Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, DVB-T2, ATSC, ISDB-T,
IPTV, SAT>IP and HDHomeRun as input sources." https://tvheadend.org/projects/tvheadend
I've successfully used it on a RPi with OSMC.
In article <vn67nhd848h7skl2fbngljoup4tm3qpcat@4ax.com>,
Roger <invalid@invalid.invalid> wrote:
On Tue, 15 Nov 2022 12:24:38 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
I use "at" with "get_iplayer" so that part is easy, assuming
that IUYC. Let's say you want run a file at 21:00 tomorrow, the
16th November.
at -t 202211162100 -f vlc_script
The time is "CC YY MM DD hh mm" without spaces. I like to
specify the date and time in full. "vlc_script" is the program
you want started at that time.
FWIW I'm just using hhmm at present, and from the jobs listed by atq it
seems to work. i.e. the jobs get listed as being to started at that time today. They also duly vanish from the list... but without giving a coconut.
I should have thought that you would need to specify the
destination in the "vlc_script" file. Nothing to do with
"at" which does nothing except run the file specified.
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
The files are set to be executable. And if I click on one with ROX Filer
they will start VLC playing the required station ('program' as numbered by its main stream ID)
Tried calling cvlc rather than vlc, but still, no cigar. So I must be using at here in the wrong way or have to alter what's in the file from the
above.
Does having no longer have the job queued cause an attempt to close down
the 'child' process? i.e. stops it as soon as at has launched it?
Still puzzled but must be doing something daft! :-/
In article <vn67nhd848h7skl2fbngljoup4tm3qpcat@4ax.com>,
Roger <invalid@invalid.invalid> wrote:
On Tue, 15 Nov 2022 12:24:38 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
I use "at" with "get_iplayer" so that part is easy, assuming
that IUYC. Let's say you want run a file at 21:00 tomorrow, the
16th November.
at -t 202211162100 -f vlc_script
The time is "CC YY MM DD hh mm" without spaces. I like to
specify the date and time in full. "vlc_script" is the program
you want started at that time.
FWIW I'm just using hhmm at present, and from the jobs listed by atq it
seems to work. i.e. the jobs get listed as being to started at that time >today. They also duly vanish from the list... but without giving a coconut.
I should have thought that you would need to specify the
destination in the "vlc_script" file. Nothing to do with
"at" which does nothing except run the file specified.
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
The files are set to be executable. And if I click on one with ROX Filer
they will start VLC playing the required station ('program' as numbered by >its main stream ID)
Does having no longer have the job queued cause an attempt to close down
the 'child' process? i.e. stops it as soon as at has launched it?
Still puzzled but must be doing something daft! :-/
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
I may have misunderstood but have you tested this with *only* that
"known good" command (to get VLC to open the programme at the required
time) and *nothing* about recording etc? Until that works I'd not worry about things like recording time and file location.
On Tue, 15 Nov 2022 15:02:27 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
In article <vn67nhd848h7skl2fbngljoup4tm3qpcat@4ax.com>,
Roger <invalid@invalid.invalid> wrote:
On Tue, 15 Nov 2022 12:24:38 +0000 (GMT), Jim Lesurf
<noise@audiomisc.co.uk> wrote:
The time is "CC YY MM DD hh mm" without spaces. I like to
specify the date and time in full. "vlc_script" is the program
you want started at that time.
FWIW I'm just using hhmm at present, and from the jobs listed by atq it >seems to work. i.e. the jobs get listed as being to started at that time >today. They also duly vanish from the list... but without giving a coconut.
But when you've got it working you may schedule things days or
weeks in advance.
I should have thought that you would need to specify the
destination in the "vlc_script" file. Nothing to do with
"at" which does nothing except run the file specified.
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
The files are set to be executable. And if I click on one with ROX Filer >they will start VLC playing the required station ('program' as numbered by >its main stream ID)
As NY suggested by didn't say this way; your vlc script has to
be in your PATH, if it isn't you should put the full path in the
script.
Instead of using ROX run the script from your shell's prompt
whilst in a different directory from where the script is. If
your shell cannot find it then try again using the full path.
Oh, why not change the script to
echo Hello world!
You'll be able to see immediately whether the script has run
correctly or not.
Does having no longer have the job queued cause an attempt to close down >the 'child' process? i.e. stops it as soon as at has launched it?
If it's not listed using atq then at has attempted to do its job
and removed it from the queue.
Have you checked the logs (probably in /var/log)? Run your
script and immediately look at the logs to see which was most
recently written to (ls -ltr /path/to/logs). If the time is
"now" look at the last entries in that log. There should be a
clue there.
Still puzzled but must be doing something daft! :-/
I couldn't possibly comment.
In article <3d489af1-f15b-520d-1bc5-b3adae6da04c@outlook.com>, Robin <rbw@outlook.com> wrote:
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
I may have misunderstood but have you tested this with *only* that
"known good" command (to get VLC to open the programme at the required
time) and *nothing* about recording etc? Until that works I'd not worry
about things like recording time and file location.
Yes. Commands like the above work as expected. They start up VLC and it
finds and plays the station whose PID is given the value (28224 in the
above example which IIRC is TalkingPicturesTV). At the monent I then press the 'record' icon and it starts recording the stream into a .ts file.
On 16/11/2022 09:56, Jim Lesurf wrote:
In article <3d489af1-f15b-520d-1bc5-b3adae6da04c@outlook.com>, Robin
<rbw@outlook.com> wrote:
I'm using the '-f' of 'at' to point at files that contain things like
vlc --program=28224 dvb-t2://frequency=690000000:bandwidth=8
I may have misunderstood but have you tested this with *only* that
"known good" command (to get VLC to open the programme at the required
time) and *nothing* about recording etc? Until that works I'd not worry >>> about things like recording time and file location.
Yes. Commands like the above work as expected. They start up VLC and it
finds and plays the station whose PID is given the value (28224 in the
above example which IIRC is TalkingPicturesTV). At the monent I then
press
the 'record' icon and it starts recording the stream into a .ts file.
If "at" with that causes VLC to open at the right time I don't see how
the problem can lie with "at".
I've found some remnants of what I used to use with VLC before I
switched to NextPVR for recording. The following works now in Windows
to open the programme and record for the set 20 seconds. I can't test
on a Raspberry Pi as I've no DVB-T dongle free.
"C:\Program Files\VideoLAN\VLC\vlc.exe" --program=17540 dvb-t2://frequency=545833000:bandwidth=8 --sout="#standard{access=file,mux=ts,dst=OUTPUT.ts}" --run-time=20
vlc://quit
NB: no point asking me "why...?" I found getting VLC to record DVB-T
was for me like the way young lads were (allegedly) told how to get down
from the top of a hay rick.
NB: no point asking me "why...?" I found getting VLC to record DVB-T was
for me like the way young lads were (allegedly) told how to get down from
the top of a hay rick.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 08:55:34 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,326,322 |