Discussion:
[FFmpeg-user] Video streams in MPEG-TS missing bitrate information
André Pankratz
2015-10-23 09:01:26 UTC
Permalink
Hello,

I am trying to encode a RTMP stream into a multi-variant MPEG-TS stream for further processing. It works almost perfectly, however all video streams lack bitrate information when reading, while audio bitrate is present.

Stream info during encoding:
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc

Stream info while reading:
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc

To create a valid MPEG-DASH stream later on, I need the bitrate of each video stream.

Can you help me with this issue?

Best,
André


--
Command for encoding:

ffmpeg -y -threads 0 -i rtmp://xxx/test \
-map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:1 \
-dn \
-c:a libfaac -b:a 128000 -ac 2 -ar 48000 \
-c:v libx264 -profile:v main -level 3.1 -preset faster -aspect 1.77777 -r 25 -g 25 -keyint_min 25 -sc_threshold 0 \
-b:v:0 1000000 -minrate:v:0 1000000 -maxrate:v:0 1000000 -bufsize:v:0 250000 -s:0 640x360 \
-b:v:1 1500000 -minrate:v:1 1500000 -maxrate:v:1 1500000 -bufsize:v:1 375000 -s:1 1024x576 \
-b:v:2 2500000 -minrate:v:2 2500000 -maxrate:v:2 2500000 -bufsize:v:2 625000 -s:2 1280x720 \
-b:v:3 420000 -minrate:v:3 420000 -maxrate:v:3 420000 -bufsize:v:3 105000 -s:3 320x180 -profile:v:3 baseline -level:3 3.0 \
-b:v:4 160000 -minrate:v:4 160000 -maxrate:v:4 160000 -bufsize:v:4 40000 -s:4 320x180 -profile:v:4 baseline -level:4 3.0 \
-flags '-global_header +cgop' -f mpegts udp://127.0.0.1:10001

