Jump to content

Videorecorder-Plugin (eng.)

Recommended Posts

I really like the new pid selector.


Yes, having PAT and PMT selected by default was Derrick's idea - and it turned out to be a good idea, because when PAT & PMT are included in a TS recording, it can be played back with the Elecard demultiplexer (probably with the MS demultiplexer too, I didn't test it yet).


Oliver even succeeded in recording two channels at the same time and playing them back simultaneously - the Elecard demultiplexer creates an output pin for each audio/video stream in the TS.


However, if only the audio and video stream are present, it requires the MainConcept demultiplexer, which isn't available on most PCs.



Link to post

och, das ist jetzt nur so, wie die ISO 131818-1 einen TS-stream haben will. In der PMT stehen alle notwendigen details zu den elementary streams und die pmt wird über die PAT gefunden :idiot: ..damit können alle streams abgespielt werden, auch ac-3, wenn das dabei ist. Selbst aufnahmen im ATSC standard machen keine schwierigkeiten (hab aber nur samples).


Programme wie pj.x brauchen das nicht, weil sie die PES header untersuchen. Da könnte es aber im prinzip schwierigkeiten geben, wenn da nicht alles so wie geplant steht.


Ähnlich ist es mit dem PS. Da hier nur die elementary streams gemuxt sind und ac-3 einfach nichtssagend als private stream gekennzeichnet ist, brauchen einige programme zusatzinfos über die art der elementary streams, da sie die nicht aus übergeordneter PSI und dem PES header entnehmen können. Eigentlich ist der gemuxte PS deshalb mehr ein DVD-stream, obwohl dafür allerdings die pes_packets zu lang sind (der dvbrecorder für die dvb2000 berücksichtigt das sogar auch :( )


Ich hoffe, ich habe mich klar ausgedrückt :lol:


hm, wrong language again.. (if somebody insists, I'll translate this redundant posting :D )

Link to post
  • 2 weeks later...

I've just updated the Video Recorder Plugin (release canditate version) in the Service Center.


This version is supposed to be the next release, and at the same time the recording routines (except TS and Marfi's recorder) are supposed to be part of the next DVBViewer release.


So if nobody says 'Hey, that doesn't work like it should" it will go that way...


The latest changes:


- Reorganised the recorder buffer handling in order to make it more fail-safe.


If the smart buffer is enabled, the plugin now allocates a minimum of 2 MB at any case before the recording starts. If you allow more, the rest will be allocated dynamically if there is any need for it. The previous test versions started with 0 MB (like the DVBViewer) and allocated all the memory dynamically.


Furthermore the plugin tries to anticipate a lack of buffer space by allocating additional memory earlier than before. The actually used memory is displayed when recording.


- Made some parts work more efficiently and faster


Please let me know if there's something going wrong - last chance to fix bugs before the coming DVBViewer release!



Edited by Griga
Link to post

First of all, props to Griga - this plugin rocks :)


Two minor suggestions/questions:


1 - Timed recordings - would it be possible to append the 'description' of the timer event (the text after 'VRP') to the filename like the main program's recording feature does?


2 - I've noticed some inconsistent behaviour when aborting a timed recording using the plugin - after pressing 'Stop' and 'Close', the main DVBViewer window sometimes gets minimized (not a real problem), but sometimes it gets minimized and can't be restored by clicking on the tray icon - I have to close DVBViewer using the tray icon's context menu and restart it to make the main window re-appear. Has anyone else seen this or am I doing something wrong?

Link to post

hi Griga,


it's a really great plugin !

but I was wondering if you could implement two useful (imho) options/functions:


1- split now button

2- split on audio change option


1 is simple

2 is useful when you grab from channels like KIKA, where they often change the audio properties from stereo to mono and vice versa.




Link to post
1- split now button
START <-> STOP Or use pause button if you dont want record a special part
Link to post



1) Maybe - I'll have a look at it.


2) I don't think that you are doing something wrong. Displaying a window in a Delphi-DLL is a tricky thing... I was quite difficult to make it work. So I already suspected that it might not behave well under all conditions. Sorry - at the moment I've no clue how to fix it, since I can't test it on your PC.




1) As Klausing has written...


2) Split on audio change... I already thought of it. Unfortunately there is no 100% reliable method to detect audio frame headers on the fly, which carry the audio mode information. Data bytes may be mistaken as a frame header, and then you'll get an audio mode change where there is none, resulting in an unwanted cut. Furthermore, there are channels that change the audio mode permanently (e.g. n-tv switching from stereo to joint stereo and back several times per minute). Especially detecting a MP2 <--> AC3 change would require an enormous code overhead... if a software cannot rely on a constant encoding method, it really becomes difficult.


