26-09-2003 - Fixed a Bug in searching for a sequence header by adding an "s" to the regex. Thanks to Dimitri for reporting this one. - Fixed a Bug in Audio Detection. Thanks to Boergen reporting that one. - Added "bimode FH" to every Filehandle, so that vdrsync works with Windows: Thanks to Helmut Auer for pointing this out. - added option -mkiso, a DVD-Iso-Image is created and all other Files are deleted. - applied a Patch from Thomas Koch that allows the generation of generic mpeg Files in addtion to DVD-specific MPEG2 Files (tcmplex -m 2) (Thanks, Tom) 22-09-2003 - Somehow I managed to introduce a serious bug in the last minute, the Version 0.1.2.0 produced desynced Videos after a cut. The bug is hopefully fixed. 18-09-2003 / 21-09-2003 There are so many new features / bug fixes, that I lost a bit the count on changes. Highlights: - vdrsync is roughly 30% faster (at least on my machine). Limiting is now network / disk performance (again on my machine, P-IV 2.4 Ghz) - vdrsync.pl is only a single file now, no more copying of MPEGSTREAM.pm to somewhere in @inc or modifying @inc - included silent audio frames in MP2 and AC3 format (thanks for AC3 to the ds.jar project). Missing audio is now replaced by silence, not by the first audio frame found in the recording. That should prevent "noise" at the cutting points. - Added the "feature" to delete audio streams that can not be multiplexed by tcmplex, to prevent the burning of DVDs that stop having sound after a few minutes. This caused some other problems, so it was partially reverted: If the audio format changes very soon after the beginning of a recording, the first few seconds are replaced by silence. The same happens if the audio format changes at the end of a recording. Useful mainly for mono recordings, that are surrounded by stereo. - Added a control mechanism for the amount of audio in the streams. That means, that the actual length of encoded audio is compared to the PTS timestamp infos present in the PES headers. There are some AC3 streams that contain too many audio frames, and that would lead to a slow drift of the audio stream out of sync. This should be corrected. - The determination of the aspect ration, audio format etc is now done at regular intervals in the recording, not only at the beginning. The information gathered is analyzed and printed at the end of the run, not at the beginning as in the previous version. This should ensure that the correct information for the movie is printed, even when the format at the beginning is not yet the format of the main movie. The correct aspect ratio is also used for the optional dvdauthor run - new switch -show-time-drift. Information about the difference between PTS timestamps and frames found in the stream are printed - new switch -script-output. At the end of the run a summary about all streams is printed in a format that should be easily readable by scripts - new switch -dump-debug-buffer. If you have a recording that terminates itself with an error message, or kills some of the audio streams, this switch will cause vdrsync to dump 3 MB of the recording to the file debug.buffer. Please mail that file to me, and I can try to find a solution - or at least an explanation for the crash. - New option to switch -m: panteltje. If invoked with the -m panteltje switch, vdrsync tries to multiplex the files with tcmplex-panteltje instead of tcmplex. This might become the standard in future versions, since tcmplex-panteltje is much easier to compile than transcode, and tcmplex from transcode changed too often in the past to be easily used. - New switch -audio-only. Only audio is processed, that's all... Useful for radio recordings. - Handling of PTS overflows. PTS overflows should be detected and handled. I don't have many recordings to test, but the few I have worked ;) - Fixed a bug in Audio analysis, that cou trigger a program stop when the Audio stream did not start with a frame but within a frame AND by bad luck there were some Bytes in the first broken frame that lokked like a frame start - Fixed a Bug in syncing the start of a recording, that would hopefully have no real impact on the syncing. But under certain conditions this could lead to a endless loop (thanks to Torsten/WarEagle). - Fixed the bevavior of the -audio-only switch. Audio Formate changes are now tolerated such a case. 21-07-2003 general: - VDRSYNC now also accepts the path to the recording as a parameter for the input files, there is no need to specify each of them! - More information about the video stream is extracted an printed - In case of an error, vdrsync exits now with an error code of 1 - added the following options: -delay-audio adds some user defined delay to the audio streams -postexec "command" executes "command" after finishing. In future versions some variables can be included in "command" that vdrsync will replace by values it extracted from the vdr file, like duration, resolution or aspect ratio of the recording. In this version only the length can be specified by VSlength. Example: -postexec "echo the movie had a length of VSlength seconds" will output at the end of the Script the movie had a length of 306.72 seconds -master-dvd will create a dvd-image fit for burning from the recording with a chapter mark set every 10 min. Sound is included as follows: If exists, the AC3 stream is included as the first Audio stream, followed by the first MP2 stream. If no AC3 stream exists, two non-AC3 streams are included. At the end of the Script a command is printed, that allows the burning of the image "on-the-fly" to a DVD-R/RW device. -divx creates a single(!)-pass divx movie using transcode. AC3 can be included by adding the ac3 parameter to the switch, like -divx ac3 This is just a proof of concept. 03-06-2003 in MPEGSTREAM.pm - got a sample where at the very beginning of the video one additional byte was added. This prevented mplexing of the Video stream. Added a check for "additions" at the video start. in vdrsync.pl - incorporated a patch from ernie, that allows to automatically produce a divx from the stream (check the beginning of vdrsync.pl if you want to set some additional parameters) 27-05-2003 in MPEGSTREAM.pm - removed the checking of the data-align bit in check_mp2_frames. Some stations understand the bit differently from how I understand it, and set it in the header without a direct syncword afterwards. - Found something nasty: if a audio stream has totally different timestamps, the script "correctly" calculated the number of frames needed to sync the frame without checking whether the result makes sense. If the resulting number was huge, the script tried to inserted this huge number of frames in memory. If you want to insert 100'000'000'000 Frames in memory, your system is coming to a halt.... Added a check that discards the stream if it can not be synced reasonably, i.e. by adding max. 1000 frames. 25-05-2003 in MPEGSTREAM.pm - Fixed a bug that was caused by the assumption that within a recording the audio frame header does not change unless the format of the audio changes. Well, the header does change, in particular the private bit changes on some stations - Fixed a bug that caused stream detection of audio streams to fail. The script now actively searches for the first audio frame in the first PES-Packet that has a timestamp. It does not wait for an aligned frame in a packet with a timestamp, because on some stations this never / rarely happens. in vdrsync.pl - added the stop switch, the ignore switch, the dump-packets and dump-payload switches 22-05-2003 in MPEGSTREAM.pm - The new ignore function had a bug that caused the script to crash when a new stream is suddenly appearing... Just added the missing next at line 1299 22-5-2003 in MPEGSTREAM.pm - Changed the script to ignore streams that it can not analyze, I had a recording with a TELETEXT stream where it crashed. Now these streams are ignored. - Changed the script to analyze the streams in a recording before it starts to process them. This is useful for just getting info about the audio streams in a recording without starting the real demux and sync process. - Fixed a bug that occurred in 80 KBit MpegI_Layer2 streams, when a cut makes it necessary to search for the start of the next audio frame. The 4 Byte value that I use to find the audio frame start contained a / when viewed as text. That makes the 4 Byte value a bad regular expression... Just added \Q to the beginning of the pattern match. - Added the possibility to get the filenames of the output files. This makes it easier to use the output files for other things like multiplexing. - Tried to honor the data-align flag in the PES-Header by discarding data from the previous audio packet. This helps if the audio frame start can not be found in AC3 streams. The flag indicates that the next frame start is directly after the header. So the script can just discard the leftovers of the previous packet and get the next frame start. in vdrsync.pl - Added -m and -i switches. -i just prints some info about the selected audio and video streams and then exits -m tries to take the files that were produced during demux and sync and to build an DVD-compatible MPEG-PES stream, that can be used for dvd-production or just to check av-sync with mplayer or xine or ... I have not yet decided what to do if too many audio streams are found (more than two). I just take the first two audio streams for multiplexing. 20-5-2003 - Found a stupid bug that I introduced yesterday evening when I realized that the main movie stream is not always e0 and tried to compensate for that. This bug resulted in an error message and prevents AV-sync at cuts in the movie. Since recordings that are not cut are not affected, the bug went unnoticed. Sorry