Libav
rmenc.c
Go to the documentation of this file.
1 /*
2  * "Real" compatible muxer.
3  * Copyright (c) 2000, 2001 Fabrice Bellard
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #include "avformat.h"
22 #include "avio_internal.h"
23 #include "rm.h"
24 #include "libavutil/dict.h"
25 
26 typedef struct StreamInfo {
30  /* codec related output */
31  int bit_rate;
32  float frame_rate;
33  int nb_frames; /* current frame number */
34  int total_frames; /* total number of frames */
35  int num;
37 } StreamInfo;
38 
39 typedef struct RMMuxContext {
40  StreamInfo streams[2];
41  StreamInfo *audio_stream, *video_stream;
42  int data_pos; /* position of the data after the header */
43 } RMMuxContext;
44 
45 /* in ms */
46 #define BUFFER_DURATION 0
47 /* the header needs at most 7 + 4 + 12 B */
48 #define MAX_HEADER_SIZE (7 + 4 + 12)
49 /* UINT16_MAX is the maximal chunk size */
50 #define MAX_PACKET_SIZE (UINT16_MAX - MAX_HEADER_SIZE)
51 
52 
53 static void put_str(AVIOContext *s, const char *tag)
54 {
55  avio_wb16(s,strlen(tag));
56  while (*tag) {
57  avio_w8(s, *tag++);
58  }
59 }
60 
61 static void put_str8(AVIOContext *s, const char *tag)
62 {
63  avio_w8(s, strlen(tag));
64  while (*tag) {
65  avio_w8(s, *tag++);
66  }
67 }
68 
70  int data_size, int index_pos)
71 {
72  RMMuxContext *rm = ctx->priv_data;
73  AVIOContext *s = ctx->pb;
74  StreamInfo *stream;
75  unsigned char *data_offset_ptr, *start_ptr;
76  const char *desc, *mimetype;
77  int nb_packets, packet_total_size, packet_max_size, size, packet_avg_size, i;
78  int bit_rate, v, duration, flags, data_pos;
80 
81  start_ptr = s->buf_ptr;
82 
83  ffio_wfourcc(s, ".RMF");
84  avio_wb32(s,18); /* header size */
85  avio_wb16(s,0);
86  avio_wb32(s,0);
87  avio_wb32(s,4 + ctx->nb_streams); /* num headers */
88 
89  ffio_wfourcc(s,"PROP");
90  avio_wb32(s, 50);
91  avio_wb16(s, 0);
92  packet_max_size = 0;
93  packet_total_size = 0;
94  nb_packets = 0;
95  bit_rate = 0;
96  duration = 0;
97  for(i=0;i<ctx->nb_streams;i++) {
98  StreamInfo *stream = &rm->streams[i];
99  bit_rate += stream->bit_rate;
100  if (stream->packet_max_size > packet_max_size)
101  packet_max_size = stream->packet_max_size;
102  nb_packets += stream->nb_packets;
103  packet_total_size += stream->packet_total_size;
104  /* select maximum duration */
105  v = (int) (1000.0 * (float)stream->total_frames / stream->frame_rate);
106  if (v > duration)
107  duration = v;
108  }
109  avio_wb32(s, bit_rate); /* max bit rate */
110  avio_wb32(s, bit_rate); /* avg bit rate */
111  avio_wb32(s, packet_max_size); /* max packet size */
112  if (nb_packets > 0)
113  packet_avg_size = packet_total_size / nb_packets;
114  else
115  packet_avg_size = 0;
116  avio_wb32(s, packet_avg_size); /* avg packet size */
117  avio_wb32(s, nb_packets); /* num packets */
118  avio_wb32(s, duration); /* duration */
119  avio_wb32(s, BUFFER_DURATION); /* preroll */
120  avio_wb32(s, index_pos); /* index offset */
121  /* computation of data the data offset */
122  data_offset_ptr = s->buf_ptr;
123  avio_wb32(s, 0); /* data offset : will be patched after */
124  avio_wb16(s, ctx->nb_streams); /* num streams */
125  flags = 1 | 2; /* save allowed & perfect play */
126  if (!s->seekable)
127  flags |= 4; /* live broadcast */
128  avio_wb16(s, flags);
129 
130  /* comments */
131 
132  ffio_wfourcc(s,"CONT");
133  size = 4 * 2 + 10;
134  for(i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
135  tag = av_dict_get(ctx->metadata, ff_rm_metadata[i], NULL, 0);
136  if(tag) size += strlen(tag->value);
137  }
138  avio_wb32(s,size);
139  avio_wb16(s,0);
140  for(i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
141  tag = av_dict_get(ctx->metadata, ff_rm_metadata[i], NULL, 0);
142  put_str(s, tag ? tag->value : "");
143  }
144 
145  for(i=0;i<ctx->nb_streams;i++) {
146  int codec_data_size;
147 
148  stream = &rm->streams[i];
149 
150  if (stream->par->codec_type == AVMEDIA_TYPE_AUDIO) {
151  desc = "The Audio Stream";
152  mimetype = "audio/x-pn-realaudio";
153  codec_data_size = 73;
154  } else {
155  desc = "The Video Stream";
156  mimetype = "video/x-pn-realvideo";
157  codec_data_size = 34;
158  }
159 
160  ffio_wfourcc(s,"MDPR");
161  size = 10 + 9 * 4 + strlen(desc) + strlen(mimetype) + codec_data_size;
162  avio_wb32(s, size);
163  avio_wb16(s, 0);
164 
165  avio_wb16(s, i); /* stream number */
166  avio_wb32(s, stream->bit_rate); /* max bit rate */
167  avio_wb32(s, stream->bit_rate); /* avg bit rate */
168  avio_wb32(s, stream->packet_max_size); /* max packet size */
169  if (stream->nb_packets > 0)
170  packet_avg_size = stream->packet_total_size /
171  stream->nb_packets;
172  else
173  packet_avg_size = 0;
174  avio_wb32(s, packet_avg_size); /* avg packet size */
175  avio_wb32(s, 0); /* start time */
176  avio_wb32(s, BUFFER_DURATION); /* preroll */
177  /* duration */
178  if (!s->seekable || !stream->total_frames)
179  avio_wb32(s, (int)(3600 * 1000));
180  else
181  avio_wb32(s, (int)(stream->total_frames * 1000 / stream->frame_rate));
182  put_str8(s, desc);
183  put_str8(s, mimetype);
184  avio_wb32(s, codec_data_size);
185 
186  if (stream->par->codec_type == AVMEDIA_TYPE_AUDIO) {
187  int coded_frame_size, fscode, sample_rate;
188  int frame_size = av_get_audio_frame_duration2(stream->par, 0);
189  sample_rate = stream->par->sample_rate;
190  coded_frame_size = (stream->par->bit_rate *
191  frame_size) / (8 * sample_rate);
192  /* audio codec info */
193  avio_write(s, ".ra", 3);
194  avio_w8(s, 0xfd);
195  avio_wb32(s, 0x00040000); /* version */
196  ffio_wfourcc(s, ".ra4");
197  avio_wb32(s, 0x01b53530); /* stream length */
198  avio_wb16(s, 4); /* unknown */
199  avio_wb32(s, 0x39); /* header size */
200 
201  switch(sample_rate) {
202  case 48000:
203  case 24000:
204  case 12000:
205  fscode = 1;
206  break;
207  default:
208  case 44100:
209  case 22050:
210  case 11025:
211  fscode = 2;
212  break;
213  case 32000:
214  case 16000:
215  case 8000:
216  fscode = 3;
217  }
218  avio_wb16(s, fscode); /* codec additional info, for AC-3, seems
219  to be a frequency code */
220  /* special hack to compensate rounding errors... */
221  if (coded_frame_size == 557)
222  coded_frame_size--;
223  avio_wb32(s, coded_frame_size); /* frame length */
224  avio_wb32(s, 0x51540); /* unknown */
225  avio_wb32(s, 0x249f0); /* unknown */
226  avio_wb32(s, 0x249f0); /* unknown */
227  avio_wb16(s, 0x01);
228  /* frame length : seems to be very important */
229  avio_wb16(s, coded_frame_size);
230  avio_wb32(s, 0); /* unknown */
231  avio_wb16(s, stream->par->sample_rate); /* sample rate */
232  avio_wb32(s, 0x10); /* unknown */
233  avio_wb16(s, stream->par->channels);
234  put_str8(s, "Int0"); /* codec name */
235  if (stream->par->codec_tag) {
236  avio_w8(s, 4); /* tag length */
237  avio_wl32(s, stream->par->codec_tag);
238  } else {
239  av_log(ctx, AV_LOG_ERROR, "Invalid codec tag\n");
240  return -1;
241  }
242  avio_wb16(s, 0); /* title length */
243  avio_wb16(s, 0); /* author length */
244  avio_wb16(s, 0); /* copyright length */
245  avio_w8(s, 0); /* end of header */
246  } else {
247  /* video codec info */
248  avio_wb32(s,34); /* size */
249  ffio_wfourcc(s, "VIDO");
250  if(stream->par->codec_id == AV_CODEC_ID_RV10)
251  ffio_wfourcc(s,"RV10");
252  else
253  ffio_wfourcc(s,"RV20");
254  avio_wb16(s, stream->par->width);
255  avio_wb16(s, stream->par->height);
256  avio_wb16(s, (int) stream->frame_rate); /* frames per seconds ? */
257  avio_wb32(s,0); /* unknown meaning */
258  avio_wb16(s, (int) stream->frame_rate); /* unknown meaning */
259  avio_wb32(s,0); /* unknown meaning */
260  avio_wb16(s, 8); /* unknown meaning */
261  /* Seems to be the codec version: only use basic H.263. The next
262  versions seems to add a differential DC coding as in
263  MPEG... nothing new under the sun. */
264  if(stream->par->codec_id == AV_CODEC_ID_RV10)
265  avio_wb32(s,0x10000000);
266  else
267  avio_wb32(s,0x20103001);
268  //avio_wb32(s,0x10003000);
269  }
270  }
271 
272  /* patch data offset field */
273  data_pos = s->buf_ptr - start_ptr;
274  rm->data_pos = data_pos;
275  data_offset_ptr[0] = data_pos >> 24;
276  data_offset_ptr[1] = data_pos >> 16;
277  data_offset_ptr[2] = data_pos >> 8;
278  data_offset_ptr[3] = data_pos;
279 
280  /* data stream */
281  ffio_wfourcc(s, "DATA");
282  avio_wb32(s,data_size + 10 + 8);
283  avio_wb16(s,0);
284 
285  avio_wb32(s, nb_packets); /* number of packets */
286  avio_wb32(s,0); /* next data header */
287  return 0;
288 }
289 
291  int length, int key_frame)
292 {
293  int timestamp;
294  AVIOContext *s = ctx->pb;
295 
296  stream->nb_packets++;
297  stream->packet_total_size += length;
298  if (length > stream->packet_max_size)
299  stream->packet_max_size = length;
300 
301  avio_wb16(s,0); /* version */
302  avio_wb16(s,length + 12);
303  avio_wb16(s, stream->num); /* stream number */
304  timestamp = (1000 * (float)stream->nb_frames) / stream->frame_rate;
305  avio_wb32(s, timestamp); /* timestamp */
306  avio_w8(s, 0); /* reserved */
307  avio_w8(s, key_frame ? 2 : 0); /* flags */
308 }
309 
311 {
312  RMMuxContext *rm = s->priv_data;
313  StreamInfo *stream;
314  int n;
316 
317  for(n=0;n<s->nb_streams;n++) {
318  AVStream *st = s->streams[n];
319  int frame_size;
320 
321  s->streams[n]->id = n;
322  par = s->streams[n]->codecpar;
323  stream = &rm->streams[n];
324  memset(stream, 0, sizeof(StreamInfo));
325  stream->num = n;
326  stream->bit_rate = par->bit_rate;
327  stream->par = par;
328 
329  switch (par->codec_type) {
330  case AVMEDIA_TYPE_AUDIO:
331  rm->audio_stream = stream;
332  frame_size = av_get_audio_frame_duration2(par, 0);
333  stream->frame_rate = (float)par->sample_rate / (float)frame_size;
334  /* XXX: dummy values */
335  stream->packet_max_size = 1024;
336  stream->nb_packets = 0;
337  stream->total_frames = stream->nb_packets;
338  break;
339  case AVMEDIA_TYPE_VIDEO:
340  rm->video_stream = stream;
341  // TODO: should be avg_frame_rate
342  stream->frame_rate = (float)st->time_base.den / (float)st->time_base.num;
343  /* XXX: dummy values */
344  stream->packet_max_size = 4096;
345  stream->nb_packets = 0;
346  stream->total_frames = stream->nb_packets;
347  break;
348  default:
349  return -1;
350  }
351  }
352 
353  if (rv10_write_header(s, 0, 0))
354  return AVERROR_INVALIDDATA;
355  avio_flush(s->pb);
356  return 0;
357 }
358 
359 static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int flags)
360 {
361  RMMuxContext *rm = s->priv_data;
362  AVIOContext *pb = s->pb;
363  StreamInfo *stream = rm->audio_stream;
364  int i;
365 
366  write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
367 
368  if (stream->par->codec_id == AV_CODEC_ID_AC3) {
369  /* for AC-3, the words seem to be reversed */
370  for (i = 0; i < size; i += 2) {
371  avio_w8(pb, buf[i + 1]);
372  avio_w8(pb, buf[i]);
373  }
374  } else {
375  avio_write(pb, buf, size);
376  }
377  stream->nb_frames++;
378  return 0;
379 }
380 
381 static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int flags)
382 {
383  RMMuxContext *rm = s->priv_data;
384  AVIOContext *pb = s->pb;
385  StreamInfo *stream = rm->video_stream;
386  int key_frame = !!(flags & AV_PKT_FLAG_KEY);
387 
388  /* XXX: this is incorrect: should be a parameter */
389 
390  /* Well, I spent some time finding the meaning of these bits. I am
391  not sure I understood everything, but it works !! */
392  if (size > MAX_PACKET_SIZE) {
393  avpriv_report_missing_feature(s, "Muxing packets larger than 64 kB");
394  return AVERROR(ENOSYS);
395  }
396  write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame);
397  /* bit 7: '1' if final packet of a frame converted in several packets */
398  avio_w8(pb, 0x81);
399  /* bit 7: '1' if I-frame. bits 6..0 : sequence number in current
400  frame starting from 1 */
401  if (key_frame) {
402  avio_w8(pb, 0x81);
403  } else {
404  avio_w8(pb, 0x01);
405  }
406  if(size >= 0x4000){
407  avio_wb32(pb, size); /* total frame size */
408  avio_wb32(pb, size); /* offset from the start or the end */
409  }else{
410  avio_wb16(pb, 0x4000 | size); /* total frame size */
411  avio_wb16(pb, 0x4000 | size); /* offset from the start or the end */
412  }
413  avio_w8(pb, stream->nb_frames & 0xff);
414 
415  avio_write(pb, buf, size);
416 
417  stream->nb_frames++;
418  return 0;
419 }
420 
422 {
423  if (s->streams[pkt->stream_index]->codecpar->codec_type ==
425  return rm_write_audio(s, pkt->data, pkt->size, pkt->flags);
426  else
427  return rm_write_video(s, pkt->data, pkt->size, pkt->flags);
428 }
429 
431 {
432  RMMuxContext *rm = s->priv_data;
433  int data_size, index_pos, i;
434  AVIOContext *pb = s->pb;
435 
436  if (s->pb->seekable) {
437  /* end of file: finish to write header */
438  index_pos = avio_tell(pb);
439  data_size = index_pos - rm->data_pos;
440 
441  /* FIXME: write index */
442 
443  /* undocumented end header */
444  avio_wb32(pb, 0);
445  avio_wb32(pb, 0);
446 
447  avio_seek(pb, 0, SEEK_SET);
448  for(i=0;i<s->nb_streams;i++)
449  rm->streams[i].total_frames = rm->streams[i].nb_frames;
450  rv10_write_header(s, data_size, 0);
451  } else {
452  /* undocumented end header */
453  avio_wb32(pb, 0);
454  avio_wb32(pb, 0);
455  }
456 
457  return 0;
458 }
459 
460 
462  .name = "rm",
463  .long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
464  .mime_type = "application/vnd.rn-realmedia",
465  .extensions = "rm,ra",
466  .priv_data_size = sizeof(RMMuxContext),
467  .audio_codec = AV_CODEC_ID_AC3,
468  .video_codec = AV_CODEC_ID_RV10,
472  .codec_tag = (const AVCodecTag* const []){ ff_rm_codec_tags, 0 },
473 };
static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int flags)
Definition: rmenc.c:359
Bytestream IO Context.
Definition: avio.h:104
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:54
int size
int nb_packets
Definition: rmenc.c:27
unsigned char * buf_ptr
Current position in the buffer.
Definition: avio.h:120
const char * desc
Definition: nvenc.c:101
static const uint8_t frame_size[4]
Definition: g723_1.h:219
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: avcodec.h:3483
int num
numerator
Definition: rational.h:44
int size
Definition: avcodec.h:1347
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:242
#define FF_ARRAY_ELEMS(a)
This struct describes the properties of an encoded stream.
Definition: avcodec.h:3475
Format I/O context.
Definition: avformat.h:940
Public dictionary API.
int packet_total_size
Definition: rmenc.c:28
void avio_wl32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:316
uint8_t
int width
Video only.
Definition: avcodec.h:3525
int id
Format-specific stream ID.
Definition: avformat.h:712
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:1008
int64_t duration
Definition: movenc.c:63
static void put_str(AVIOContext *s, const char *tag)
Definition: rmenc.c:53
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:38
uint8_t * data
Definition: avcodec.h:1346
static int flags
Definition: log.c:50
uint32_t tag
Definition: movenc.c:854
static void put_str8(AVIOContext *s, const char *tag)
Definition: rmenc.c:61
StreamInfo * audio_stream
Definition: rmenc.c:41
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:295
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:221
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
Definition: avio_internal.h:66
static int write_trailer(AVFormatContext *s)
Definition: assenc.c:64
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: avcodec.h:1378
int total_frames
Definition: rmenc.c:34
StreamInfo streams[2]
Definition: rmenc.c:40
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:124
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1148
#define AVERROR(e)
Definition: error.h:43
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
int nb_frames
Definition: rmenc.c:33
enum AVMediaType codec_type
General type of the encoded data.
Definition: avcodec.h:3479
AVCodecParameters * par
Definition: rmenc.c:36
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters in...
Definition: utils.c:2515
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:1352
int bit_rate
Definition: rmenc.c:31
int bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: avcodec.h:3512
static void write_packet_header(AVFormatContext *ctx, StreamInfo *stream, int length, int key_frame)
Definition: rmenc.c:290
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:996
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
Definition: avio.h:153
int void avio_flush(AVIOContext *s)
Definition: aviobuf.c:236
const char * name
Definition: avformat.h:450
AVFormatContext * ctx
Definition: movenc.c:48
static int rm_write_header(AVFormatContext *s)
Definition: rmenc.c:310
float frame_rate
Definition: rmenc.c:32
static int rm_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rmenc.c:421
Stream structure.
Definition: avformat.h:705
const AVCodecTag ff_rm_codec_tags[]
Definition: rm.c:31
NULL
Definition: eval.c:55
AVIOContext * pb
I/O context.
Definition: avformat.h:982
void avio_w8(AVIOContext *s, int b)
Definition: aviobuf.c:200
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
Definition: avconv.c:278
#define BUFFER_DURATION
Definition: rmenc.c:46
static int rm_write_trailer(AVFormatContext *s)
Definition: rmenc.c:430
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
void avio_wb16(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:404
const char *const ff_rm_metadata[4]
Definition: rm.c:24
int sample_rate
Audio only.
Definition: avcodec.h:3564
Main libavformat public API header.
int packet_max_size
Definition: rmenc.c:29
int data_pos
Definition: rmenc.c:42
AVOutputFormat ff_rm_muxer
Definition: rmenc.c:461
#define MAX_PACKET_SIZE
Definition: rmenc.c:50
static int rv10_write_header(AVFormatContext *ctx, int data_size, int index_pos)
Definition: rmenc.c:69
int den
denominator
Definition: rational.h:45
char * value
Definition: dict.h:74
int num
Definition: rmenc.c:35
void * priv_data
Format private data.
Definition: avformat.h:968
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:373
int channels
Audio only.
Definition: avcodec.h:3560
void avio_wb32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:324
AVCodecParameters * codecpar
Definition: avformat.h:831
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: avcodec.h:3487
int stream_index
Definition: avcodec.h:1348
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avformat.h:742
static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int flags)
Definition: rmenc.c:381
This structure stores compressed data.
Definition: avcodec.h:1323
StreamInfo * video_stream
Definition: rmenc.c:41