When reading audio from a file, it's much easier, since it is possible to look ahead and determine what comes next. That's why I rather would leave it to programs like ProjectX and PVAStrumento to do the splitting.


However, detecting a stereo <--> mono change might be possible, by keeping track of all audio frames (up to now the plugin only performs some kind of spot checking of about every 6th frame, in order to display the audio parameters). I will think about it... but it has to be considered that even with a very reliable audio mode detection you may get unwanted cuts, since channels (like ZDF) sometimes change the mode one minute *after* a movie has started.



Link to post

the <start>/<stop> idea is evident, but it comes along with a little problem (at least at my site here):

when I klick on <stop> it takes several seconds until the <start> will be available... so I'm loosing some seconds of the mpeg file.



the mono/stereo change is the more critical (I'm grabbing from KiKa often) ! so it really would be nice....




about the "smart buffering" problem that I reported in the SuperBowl thread:


:wub: forget it !


it was a problem here at my site :rolleyes: . that damned win2k simply refused to take the udma mode at my new maxtor drive (250G) when it was connected to the primary ide-port as master. so the drive was creeping in pio mode here (which caused several performance problems during grabbing). inside the bios the drive was reported correct as udma-6 (as it should be).

I really don't know why the damned os has choosen the pio mode.

I even deleted the PioOnlyMode entries in the registry, but nothing has had success.

meanwhile I switched over primary and secondary ide port and now all my ide devices (dvd-rom, pioneer-a06 and maxtor hdd) run in proper dma mode.

Edited by Gandalf_der_Graue
Link to post

I agree with @GdG, a "split now" option in the plugin would be great (why not take the good ideas from other tools? :wub: )


The split should be at the borders of the entities that are recorded (ts_packet with TS_recording and pack with PS). Then a seamless file could be produce by other tools e.g. pj.x :rolleyes:


Imho split at format changes could be better done with postprocessing tools.

Link to post
Then a seamless file could be produce by other tools


As far as it concerns TS recording probably yes. But when splitting a MPG recording, each fragment gets its own system header, its own end code, in order to create valid program stream files... how should this be handled? Is ProjectX able to concatenate them?


One more problem: While experimenting with the VR plugin, I found out that in some cases (especially with RTL channels) the audio frames are not aligned to the PES packets resp. to the data packets received by the recorder. That means, splitting will cut an audio frame into pieces. It would be quite expensive to avoid this (additional buffering, recalculating time stamps...).



Link to post

I tried with ts_recording and apparently some ts_packets were missing.. the superbowl was cut as well but I have no intention to glue it togehter :rolleyes:

For the rest maybe ask dvb.matt for advice?


btw. I forgot, at the beginning of a ts_recording there are always 3 or 4 CC errors. That doesn't matter but it may help. I guess the filter has to be prepared by the card.

Edited by Derrick
Link to post
I tried with ts_recording and apparently some ts_packets were missing..


I think it's due to the recorder. I did it this way: TS files *always* start with a packet that carries a payload_unit_start_indicator in its header, but can be stopped at any moment. Can probably be done better...



Link to post

what about the idea of an OTR (one touch recording) button for the vr plugin ?


when you press this button, the vr starts to record immediately as multiplexed program stream with a timer in the background running down 30 minutes, so that the recording stops automatically after 30 minutes.

if you press the OTR button again (during recording), another 30 minutes are added to the timer (as often as you press OTR).


I really liked this feature at my sony vhs recorder, because often when I watch (and record) something in the evening, I get really tired but won't miss the rest of the film (or sports event).

so, with the actual vr plugin, I see only two solutions for this problem: setting up my alarm clock for the end of the film (so that I have to wake up in the middle of the night, go to the pc and stop the recording manually) or simply grab the whole night, getting a huge file which needs to be cut in postprocessing...

Edited by Gandalf_der_Graue
Link to post
  • 2 weeks later...

A final version of the Video Recorder Plugin was supposed to be released, but things went differently... :bye:


There is something new to test, and I would like everybody to take part in it, so we come to know, wether it should be included in the next DBViewer release or not.


There are two new Checkboxes: Disable Video/Audio. They are supposed to switch video/audio playback off/on at any time, even during an ongoing recording, in order to reduce the processor usage. Here's what has to be checked:


- Does switching video/audio on/off while recording create errors in the file?


- Does switching over to another channel raise problems, when A/V is disabled?


Please report the source filter and the video/audio decoder that you've used. Disable AV does not work with the SkyStar 4.2 source filter. The plugin must be connected to the filter graph for the new functions to take effect (switch the "Stay Connected To..." option on).


Some more new features:


- Selecting the Video Recorder Plugin in the DVBViewer's Recorder Settings Window for timer recordings works now (you don't have to enter VRP in the description anymore).


