save DVB-T program to file - command line question

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

save DVB-T program to file - command line question

Postby grozea » 12 Feb 2009 00:17

I'm trying to save a separate DVB-T program to a file. I searched the forums and found some hints. With this command

Code: Select all

C:\Program Files\VideoLAN\VLC\vlc.exe dvb-t:// :dvb-frequency=522000 :dvb-bandwidth=-1 :program=5840 :sout=#duplicate{dst=std{access=file,mux=ps,dst=C:\temp\test.ps}} :sout-all
I can save to file, but I get the entire stream for that frequency i.e. multiple tv channels in one file.

question 1: What do I need to add to narrow the above code so that only one program/tv channel gets saved to file?

question 2: Can someone also help me sort out if I should use ps or ts as mux. If the ts/ps choice depends on what I aim to do with the files then let it be known that I want to just play them back on my local computer through VLC and maybe edit some parts (cut out commercials and so on) in some common video editing software.

(note: I have tried to read the manual and searching the forum before asking the above question but I didn't manage to solve it that way. The command line interface is very complex and so learning it is a slow process for some of us...)

Lotesdelere
Cone Master
Cone Master
Posts: 9964
Joined: 08 Sep 2006 04:39
Location: Europe

Re: save DVB-T program to file - command line question

Postby Lotesdelere » 12 Feb 2009 01:24

This is the command line I'm using:

Code: Select all

dvbt:// :dvb-frequency=730000 :dvb-bandwidth=8 :program=1031 :sout=#duplicate{dst=std{access=file,mux=ps,dst=E:\temp\test.ps},dst=display}
Which is quite similar to yours.
But be sure that the program number you are using is the correct Service PID, aka SID, because if the program you specify is not found then the whole stream will be recorded.
And also bandwidth=1 is quite strange, it should be 7 or 8 depending on your location.

PS stands for Program Stream and TS for Transport Stream.
As you can guess PS is more dedicated to a single program, but I'm not sure if a H264 stream will playback properly later in a PS stream. In fact I've never seen any H264 stream in a PS but always in a TS. PS is OK for MPEG2 though, but I'm not a specialist so I only speak about my own experience :)

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 12 Feb 2009 08:24

Thanks, got it working now! It was the :sout-all part that I had copied from some other discussion on the forum that was the problem. So this works fine:

Code: Select all

C:\Program Files\VideoLAN\VLC\vlc.exe dvb-t:// :dvb-frequency=522000 :dvb-bandwidth=-1 :program=5840 :sout=#duplicate{dst=std{access=file,mux=ps,dst=C:\temp\test.ps}}
And if I simultaneously want to view the program:

Code: Select all

C:\Program Files\VideoLAN\VLC\vlc.exe dvb-t:// :dvb-frequency=522000 :dvb-bandwidth=-1 :program=5840 :sout=#duplicate{dst=std{access=file,mux=ps,dst=C:\temp\test.ps}, dst=display}
I'm tuning in standard DVB-T channels (no HD channels) so I guess it is MPEG2. Wikipedia states:
Source coding and MPEG-2 multiplexing (MUX): compressed video, compressed audio, and data streams are multiplexed into PSs (Programme Streams). One or more PSs are joined together into an MPEG-2 TS (MPEG-2 Transport Stream); this is the basic digital stream which is being transmitted and received by home Set Top Boxes (STB).
So that fits what you say about transport/program streams. I tested setting both mux=ps and mux=ts and the output played fine in VLC, some other media players and an editor. So maybe it makes no difference which one I choose. Still, there might be some relevant difference. Since I'm planning on do all my DVB-T recording through VLC in the future I'd appreciate any other advice on the PS/TS issue. I'd hate to late find out that there's a clear drawback with on or the other which might force me to time-consuming format conversion of all of the saved files. Better to get things right from the start :)

Lotesdelere
Cone Master
Cone Master
Posts: 9964
Joined: 08 Sep 2006 04:39
Location: Europe

Re: save DVB-T program to file - command line question

Postby Lotesdelere » 12 Feb 2009 08:58

Since I'm planning on do all my DVB-T recording through VLC in the future I'd appreciate any other advice on the PS/TS issue.
Only advice I could give you is to always save your master record to TS because AFAIK you'll find more free tools and editors for TS than for PS.

Also have a look at PVAStrumento and ProjectX which are a must have for DVB.

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 12 Feb 2009 20:39

'BTW, have you experienced a need to "clean up" DVB-T files saved through VLC? I've been using ProbDVB for a long time and the files it outputs can't be played in VLC and some other players without cleanup (as previously discussed in several forum threads here edit: sorry, I now see that you've posted in such a thread so of course you're aware of that already; viewtopic.php?f=2&t=53576&start=0 Anyway...). I've used VideoReDo for cleaning up those files but it is time consuming so I'm hoping that recording with VLC will remove the need for cleanup completely.

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 12 Feb 2009 22:32

One more question: is it possible to put the commands for opening and recording a DVB-T program in a .m3u file?

I've previously learnt how to use a .m3u to tune in a channel. Example:
#EXTM3U
#EXTINF:1,SVT1
#EXTVLCOPT:program=5840
dvbt://frequency=522000:bandwidth=-1

