[FFmpeg-user] Newbie ish question with mpegts streaming

Wayne Merricks waynemerricks at thevoiceasia.com
Thu Oct 20 01:01:52 EEST 2016


Hi,

Apologies, I assumed the command by itself would be enough. I've been 
playing with the command since the email but I'm still unable to get the 
proprietary system to correctly receive.  I can't provide a working 
ffmpeg -i because the equipment/software in use is an old version of 
some Windows software called Zixi receiver.  I'm trying to get ffmpeg to 
match the output of Zixi so that I can bypass the encoder chain for 
various reasons.

This is the output from the Windows system with the proprietary 
software but I get the same output mismatch in terms of ffprobe under 
Ubuntu 16.04.  I had to use x264opts on the Windows build as 
-color_primaries wasn't being parsed there.

ffmpeg -re -i rtmp://my_rtmp_feed -vcodec libx264 -profile:v main 
-level 3.1 -s 1920:1080 -pix_fmt yuv420p -x264opts 
colorprim=bt709:transfer=bt709:colormatrix=bt709:fullrange=off -vf 
setsar=1/1,setdar=16/9 -acodec mp2 -b:a 96k -ar 48000 -metadata 
service_name="TVA" -metadata service_provider="TVA" -metadata:s:a:0 
language=GBR -f mpegts udp://127.0.0.1:2345

ffmpeg version N-60274-gdce9321 Copyright (c) 2000-2014 the FFmpeg 
developers
   built on Jan 31 2014 22:01:13 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads 
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray 
--enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc 
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus 
--enable-librtmp --enable-libschroedinger --enable-libsoxr 
--enable-libspeex --enable-libtheora --enable-libtwolame 
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc 
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 
--enable-libxavs --enable-libxvid --enable-zlib
   libavutil      52. 63.100 / 52. 63.100
   libavcodec     55. 49.101 / 55. 49.101
   libavformat    55. 28.101 / 55. 28.101
   libavdevice    55.  7.100 / 55.  7.100
   libavfilter     4.  1.101 /  4.  1.101
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
Metadata:
   duration              0.00
   width                 1280.00
   height                720.00
   videodatarate         1464.84
   framerate             25.00
   videocodecid          7.00
   audiodatarate         93.75
   audiosamplerate       48000.00
   audiosamplesize       16.00
   stereo                TRUE
   audiocodecid          10.00
   encoder               Lavf57.2.100
   filesize              0.00
Input #0, flv, from 'rtmp://my_rtmp_feed':
   Metadata:
     encoder         : Lavf57.2.100
   Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 1280x720, 
1500 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
     Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 96 kb/s
[libx264 @ 04349e20] using SAR=1/1
[libx264 @ 04349e20] frame MB size (120x68) > level limit (3600)
[libx264 @ 04349e20] DPB size (4 frames, 32640 mbs) > level limit (2 
frames, 18000 mbs)
[libx264 @ 04349e20] MB rate (204000) > level limit (108000)
[libx264 @ 04349e20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 
Cache64
[libx264 @ 04349e20] profile Main, level 3.1
Output #0, mpegts, to 'udp://127.0.0.1:2345':
   Metadata:
     service_provider: TVA
     service_name    : TVA
     encoder         : Lavf55.28.101
     Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 
16:9], q=-1--1, 90k tbn, 25 tbc
     Stream #0:1(GBR): Audio: mp2, 48000 Hz, stereo, s16, 96 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> libx264)
   Stream #0:1 -> #0:1 (aac -> mp2)
Press [q] to stop, [?] for help

Then you get your standard frame encoding information e.g.:

frame=  195 fps= 25 q=28.0 size=     113kB time=00:00:07.93 bitrate= 
117.0kbits/s dup=33 drop=0

Then on quit:

video:57kB audio:197kB subtitle:0 data:0 global headers:0kB muxing 
overhead 28.835307%
[libx264 @ 04349e20] frame I:2     Avg QP: 8.19  size: 14054
[libx264 @ 04349e20] frame P:105   Avg QP: 9.20  size:    78
[libx264 @ 04349e20] frame B:310   Avg QP:12.67  size:    72
[libx264 @ 04349e20] consecutive B-frames:  0.7%  0.5%  0.0% 98.8%
[libx264 @ 04349e20] mb I  I16..4: 95.6%  0.0%  4.4%
[libx264 @ 04349e20] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  
0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 04349e20] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  
0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:90.5% L1: 9.5% BI: 0.0%
[libx264 @ 04349e20] coded y,uvDC,uvAC intra: 3.0% 0.0% 0.0% inter: 
0.0% 0.0% 0.0%
[libx264 @ 04349e20] i16 v,h,dc,p: 98%  1%  2%  0%
[libx264 @ 04349e20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 20% 16%  4%  4% 
7%  4%  6%  3%
[libx264 @ 04349e20] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 04349e20] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 04349e20] ref P L0: 89.5%  5.3%  5.3%
[libx264 @ 04349e20] ref B L0:  9.3% 90.7%
[libx264 @ 04349e20] kb/s:28.17

I'm only encoding a static image for the video stream hence the low 
video output 57kB.

On 2016-10-19 22:32, Carl Eugen Hoyos wrote:
> 2016-10-19 19:42 GMT+02:00 Wayne Merricks 
> <waynemerricks at thevoiceasia.com>:
>> If it helps here is my entire ffmpeg command so far:
>
> Please always provide the command line you tested together with the
> complete, uncut console output when asking for help here.
>
> In your case, please also provide the complete console output of
> "ffmpeg -i file" for a working stream.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list