- There is an additional checkbox, that lets the plugin create DVD-compliant packets in MPG/M2P files (always 2048 bytes), in order to facilitate direct file playback on stand-alone DVD players.


A forum member (Bastel123) already tested it, with mixed results... finally it worked, but audio and video were a bit out of sync. If you have such a player at home, you may try. For this, it is recommendable to additionally check the "Generate System Clock Reference" option.


That's all at the moment... please let me know how it works.



Edited by Griga
Link to post

I've just uploaded a Videorecorder Plugin update to the Service Center (version 2.1). It contains some bugfixes and enhancements:


- Bugfix: Including videotext and EPG in a TS recording didn't work, when the DVBViewer Filter was used (due to changes in the DVBViewer).


- Bugfix: The Disable Audio checkbox didn't work occasionally


- New option: The Packet Size section on the Specials Tab now contains three radio buttons: Unchanged / Max. 2048 / Always 2048 (DVD).


The first 'Unchanged' option lets the plugin create MPGs with an unchanged packet sizes (like the DVBViewer).


The second one creates packets with a maximum size of 2048 bytes. By allowing sizes that are smaller, it avoids the 10%stuffing/padding overhead of the former 'Create DVD Packet Size' option, but should be sufficient to avoid playback problems e.g. with WinDVD. It is quite likely that this option will be included in the next DVBViewer release.


The third option - like the former 'Create DVD Packet Size' option - creates always 2048 bytes packets, or more precisely, lets the plugin align the data packets to 2048 byte borders by filling the remaining space with stuffing bytes. This may be suitable for stand-alone DVD players, but increases the file size.


- New option: 'Keep PIDs for Timer Recording' in the PID Selection Window. If it is switched on, the plugin will not automatically update the window, when you switch over to another channel, thus preserving the PID settings for a timer recording. This formerly could be achieved by closing the window via the OK button, but I think, it's much clearer now.


- Bugfix: Records AC3-PVAs in a way that they can be demuxed with ProjectX now. However, it is not recommendable to use PVA for AC3 recordings, since it is non-standard, and the files can not be played back on a PC, since the Elecard PVA Demuxer doesn't support AC3. If you want to know more about this topic, have a look at the end of this thread in Lucikes forum.


- Several minor enhancements concerning the user interface and the internal file handling.


I hope, the plugin will behave like the 'final release' that it is supposed to be. Please understand that I fully concentrated on accurate MPG files and the new Disable A/V checkboxes... both was quite time-consuming. Requests like the 'Split Now' button will be handled later.



Edited by Griga
Link to post

Sorry - I just found out, that the plugin version 2.1 contains a bug in the handling of the VRPlugin.ini file. ;)


The lower part of the PID Selection Window may not be displayed, since it has been enlarged in version 2.1, but the plugin still reads the old extent from the INI file.


You can fix it by deleting the VRPlugin.ini file in DVBViewer\Plugins, or by deleting the [frmPIDSelection] section in the INI file with a text editor, if you want to keep the other settings.



Link to post
  • 2 weeks later...

Another VR-Plugin update in the Service Center (version 2.2)... and something new: a TSPlayer that allows to play back transportstream (TS) files while they are recorded with the VR plugin (download), thus providing unlimited timeshift - even for two or more channels from one transponder simultaneously, if you like.


First the VR plugin improvements:


- There were missing packets in the first half second of TS recordings when the DVBViewer Filter was used (due to the internal handling of the TS stream in the DVBViewer). Fixed now.


- Reading the wrong extent of the PIDSelection Window from an old VRPlugin.ini file (hopefully) fixed - see above.


- A new checkbox: Disable internal teletext PID. Switches the DVBViewer's teletext off and performs "Rebuild Graph" in order to let it take effect. May help to avoid problems when recording more than one channel at the same time as TS (jerky live-playback and missing packets in the recorded files).