But I'm unsure on how to add the recording parts from the command line examples already given.

Lotesdelere
Cone Master
Cone Master
Posts: 9964
Joined: 08 Sep 2006 04:39
Location: Europe

Re: save DVB-T program to file - command line question

Postby Lotesdelere » 13 Feb 2009 00:33

'BTW, have you experienced a need to "clean up" DVB-T files saved through VLC? I've been using ProbDVB for a long time and the files it outputs can't be played in VLC and some other players without cleanup (as previously discussed in several forum threads here edit: sorry, I now see that you've posted in such a thread so of course you're aware of that already; viewtopic.php?f=2&t=53576&start=0 Anyway...). I've used VideoReDo for cleaning up those files but it is time consuming so I'm hoping that recording with VLC will remove the need for cleanup completely.
It has nothing to do with the program you use for recording but with DVB transmission. Any DVB transmission creates reception errors that you usually don't notice because the player keeps the audio and video in sync (thanks to the TS format).
The problems will occur when you edit/cut or transcode the video, it's likely that you are going to lose the A/V sync hence the need to repair the file before doing such things (always keep a backup of the original one!).

One more question: is it possible to put the commands for opening and recording a DVB-T program in a .m3u file?

I've previously learnt how to use a .m3u to tune in a channel. Example:
#EXTM3U
#EXTINF:1,SVT1
#EXTVLCOPT:program=5840
dvbt://frequency=522000:bandwidth=-1

But I'm unsure on how to add the recording parts from the command line examples already given.
TBH I've never tried to do it.
But I guess it should work, I'm not sure about the correct syntax to use though. Maybe something like that should work:

Code: Select all

#EXTM3U #EXTINF:1,SVT1 #EXTVLCOPT:program=5840 dvbt://frequency=522000:bandwidth=-1:sout=#duplicate{dst=std{access=file,mux=ps,dst=E:\temp\test.ps},dst=display}

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 14 Feb 2009 16:07

Well it seems to have something to do with the program used, because if I record with ProgDVB then VLC can't play it back (in default mode; but can do it with some tweaking). Now when I record in VLC the files play back fine in VLC but give sync problems in some video editing programs. So you're right that I need to fix the file after recording it in both cases but the program used seem to have some influence too.

I will test recording via VLC to both PS and TS for a while and see if any practical differences shows when editing, in playback and so on.

I also made an autohotkey script for using VLC as DVB-T recorder together with TV-browser (FOSS tv guide software) and WinTVCap_GUI (for easy scheduling from tv-browser).

Anyone interested should check this forum thread for script + details: http://hilfe.tvbrowser.org/viewtopic.php?f=14&t=11940

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 23 Apr 2009 10:35

An additional question: I want to record some the audio only of programs on radio channels that broadcast over DVB-T (technically as TV channels not radio). The standard command line for recording works in the sense that it outputs a working .mpg. But I'm having a hard time getting audio editors to accept that audio file. Is it possible to force VLC to on the fly output to some other audio format? Like mp3? If so, can you help me out with an example command line for that.

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 13 May 2009 20:30

With 1.0 RC1 the syntax for recording seems to have changed. I can't pinpoint what is different but all my old scripts for recording have now stopped working. Can someone point me to information on exactly what is different? Thanks.

Edit: By the way, when a DVB-T stream is playing is there some way to from within the VLC gui grab the full command line syntax needed to get VLC into that exact state. That would help us end users to troubleshoot these issues a lot I think.

Lotesdelere
Cone Master
Cone Master
Posts: 9964
Joined: 08 Sep 2006 04:39
Location: Europe

Re: save DVB-T program to file - command line question

Postby Lotesdelere » 14 May 2009 00:18

With 1.0 RC1 the syntax for recording seems to have changed. I can't pinpoint what is different but all my old scripts for recording have now stopped working. Can someone point me to information on exactly what is different? Thanks.
Now you need to add 000 to the frequency you were used to use (e.g. 642000 becomes 642000000).

Edit: By the way, when a DVB-T stream is playing is there some way to from within the VLC gui grab the full command line syntax needed to get VLC into that exact state. That would help us end users to troubleshoot these issues a lot I think.
In the Capture Device tab tick the box Show more options at the bottom and you'll be able to see and to copy a part of the command line.

grozea
Blank Cone
Blank Cone
Posts: 33
Joined: 09 Oct 2008 03:13

Re: save DVB-T program to file - command line question

Postby grozea » 15 May 2009 02:28

Now you need to add 000 to the frequency you were used to use (e.g. 642000 becomes 642000000).
Thanks! Got it working again now.

A good feature in 1.0 RC1 is that the title of the current program is shown in the statusbar when playing dvb-t. I don't think that was there before.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: save DVB-T program to file - command line question

Postby Jean-Baptiste Kempf » 15 May 2009 12:05

Now you need to add 000 to the frequency you were used to use (e.g. 642000 becomes 642000000).
Thanks! Got it working again now.

A good feature in 1.0 RC1 is that the title of the current program is shown in the statusbar when playing dvb-t. I don't think that was there before.
Great. Thanks for this report.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 34 guests