ffmpeg version git-2015-10-22-00efaa7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --prefix=/home/ffmpeg_build --extra-cflags=-I/home/ffmpeg_build/include --extra-ldflags=-L/home/ffmpeg_build/lib --bindir=/usr/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 8.100 / 57. 8.100
libavformat 57. 10.101 / 57. 10.101
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 12.100 / 6. 12.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
[flv @ 0x22d46a0] audio stream discovered after head already parsed
Input #0, flv, from 'rtmp://xxx/test':
Metadata:
displayWidth : 1920
displayHeight : 1080
fps : 25
Duration: 00:00:00.00, start: 433.263000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 1920x1080, 3018 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp
[libx264 @ 0x23e4200] using SAR=1/1
[libx264 @ 0x23e4200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x23e4200] profile Main, level 3.1
[libx264 @ 0x23e8d60] using SAR=1/1
[libx264 @ 0x23e8d60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x23e8d60] profile Main, level 3.1
[libx264 @ 0x23ea640] using SAR=1/1
[libx264 @ 0x23ea640] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x23ea640] profile Main, level 3.1
[libx264 @ 0x22f2500] using SAR=1/1
[libx264 @ 0x22f2500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x22f2500] profile Constrained Baseline, level 3.0
[libx264 @ 0x22f3f80] using SAR=1/1
[libx264 @ 0x22f3f80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x22f3f80] profile Constrained Baseline, level 3.0
Output #0, mpegts, to 'udp://127.0.0.1:10001':
Metadata:
displayWidth : 1920
displayHeight : 1080
fps : 25
encoder : Lavf57.10.101
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc57.8.100 libx264
Stream #0:1: Video: h264 (libx264), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], q=-1--1, 1500 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc57.8.100 libx264
Stream #0:2: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc57.8.100 libx264
Stream #0:3: Video: h264 (libx264), yuv420p, 320x180 [SAR 1:1 DAR 16:9], q=-1--1, 420 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc57.8.100 libx264
Stream #0:4: Video: h264 (libx264), yuv420p, 320x180 [SAR 1:1 DAR 16:9], q=-1--1, 160 kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc57.8.100 libx264
Stream #0:5: Audio: aac (libfaac), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc57.8.100 libfaac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:2 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:3 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:4 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:5 (aac (native) -> aac (libfaac))
Press [q] to stop, [?] for help
frame= 222 fps= 29 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 4952kB time=00:00:09.21 bitrate=4401.8kbits/s
video:4311kB audio:143kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 11.182506%
[libx264 @ 0x23e4200] frame I:9 Avg QP:18.75 size: 25490
[libx264 @ 0x23e4200] frame P:80 Avg QP:15.26 size: 5521
[libx264 @ 0x23e4200] frame B:133 Avg QP:21.11 size: 668
[libx264 @ 0x23e4200] consecutive B-frames: 19.4% 1.8% 1.4% 77.5%
[libx264 @ 0x23e4200] mb I I16..4: 37.9% 0.0% 62.1%
[libx264 @ 0x23e4200] mb P I16..4: 2.2% 0.0% 2.3% P16..4: 45.1% 12.1% 7.0% 0.0% 0.0% skip:31.4%
[libx264 @ 0x23e4200] mb B I16..4: 0.2% 0.0% 0.1% B16..8: 6.7% 3.7% 0.6% direct: 3.5% skip:85.2% L0:36.0% L1:47.4% BI:16.6%
[libx264 @ 0x23e4200] coded y,uvDC,uvAC intra: 61.5% 80.6% 49.9% inter: 9.3% 19.4% 5.4%
[libx264 @ 0x23e4200] i16 v,h,dc,p: 25% 37% 15% 22%
[libx264 @ 0x23e4200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 26% 18% 5% 6% 5% 5% 4% 4%
[libx264 @ 0x23e4200] i8c dc,h,v,p: 39% 35% 16% 10%
[libx264 @ 0x23e4200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x23e4200] ref P L0: 76.9% 23.1%
[libx264 @ 0x23e4200] ref B L0: 87.0% 13.0%
[libx264 @ 0x23e4200] ref B L1: 95.6% 4.4%
[libx264 @ 0x23e4200] kb/s:684.58
[libx264 @ 0x23e8d60] frame I:9 Avg QP:19.98 size: 38304
[libx264 @ 0x23e8d60] frame P:79 Avg QP:17.00 size: 8427
[libx264 @ 0x23e8d60] frame B:134 Avg QP:21.76 size: 1086
[libx264 @ 0x23e8d60] consecutive B-frames: 18.5% 2.7% 1.4% 77.5%
[libx264 @ 0x23e8d60] mb I I16..4: 54.3% 0.0% 45.7%
[libx264 @ 0x23e8d60] mb P I16..4: 4.5% 0.0% 1.6% P16..4: 37.0% 12.6% 5.4% 0.0% 0.0% skip:38.9%
[libx264 @ 0x23e8d60] mb B I16..4: 0.3% 0.0% 0.1% B16..8: 7.5% 2.5% 0.2% direct: 3.4% skip:86.0% L0:36.8% L1:50.4% BI:12.8%
[libx264 @ 0x23e8d60] coded y,uvDC,uvAC intra: 39.9% 70.8% 37.4% inter: 5.6% 15.5% 2.3%
[libx264 @ 0x23e8d60] i16 v,h,dc,p: 30% 38% 16% 15%
[libx264 @ 0x23e8d60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 24% 20% 5% 6% 5% 5% 4% 4%
[libx264 @ 0x23e8d60] i8c dc,h,v,p: 43% 33% 16% 7%
[libx264 @ 0x23e8d60] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x23e8d60] ref P L0: 75.5% 24.5%
[libx264 @ 0x23e8d60] ref B L0: 84.2% 15.8%
[libx264 @ 0x23e8d60] ref B L1: 96.0% 4.0%
[libx264 @ 0x23e8d60] kb/s:1041.40
[libx264 @ 0x23ea640] frame I:9 Avg QP:17.12 size: 62291
[libx264 @ 0x23ea640] frame P:65 Avg QP:14.88 size: 16506
[libx264 @ 0x23ea640] frame B:148 Avg QP:19.80 size: 2250
[libx264 @ 0x23ea640] consecutive B-frames: 10.4% 0.9% 4.1% 84.7%
[libx264 @ 0x23ea640] mb I I16..4: 46.3% 0.0% 53.7%
[libx264 @ 0x23ea640] mb P I16..4: 6.6% 0.0% 2.5% P16..4: 40.2% 14.9% 6.3% 0.0% 0.0% skip:29.6%
[libx264 @ 0x23ea640] mb B I16..4: 0.5% 0.0% 0.1% B16..8: 11.1% 3.6% 0.3% direct: 5.1% skip:79.4% L0:39.2% L1:50.8% BI:10.0%
[libx264 @ 0x23ea640] coded y,uvDC,uvAC intra: 43.5% 73.8% 40.9% inter: 5.8% 19.3% 2.4%
[libx264 @ 0x23ea640] i16 v,h,dc,p: 34% 39% 16% 11%
[libx264 @ 0x23ea640] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 25% 18% 5% 6% 5% 4% 4% 4%
[libx264 @ 0x23ea640] i8c dc,h,v,p: 42% 32% 18% 8%
[libx264 @ 0x23ea640] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x23ea640] ref P L0: 76.9% 23.1%
[libx264 @ 0x23ea640] ref B L0: 84.2% 15.8%
[libx264 @ 0x23ea640] ref B L1: 95.6% 4.4%
[libx264 @ 0x23ea640] kb/s:1771.70
[libx264 @ 0x22f2500] frame I:9 Avg QP:19.51 size: 10634
[libx264 @ 0x22f2500] frame P:213 Avg QP:15.56 size: 1396
[libx264 @ 0x22f2500] mb I I16..4: 27.0% 0.0% 73.0%
[libx264 @ 0x22f2500] mb P I16..4: 0.6% 0.0% 0.7% P16..4: 43.4% 7.6% 4.4% 0.0% 0.0% skip:43.2%
[libx264 @ 0x22f2500] coded y,uvDC,uvAC intra: 69.6% 87.3% 61.3% inter: 19.3% 32.4% 12.7%
[libx264 @ 0x22f2500] i16 v,h,dc,p: 31% 20% 10% 39%
[libx264 @ 0x22f2500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 26% 16% 6% 7% 6% 5% 5% 5%
[libx264 @ 0x22f2500] i8c dc,h,v,p: 42% 34% 16% 8%
[libx264 @ 0x22f2500] ref P L0: 90.9% 9.1%
[libx264 @ 0x22f2500] kb/s:354.15
[libx264 @ 0x22f3f80] frame I:9 Avg QP:30.90 size: 4065
[libx264 @ 0x22f3f80] frame P:213 Avg QP:26.70 size: 478
[libx264 @ 0x22f3f80] mb I I16..4: 54.5% 0.0% 45.5%
[libx264 @ 0x22f3f80] mb P I16..4: 1.0% 0.0% 0.1% P16..4: 17.0% 4.4% 1.3% 0.0% 0.0% skip:76.2%
[libx264 @ 0x22f3f80] coded y,uvDC,uvAC intra: 42.8% 71.4% 42.3% inter: 7.0% 13.6% 4.8%
[libx264 @ 0x22f3f80] i16 v,h,dc,p: 27% 29% 14% 30%
[libx264 @ 0x22f3f80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 24% 27% 6% 6% 5% 5% 4% 4%
[libx264 @ 0x22f3f80] i8c dc,h,v,p: 52% 34% 9% 5%
[libx264 @ 0x22f3f80] ref P L0: 88.9% 11.1%
[libx264 @ 0x22f3f80] kb/s:124.76


Command for reading :

ffmpeg -analyzeduration 1500000 -i udp://127.0.0.1:10001

ffmpeg version git-2015-10-22-00efaa7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --prefix=/home/ffmpeg_build --extra-cflags=-I/home/ffmpeg_build/include --extra-ldflags=-L/home/ffmpeg_build/lib --bindir=/usr/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 8.100 / 57. 8.100
libavformat 57. 10.101 / 57. 10.101
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 12.100 / 6. 12.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3283c80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3283c80] decode_slice_header error
[h264 @ 0x3283c80] no frame!
[h264 @ 0x3284800] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3284800] decode_slice_header error
[h264 @ 0x3284800] no frame!
[h264 @ 0x3285380] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285380] decode_slice_header error
[h264 @ 0x3285380] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
[h264 @ 0x3285f00] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3285f00] decode_slice_header error
[h264 @ 0x3285f00] no frame!
[h264 @ 0x3286a80] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3286a80] decode_slice_header error
[h264 @ 0x3286a80] no frame!
Input #0, mpegts, from 'udp://127.0.0.1:10001':
Duration: N/A, start: 55.983256, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x102]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:3[0x103]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:4[0x104]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:5[0x105]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 119 kb/s
At least one output file must be specified
Moritz Barsnick
2015-10-23 10:08:47 UTC
Permalink
Hi André,
Post by André Pankratz
I am trying to encode a RTMP stream into a multi-variant MPEG-TS
stream for further processing. It works almost perfectly, however all
video streams lack bitrate information when reading, while audio
bitrate is present.
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
To create a valid MPEG-DASH stream later on, I need the bitrate of each video stream.
I think ffmpeg/ffprobe is just not capable of displaying the nominal
bitrate of the video streams in an MPEG-TS. It *seems* the info is
in it, because (*cough*) mediainfo shows it.

