Opened 7 years ago
Closed 5 months ago
#6575 closed enhancement (fixed)
Bitrate Atom MP4 enhancement
Reported by: | Mista_D | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | mov |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Missing btrt atom in MP4 files:
FFmpeg currently doesn't store average bitrate, max bitrate and buffer size in MP4 MOOV. Would be great to keep this info in MP4 for streaming purposes
ISO-14496 part15 page 20: http://hsevi.ir/RI_Standard/File/8978
Attachments (1)
Change History (14)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Bounty of €250 ($300 USD) to whomever implements it before August 14, 2017 please.
Some work was already done before it seems... https://trac.ffmpeg.org/ticket/551
Thank you
comment:3 by , 7 years ago
@line 1077
+static int mov_write_btrt_tag(AVIOContext *pb, MOVTrack *track)
+{
+ AVCPBProperties *props;
+ int64_t pos = avio_tell(pb);
+ unsigned avg_bitrate;
+ props = (AVCPBProperties*)av_stream_get_side_data(track->st, AV_PKT_DATA_CPB_PROPERTIES, NULL);
+ avg_bitrate = compute_avg_bitrate(track);
+
+ avio_wb32(pb, 0);
+ ffio_wfourcc(pb, "btrt");
+ avio_wb32(pb, props ? props->buffer_size : 0);
+ avio_wb32(pb, props ? FFMAX3(props->max_bitrate, props->avg_bitrate, avg_bitrate) : FFMAX(track->par->bit_rate, avg_bitrate));
+ avio_wb32(pb, avg_bitrate);
+ return update_size(pb, pos);
+}
@line 1939
mov_write_avcc_tag(pb, track);
+ mov_write_btrt_tag(pb, track);
if (track->mode == MODE_IPOD)
Use the cash for something good
comment:5 by , 7 years ago
Its adding some junk into MOOV after btrt. Not working
Thank you for trying though
comment:6 by , 7 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Apologies, my file analyzer didn't recognize pasp atom. Your patch is working as intended.
comment:7 by , 7 years ago
comment:8 by , 7 years ago
Keywords: | btrt moov mp4 removed |
---|---|
Priority: | important → wish |
Resolution: | worksforme |
Status: | closed → reopened |
Please consider sending the patch - made with git format-patch
- to the FFmpeg development mailing list.
comment:12 by , 3 years ago
It was added though? 3838e8fc210aa09a9f9058506c0ce80b6ad9b9c3
Abd it is being written. I verified it like a 6 months ago.
http://www.mediafire.com/file/dwawitzp5xmc9vd/btrt.mp4
test file with btrt Atom.