[FFmpeg-user] Video streams in MPEG-TS missing bitrate information

André Pankratz andre at vidibus.com
Fri Oct 23 15:17:48 CEST 2015


Am 23.10.2015 um 14:44 schrieb Moritz Barsnick <barsnick at gmx.net>:

> On Fri, Oct 23, 2015 at 13:25:05 +0200, André Pankratz wrote:
>> Maybe the issue is related to this ticket: https://trac.ffmpeg.org/ticket/3392
> 
> I think this "issue" is that neither MPEG-TS nor Matroska provide a
> header with per-stream nominal bitrate. mediainfo is parsing x264's
> custom SEI (i.e. some propietary info) from the H.264 stream, which
> does contain this bitrate info:
> 
> barsnick at sunshine:~ > strings < ~/tmp/ffmpeg-h264rate-test.ts | grep -A3 x264
> x264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.orgG
> /x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 faG
> st_pskip=1 chroma_qp_offset=4 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 dG
> irect=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4G
> vbv_maxrate=1000 vbv_bufsize=250 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
> 
> Note the "bitrate=1000". (mediainfo is obviously not calculating the
> bitrate from the overall container bitrate and the other streams,
> because that number - the actual average bitrate, was much smaller in
> my case.)
> 
> I think it's okay that ffmpeg refuses to provide information from the
> custom SEI.

If it's the only hint about bitrate that is available, I would really appreciate it nonetheless.

> 
> Furthermore, this brings us to this point: 
>> To create a valid MPEG-DASH stream later on, I need the bitrate of
>> each video stream.
> 
> Parse that info out using "strings" and "grep" or using mediainfo, or
> better, remember it when creating the stream/the MPEG-TS. It's just
> available in your output stream by chance, because you happened to use
> libx264.

Since I use the multiplexed stream to create DASH without reencoding, I see no chance of providing bitrate information for FFmpeg's DASH muxer.

Maybe I'll end up writing a Lua proxy that inserts bitrate information into the manifest. That would kill two birds with one stone, because I need to alter the manifest's profile for HbbTV 1.5 by adding urn:hbbtv:dash:profile:isoff-live:2012 as well.

Thanks for your insight!

Best,
André

> 
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list