Whether that's a bug or shortcoming in ffmpeg I do not know.

Moritz
André Pankratz
2015-10-23 11:20:05 UTC
Permalink
Hi Moritz,

thanks for your reply. I'm going to file a bug report unless any solution comes up.

Best,
André
Post by Moritz Barsnick
Hi André,
Post by André Pankratz
I am trying to encode a RTMP stream into a multi-variant MPEG-TS
stream for further processing. It works almost perfectly, however all
video streams lack bitrate information when reading, while audio
bitrate is present.
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
To create a valid MPEG-DASH stream later on, I need the bitrate of each video stream.
I think ffmpeg/ffprobe is just not capable of displaying the nominal
bitrate of the video streams in an MPEG-TS. It *seems* the info is
in it, because (*cough*) mediainfo shows it.
Whether that's a bug or shortcoming in ffmpeg I do not know.
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
André Pankratz
2015-10-23 11:25:05 UTC
Permalink
Maybe the issue is related to this ticket: https://trac.ffmpeg.org/ticket/3392
Post by André Pankratz
Hi Moritz,
thanks for your reply. I'm going to file a bug report unless any solution comes up.
Best,
André
Post by Moritz Barsnick
Hi André,
Post by André Pankratz
I am trying to encode a RTMP stream into a multi-variant MPEG-TS
stream for further processing. It works almost perfectly, however all
video streams lack bitrate information when reading, while audio
bitrate is present.
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
To create a valid MPEG-DASH stream later on, I need the bitrate of each video stream.
I think ffmpeg/ffprobe is just not capable of displaying the nominal
bitrate of the video streams in an MPEG-TS. It *seems* the info is
in it, because (*cough*) mediainfo shows it.
Whether that's a bug or shortcoming in ffmpeg I do not know.
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Moritz Barsnick
2015-10-23 12:44:37 UTC
Permalink
Post by André Pankratz
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:

***@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.
Post by André Pankratz
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.

Moritz
André Pankratz
2015-10-23 13:17:48 UTC
Permalink
Post by Moritz Barsnick
Post by André Pankratz
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
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.
Post by Moritz Barsnick
Post by André Pankratz
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é
Post by Moritz Barsnick
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...