Method and apparatus for storing a stream of audio-visual data
The invention relates to a method of storing a stream of audio-visual data comprising semantically unrelated segments on a recording medium, the stream of audiovisual data having meta-data associated with it, indicating the boundaries of the multiple semantically unrelated segments.
The invention further relates to an apparatus for storing a stream of audiovisual data comprising semantically unrelated segments on a recording medium, the stream of audio-visual data having meta-data associated with it, indicating the boundaries of the multiple semantically unrelated segments, the apparatus comprising a processing unit
Such a method is commonly used by such apparatuses, known as video recorders. In conventional video recorders, the audio-visual data is analog and recorded on a tape. Currently, more and more video recorders are presented that store the audio-visual data digitally on a disk. For this purpose, optical discs like DNDs are used, as well as hard disks. The advantage of using disks as compared with tape for recording audio-visual data is that the data on a disk is randomly available instead of linearly. Data can even be stored in fragments on the disk providing more efficient use of the storage space. The latter option, however, is not advantageous for play-back purposes. The reason for this is that a reading head of the disk drive has to switch from one part of the disk to another, resulting in a reduced bit-rate and even black-outs in case of buffer underflow due to the reduced bit-rate. This is especially the case for optical drives, of which the read/write head moves much slower than that of a hard disk. Therefore, it is preferred to store streams of audio-visual data in contiguous areas on the disk.
A problem with the recording of programs is that the size of the programs is not known beforehand. This is especially the case when the recording operation is started manually and no end time has been set. However, also when an end time has been set, problems may still occur. An example of this is the complexity of the program - scene changes, fast moving scenes - which influences the size of the file to be stored after
compression. Therefore, it is not known what amount of data is stored upfront and it is not possible to reserve one contiguous free space on the recording medium.
Moreover, a user may want to record multiple programs that come after each other on the same channel and to program this in one recording. Even when the video recorder would be able to determine the size of the full stream to be recorded, it would still treat the recording as one file that may have to be stored in fragments due to lack of storage space, whereas the multiple programs might have been recorded in contiguous parts each when each program would have been recorded as a single event.
It is an object of the invention to provide a method that allows recording multiple programs in one event and storing program in a contiguous area.
This object is achieved by the method according to the invention, and is characterized in that the method comprises the following steps: identifying the semantically unrelated segments by means of the meta-data; determining an amount of data of each segment to be stored; determining for each multiple semantically unrelated segment a contiguous free storage space on the recording medium, each contiguous free storage space being large enough to store the corresponding segment and wherein the determined contiguous storage spaces are not overlapping; and storing the segments in the corresponding contiguous free storage spaces determined in the previous step.
By using meta-data like an electronic program guide (EPG), a video recorder knows how many semantically unrelated segments - in most cases TN-programs - are coming up and how long they will take. The size of the segments to be stored may be determined therefrom. Subsequently, contiguous areas for storing the segments may be determined. The book 'Modern Operating Systems' by Andrew S. Tanenbaum, ISBN 0-13- 58818-0, presents several methods for memory allocation.
An additional advantage is that the semantically unrelated segments like TN- programs - are stored as separate files, which makes it easier to delete separate segments after they have been viewed. In an advantageous embodiment of the invention, the segments and the free storage spaces for storing each segment are determined in response to the manual input by the user, and the semantically unrelated segments are determined up to a pre-determined period of time from receiving an input by a user.
When the storage of the stream of audio-visual data is initiated by a user command, the end time of the recording is undefined. In theory, it is only limited by the amount of storage space on the recording medium. This does not even have to be free storage space, as various methods for automatic deletion of recorded audio-visual data have already been proposed. If no limit had been set for determining semantically unrelated segments in the steam of audio-visual data, it might go on for a very long time, resulting in possibly wasted processing effort. Setting a limit eliminates this drawback.
The invention will be presented in more detail with reference to the Figures, wherein
Fig. 1 shows a consumer electronics system comprising an embodiment of the apparatus according to the invention;
Figs. 2A and 2B show how a stream of audio-visual data would be stored, using a method according to the prior art;
Fig. 3 shows a first flow chart depicting an embodiment of the method according to the invention;
Fig. 4 shows a second flow chart depicting an embodiment of a first subroutine for the presented embodiment of the method according to the invention; Fig. 5 shows a second flow chart depicting an embodiment of a first subroutine for the presented embodiment of the method according to the invention; and Figs. 6A and 6B show how a stream of audio-visual data would be stored, using an embodiment of the method according to the invention.
Fig. 1 shows a consumer electronics system 100 comprising a recording apparatus 110 as an embodiment of the apparatus according to the invention, a user input device 120 and a display device 130.
The recording device 110 comprises a reception unit 112 for receiving a broadcast signal 150. The broadcast signal 150 may be received by a satellite system, by a cable channel or by other means, but the invention is not limited to this. The reception unit 112 derives a stream of audio-visual data from the received broadcast signal 150 that is compliant with standards commonly used, i.e. PAL, SECAM or NTSC for analog television and DNB for digital television. The reception unit comprises a tuner for selecting a channel. When the reception unit 112 is arranged to receive analog TN signals, the reception unit 112
comprises an analog-to-digital converter (not shown) for digitizing a received stream of audio-visual data.
A user of the system 100 may issue a recording command by means of user input device 120 comprising a keyboard 122 to order the recording apparatus 110 to record the received stream of audio-visual data. In a further embodiment, the recording apparatus 110 can be programmed by a user to record the received stream of audio-visual data.
Upon reception of the recording command, a central processing unit 118 commands a memory 114 to store the stream of audio-visual data. In the embodiment presented, the memory 114 is a disc drive comprising an optical disc like DND or Blu Ray. The memory 114 may also be a hard disk drive or any other kind of recording medium including flash EEPROM and the like.
The stored stream of audio-visual data can be shown on the display device 130. When doing so, the video part of the stream of audio-visual information is shown on the screen 132 and the audio part is shown by means of the pair of speakers 134. When storing the stream of audio-visual information, multiple programs or other semantically unrelated segments in the stream may be recorded. In accordance with the invention, each program is stored in a contiguous area on the disc, because in that case a reading head of the disc drive (not shown) does not have to swap from one area of the disc to another during presentation of the segment. In this way, hick-ups in the presentation are prevented. This may be a problem especially with an optical disc, because swapping of the reading head is not very fast for most optical disc drives. During swapping of the head, there may be a buffer underflow, resulting e.g. in a black screen.
Fig. 2A depicts how prior-art systems store data. A stream of audio-visual data 200 has to be stored on a disc of which a mapping 230 is presented in Fig. 2 A. The stream 200 comprises a sports program 202, a first commercial block 203, a news program 204, a second commercial block 205, a film 206 and a rest part 207. Prior-art recording systems store the stream on the disc treating it as one file. Since the disc does not comprise one contiguous area of free space which is large enough to store the whole stream to be recorded, the stream is stored in fragments. In this way, some programs comprised in the stream 200 would be fragmented, which is disadvantageous, as already explained.
A first fragment 212 comprising the sports program 202, the first commercial block 203, the news program 204, the second commercial block 205 and a first part of the film 206 would be stored as one fragment on the disc in a first free area 1. A second fragment 213 comprising a second part of the film 206 would be stored on the disc in a second free
_,,-,_,,
PCT/IB2003/005737
5 area 2. A third fragment 214 comprising a third part of the film 206 would be stored on the disc in a third free area 3. A fourth fragment 215 comprising a fourth part of the film 206 would be stored on the disc in a fourth free area 4. Finally, a fifth fragment 216 comprising a fifth part of the film 206 and a rest part 207 would be stored on the disc in a fifth free area 5. Fig. 2B shows a file entry 250 in the disc file system in Universal Disc
Format, UDF.
When the stream 200 would be stored as depicted in Fig. 2B, problems would occur when skipping from the first part of the film to the second part, and so on. When the memory 114 is a hard disk drive instead of an optical disc in a disc drive, problems would be less, but performance of the hard disk drive would be less than optimal.
The method in accordance with the invention stores each segment of the stream of audio-visual data in a separate, contiguous area on the disc. Fig. 3 presents a first flow chart 300 to depict an embodiment of the method according to the invention.
The procedure starts at a starting point 302 by receiving a storage command. In an advantageous embodiment, the storage command is given by a user pressing a record button of a digital video recorder.
In a subsequent step 304, meta-data associated with the stream of audio-visual data is looked up. Preferably, this meta-data is an EPG. In a further embodiment, the metadata is present as TN-Anytime data. With the help of the meta-data, the boundaries of programs - or other semantically unrelated segments - in the stream of audio-visual data are determined in a step 306. In a further embodiment of the invention, where the recording is pre-programmed for e.g. five hours, only the stream to be received for the next five hours is split up into programs. Having defined the boundaries of the programs, the amount of storage space each program will consume on the recording medium is determined in a step 310. The easiest way of doing this when the stream of audio-visual data to be stored has a fixed bit-rate is determining the bit-rate and the duration of the program and multiplying both values. A further method for determining the size of the stream to be recorded is proposed in co-pending patent application PHΝL021304 of the same assignee. The invention as proposed in this application may be summarized as follows:
When a program is recorded in accordance with a programmed request in a video recording apparatus, the duration of the recording is known. However, when the recording is started manually, this is less obvious. Therefore, it is proposed to derive the
duration from meta-data accompanying the program, like EPG. The size of the program to be recorded may be deduced therefrom. With this information, a memory on which the program is to be recorded may be checked for sufficient storage space. The invention provides an apparatus, a method and a signal. The signal according to the invention carries information on the complexity of the stream of audio-visual data. This information may be used in determining the size of the program to be recorded.
After the amount of data to be stored for a program has been determined, the program is stored in a step 312.
The step 308, the step 310 and the step 312 are comprised in a sub-routine 320. In one embodiment of the invention, the sizes of all programs are determined first, followed by selecting storage space for each program and storage of all programs. In a further embodiment, all steps are carried out for each program separately: determining the size of one program, selecting storage space and storing the program. The person skilled in the art will acknowledge that variations are possible without departing from the scope of the invention. Embodiments of the sub-routine 320 will be discussed in more detail after having described the flow chart 300.
Having finished storing the full stream of audio-visual data, the recording is ended in a terminator 314.
Fig. 4 shows a flow chart 400 depicting an embodiment of the sub-routine 320 (Fig. 3).
The sub-routine starts when a storage command has been received at a starting point 402. For the apparatus 110 (Fig. 1), this may be done automatically by a programmed command or by a user input command by means of input means 120.
Subsequently, the size of the stream of audio-visual data has to be determined in a step 404. In the embodiment described, when a stream of audio-visual data is recorded, for example, after an instantaneous user input command, this is not trivial. The reason for this is that the size of the stream to be recorded is not known upfront. Also when the bit-rate of the stream to be recorded is variable, because it is e.g. MPEG2 encoded, the determination of the size of the stream to be recorded is even less obvious. When the size of the data item to be stored, in this embodiment a stream of audio-visual data, is determined, a free contiguous area is searched on the disc in a step 406. When an area has been found, it is checked in a decision 408 whether the space is large enough to store the full stream of audio-visual data to be stored. When the contiguous free area determined in the step 406 is large enough to store the stream of audio-visual data to be
stored, the area is selected in a step 410. Consequently, the stream is stored in a step 412 in the selected area and the procedure is ended in a terminator 414.
When, however, in the decision 408 the area found in the step 406 is not large enough to store the stream to be recorded, it is checked whether all free storage space on the disc has been checked. This is done in a decision 420. When the outcome is negative, the disc is further searched for free areas to store the stream to be recorded.
When the outcome of the decision 420 is positive, the disc is searched for all free storage space and the storage capacity of the disc is determined in a step 422 by summing up the storage capacity of all areas with free storage space. Subsequently, in a decision 424, it is determined whether the storage capacity determined in the step 422 is large enough to store the whole stream to be recorded.
When the outcome is positive, the stream of audio-visual data to be recorded is stored in fragments on the disc in a step 430 and the recording procedure is ended in the terminator 414. When the outcome of the decision 424 is negative, a warning is issued in a step 426 that the stream cannot be recorded and the procedure is ended in the terminator 414. This procedure provides a relatively short search time when enough recording space is available on the disc. However, from a storage space point of view, this procedure is not very efficient. The reason for this is that, when a small stream of audio-visual data, say a news item often minutes, has to be stored, it may be stored in a contiguous area which is large enough to store a film of four hours. When this happens more often, only a storage space of an hour and a half may be left. If a film of three hours has to be recorded next, it may have to be stored in fragments because no contiguous area with free space large enough to store the complete film is left. Therefore, it is better to store the news item in a free contiguous are on the disc which is just large enough to store the program. For this reason, the recording procedure as depicted in Fig. 5 is proposed.
Fig. 5 shows a second flow chart 500 depicting a second embodiment for the sub-routine 320 (Fig. 3) in the embodiment of the method according to the invention depicted by the flow chart 300 (Fig. 3).
The procedure starts with a storage (or record) command at a starting point 502. Subsequently, in a step 504, the size of the stream of audio-visual data to be stored is determined. In a step 506, a free contiguous area is searched. In a decision 508 it is checked whether the storage space of the free contiguous area found in the step 506 is equal to the size of the item to be stored. When this is the case, the area is selected in a step 510.
Consequently, the data is stored in the selected area in a step 512, after which the procedure is ended in a terminator 514.
When it appears in the decision 508 that the storage space of the free area found in the step 506 is not equal to the size of the stream of audio-visual data to be stored, the procedure branches to a decision 520, in which it is checked whether the storage space of the area is large enough to comprise the stream to be recorded. When this is the case, the area is added to a list (when this is the first area to be added to the list, the list is created) in a step 532. Subsequently, the procedure continues to a decision 530 to check whether the full disc has been searched for free storage space. When the outcome of the decision 520 is negative, the procedure directly branches to the decision 530.
When the outcome of the decision 530 is negative, the disc is further searched in the step 506. When the outcome of the decision 530 is positive and thus the complete disc has been searched for free spaces, it is checked whether a list has been created in the step 532 and items have been added to this list. When the lists exists (and thus is not empty), the smallest free contiguous storage space is selected in a step 522, and in the step 512 the stream to be recorded is stored and the procedure ends in the terminator 514
When the list is empty (and/or does not exist), the stream of audio- visual data to be recorded has to be stored in fragments on the disc. Of course, this is only possible when enough free area is available on the disc. Therefore, when the outcome of the decision 534 is negative, the disc is searched for all free storage space. Subsequently, in a decision 538 it is checked whether this space is enough to record the stream. When this is the case, the stream will be recorded in fragments in a step 524 and the procedure is ended in the terminator 514.
When there is not enough storage space available on the disc, a warning is issued in a step 540 and the procedure ends in the terminator 514. In a further embodiment, the procedure may be extended by forcing recording when not enough storage space is available. Also, a user may be prompted to insert another disc. Of course, the latter embodiment is only available when recording on a removable disc. When an apparatus with only a built-in hard disk drive is used, this is not possible.
Fig. 6 A depicts how the stream 200 would be recorded when the embodiment of the invention as depicted by the second flow chart 400 would be applied.
The sports programme 202 is stored in the fourth free area 4, the first commercial block 203 is stored in the second free area 2, the news program 204 is stored in the fifth free area 5, the second commercial block 205 is stored in the third free area 3, the film 206 is stored in the first free area 1 and the rest part 207 is stored in the first free area 1 as well.
In case the storage of the stream of audio-visual data is initiated by a user command, the end time of the recording is undefined. In theory, it is only limited by the amount of storage space on the recording medium. This does not even have to be free storage space, as various methods for automatic deletion of recorded audio-visual data have already been proposed. If no limit had been set for determining semantically unrelated segments in the stream of audio-visual data, it might go on for a very long time, resulting in possibly wasted processing effort. Setting a limit eliminates this drawback.
Therefore, in an embodiment of the invention, the central processing unit 118 only determines the boundaries of the programs in a stream of audio-visual data to be recorded a few hours ahead.
The boundaries between the programs may be detected by a method known to the person skilled in the art. This may be done by using NPS/PDC, EPG, TV- Anytime, MPEG-7 or any other known protocol.
This yields seven possible file entries, which are presented in UDF in Fig. 6B. Although the invention is presented for a consumer electronics system, it may also be used in personal computers and the like.
The invention may be summarized as follows:
It is advantageous to record programs comprised in a stream of audio-visual data in one contiguous space on a recording medium. While recording a stream of audio- visual data, the boundaries between programs are not directly known, let alone the sizes of the programs. This is disadvantageous when the stream of audio-visual data is long and comprises multiple programs and only small contiguous areas of free space area available, as programs may be stored in fragments. The invention provides a method and apparatus for determining boundaries between the programs, determining the sizes of the stored programs and storing the programs in contiguous areas on a recording medium.