Up to now there is no explanation for this issue - it doesn't occur on all PCs and may be caused by the SkyStar2 hardware. TechniSat is looking after it at the moment. However, recording multiple channels from one transponder always works after having reset the SkyStar2 by restarting the PC or by deactivating/reactivating the SS2 in the device manager. But after having closed and re-opened the data stream from the SS2 drivers only once, there are only 6 channel-specific pids (video, audio, PMT, teletext) for multiple-channel-recordings available. Each additional pid leads to the disturbances described above.


The closing and re-opening happens each time when the DVBViewer rebuilds the filter graph - e.g. when a 'rebuild graph' or slow channelswitching is performed, or when you switch over from TV to radio or back. The internal teletext pid is one of the channel-specific pids. So when it is disabled, there is one more pid available for TS recording, e.g. allowing you to record two channels at the same time each with its video-, audio and PMT pid, even when the SS2 is already in its 'problematic' state. The pids from the General Section of the PIDSelection Window do not influence this, though.


And now something about the new TSPlayer. First of all: It has been programmed for experimental purpose only, in order to explore some possibilities to enhance the timeshift capabilities of the DVBViewer. You use the TSPlayer at your own risc! It is not guaranteed to work flawlessly on every PC. It will only work - if ever :) - with the DVBViewer full version.


Here are some basic instructions:


1) Launch the DVBViewer, start a TS recording in the VR-Plugin, then wait about 30 seconds. The TS recording *must* contain the PAT and the PMT for all channels, that you want to play back with the TSPlayer.


2) Launch the TSPlayer and select the desired video- and audiodecoder. The TSPlayer does *not* check wether the decoders are present in your system. If not, the DirectShow graphbuilder will select a default decoder.


3) Select the TS file that you want to play back by clicking the File Button. A listbox display all the the services (channels) that are contained in the file.


4) Start playback via the Start Button or by double-clicking an entry in the listbox. It is recommendable to switch off audio in the VR Plugin Window - otherwise you will hear the live and timeshifted sound at the same time. Double-clicking the TSPlayer's video window switches to full screen mode.


If there is more than one channel in the TS file and you switch over to another channel by double-clicking an entry in the listbox, the TSPlayer will remember the current position and resume playback there, when you come back to the channel. Thus you can watch two or more 'timeshifted' channels without missing anything.


Since the TSPlayer is no fully-fledged user-friendly application, you should know the following drawbacks:


- If you want to play back TS files while the DVBViewer is *not* running, you have to register the DVBViewer Filter permanently: Close the DVBViewer, if it is running, move the file dvbsource.ax from DVBViewer\Filters to another folder and register it there, e.g. by using the RadLight Filter Manager from the Service Center.


- If an error occurs, the TSPlayer won't display any message (yet). It just will refuse to work.


- If you use the TSPlayer for timeshift playback, there are two DirectShow Graphs running on your computer (the DVBViewer's and the TSPlayer's). This may cause problems, depending on the speed of your PC and the characteristics of the involved filters and your graphics card. In case of problems, selecting another decoder may help. Or try to disable the DVBViewer's audio/video by using the GraphSelector Plugin from the Service Center, before starting the TS recording.


- The video window is kept very simple - there are no 'sophisticated' features like controlling brightness, contrast or the aspect ratio yet.


- The TSPlayer doesn't check the limitations of your file system (NTFS is recommended) or the remaining space on your hard disc. *You* have to take care of it.


Probably you'll find a lot of things that could be enhanced - but before I make any further efforts, let's see what Christian does. I'm sure the next DVBViewer release will come with enhanced timeshift capabilities, which probably will supersede the TSPlayer. However, TSPlayer updates will be announced here and will be available via the download link above.




P.S. the program icon has been designed by my daughter... :bye:


Edited by Griga
Link to post

Video Recorder Plugin updated to version 2.3 - download as usual from the Service Center:


- Pause Button removed. I've found no way to perform a 'clean' recording pause on the fly without getting a corrupted MPEG2 file structure at this point. So I finally dropped it.


- Split Now Button added. As requested above. Lets the VR Plugin close the current file and continue the recording in a new file.


- Lossless split. Splitting a recording in several files is performed without loosing data. Thus the fragments can be concatenated again (e.g. with ProjectX), without getting errors or missing frames in the resulting file. Furthermore, each file of a splitted MPG recording is a 'clean' recording on its own, without a corrupted file structure at the beginning.


- Automatic splitting after having reached a given file size can be switched off/on while recording - following a proposal from Klausing.


And finally good news :idiot:


- More reliable multi-channel TS recording. Thanks to Marfi, who gave an important hint. Forget about the issue described above.



Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...