Thank you, I already downloaded yesterday after visiting your blog... set bitrate at 6800 and it is nearly perfect for my use!
Streaming with WIFI is better then streaming connected by ethernet... Is this normal? is something wrong with the ethernet port?
For me streaming on WIFI is smooth but on ethernet it is horrible.. it is from the same router... and I tried different ethernet cables... So not sure what is wrong.. anyone experienced performance issues with ethernet?
it takes audio&video from HDMI input, encodes it in H264 and AAC and streams to network (youtube, wowza, multicast,...)
No exactly, to youtube yes, to skype probably no. You can only stream to whatever destinations ffmpeg supports.
Anyone experienced this? this is weird.. normally ethernet performance should be better but streaming is horrible via ethernet while it is butter smooth with wifi
That's weird.. here is the ffmpeg dump while streaming via WIFI: Code: 04-24 12:03:14.920: D/ffmpeg(27696): Input #0, mpegts, from 'pipe:': 04-24 12:03:14.920: D/ffmpeg(27696): Duration: N/A, start: 42624.991756, bitrate: 131 kb/s 04-24 12:03:14.920: D/ffmpeg(27696): Program 1 04-24 12:03:14.924: D/ffmpeg(27696): Stream #0:0[0x1100]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 131 kb/s 04-24 12:03:14.924: D/ffmpeg(27696): Stream #0:1[0x1011]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 30 fps, 29.92 tbr, 90k tbn, 60 tbc 04-24 12:03:14.928: D/ffmpeg(27696): Output #0, mpegts, to 'udp://192.168.1.20:1234': 04-24 12:03:14.928: D/ffmpeg(27696): Metadata: 04-24 12:03:14.928: D/ffmpeg(27696): encoder : Lavf56.4.101 04-24 12:03:14.928: D/ffmpeg(27696): Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720, q=2-31, 30 fps, 90k tbn, 30 tbc 04-24 12:03:14.928: D/ffmpeg(27696): Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, mono, 131 kb/s 04-24 12:03:14.928: D/ffmpeg(27696): Stream mapping: 04-24 12:03:14.928: D/ffmpeg(27696): Stream #0:1 -> #0:0 (copy) 04-24 12:03:14.928: D/ffmpeg(27696): Stream #0:0 -> #0:1 (copy) 04-24 12:03:14.940: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:1; previous: 11520, current: 10517; changing to 11521. This may result in incorrect timestamps in the output file. 04-24 12:03:14.944: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:0; previous: 23695, current: 23695; changing to 23696. This may result in incorrect timestamps in the output file. 04-24 12:03:14.944: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] H.264 bitstream error, startcode missing 04-24 12:03:14.948: D/ffmpeg(27696): Last message repeated 1 times 04-24 12:03:14.948: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:1; previous: 37093, current: 36144; changing to 37094. This may result in incorrect timestamps in the output file. 04-24 12:03:15.444: D/ffmpeg(27696): frame= 38 fps=0.0 q=-1.0 size= 679kB time=00:00:01.43 bitrate=3882.2kbits/s 04-24 12:03:15.580: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:1; previous: 128396, current: 128371; changing to 128397. This may result in incorrect timestamps in the output file. 04-24 12:03:15.884: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:1; previous: 155275, current: 154526; changing to 155276. This may result in incorrect timestamps in the output file. 04-24 12:03:15.980: D/ffmpeg(27696): frame= 54 fps= 53 q=-1.0 size= 1082kB time=00:00:01.96 bitrate=4503.7kbits/s 04-24 12:03:16.480: D/ffmpeg(27696): frame= 68 fps= 45 q=-1.0 size= 1474kB time=00:00:02.43 bitrate=4959.6kbits/s 04-24 12:03:16.948: D/ffmpeg(27696): frame= 83 fps= 41 q=-1.0 size= 1803kB time=00:00:02.94 bitrate=5013.6kbits/s 04-24 12:03:17.076: D/ffmpeg(27696): [mpegts @ 0x42fdfd30] Non-monotonous DTS in output stream 0:1; previous: 263286, current: 261805; changing to 263287. This may result in incorrect timestamps in the output file. 04-24 12:03:17.480: D/ffmpeg(27696): frame= 99 fps= 39 q=-1.0 size= 2119kB time=00:00:03.47 bitrate=4995.7kbits/s 04-24 12:03:17.992: D/ffmpeg(27696): frame= 115 fps= 38 q=-1.0 size= 2391kB time=00:00:04.00 bitrate=4889.6kbits/s 04-24 12:03:18.516: D/ffmpeg(27696): frame= 130 fps= 37 q=-1.0 size= 2818kB time=00:00:04.50 bitrate=5121.7kbits/s 04-24 12:03:19.016: D/ffmpeg(27696): frame= 145 fps= 36 q=-1.0 size= 3060kB time=00:00:05.00 bitrate=5005.5kbits/s 04-24 12:03:19.552: D/ffmpeg(27696): frame= 161 fps= 35 q=-1.0 size= 3450kB time=00:00:05.54 bitrate=5099.7kbits/s And the dump while streaming via ETHERNET with exact same settings as on WIFI: Code: 04-24 20:14:05.433: D/ffmpeg(30746): Input #0, mpegts, from 'pipe:': 04-24 20:14:05.437: D/ffmpeg(30746): Duration: N/A, start: 5840.565689, bitrate: 101 kb/s 04-24 20:14:05.437: D/ffmpeg(30746): Program 1 04-24 20:14:05.437: D/ffmpeg(30746): Stream #0:0[0x1100]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 101 kb/s 04-24 20:14:05.437: D/ffmpeg(30746): Stream #0:1[0x1011]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 30 fps, 29.92 tbr, 90k tbn, 60 tbc 04-24 20:14:05.441: E/MstarStream > read buffer(30746): Nothing to read 04-24 20:14:05.445: D/ffmpeg(30746): Output #0, mpegts, to 'udp://192.168.1.20:1234': 04-24 20:14:05.445: D/ffmpeg(30746): Metadata: 04-24 20:14:05.449: D/ffmpeg(30746): encoder : Lavf56.4.101 04-24 20:14:05.449: D/ffmpeg(30746): Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720, q=2-31, 30 fps, 90k tbn, 30 tbc 04-24 20:14:05.453: D/ffmpeg(30746): Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, mono, 101 kb/s 04-24 20:14:05.453: D/ffmpeg(30746): Stream mapping: 04-24 20:14:05.457: D/ffmpeg(30746): Stream #0:1 -> #0:0 (copy) 04-24 20:14:05.457: D/ffmpeg(30746): Stream #0:0 -> #0:1 (copy) 04-24 20:14:05.461: D/ffmpeg(30746): [mpegts @ 0x428900d0] Non-monotonous DTS in output stream 0:0; previous: 14615, current: 14615; changing to 14616. This may result in incorrect timestamps in the output file. 04-24 20:14:05.465: D/ffmpeg(30746): [mpegts @ 0x428900d0] H.264 bitstream error, startcode missing 04-24 20:14:05.469: D/ffmpeg(30746): Last message repeated 1 times 04-24 20:14:05.473: D/ffmpeg(30746): [mpegts @ 0x428900d0] Non-monotonous DTS in output stream 0:1; previous: 51441, current: 50580; changing to 51442. This may result in incorrect timestamps in the output file. 04-24 20:14:05.689: E/MstarStream > read buffer(30746): Nothing to read 04-24 20:14:06.389: D/ffmpeg(30746): frame= 26 fps=0.0 q=-1.0 size= 283kB time=00:00:01.08 bitrate=2131.1kbits/s 04-24 20:14:07.093: D/ffmpeg(30746): frame= 32 fps= 20 q=-1.0 size= 601kB time=00:00:02.11 bitrate=2326.8kbits/s 04-24 20:14:07.721: D/ffmpeg(30746): frame= 35 fps= 15 q=-1.0 size= 697kB time=00:00:02.28 bitrate=2495.7kbits/s 04-24 20:14:08.369: D/ffmpeg(30746): frame= 39 fps= 13 q=-1.0 size= 799kB time=00:00:03.15 bitrate=2074.6kbits/s 04-24 20:14:09.069: D/ffmpeg(30746): frame= 43 fps= 12 q=-1.0 size= 894kB time=00:00:04.23 bitrate=1730.9kbits/s 04-24 20:14:09.761: D/ffmpeg(30746): frame= 52 fps= 12 q=-1.0 size= 1117kB time=00:00:05.43 bitrate=1684.8kbits/s 04-24 20:14:10.005: E/MstarStream > read buffer(30746): Nothing to read 04-24 20:14:10.645: D/ffmpeg(30746): frame= 62 fps= 12 q=-1.0 size= 1415kB time=00:00:06.72 bitrate=1723.2kbits/s 04-24 20:14:11.101: D/ffmpeg(30746): frame= 69 fps= 12 q=-1.0 size= 1545kB time=00:00:07.17 bitrate=1764.0kbits/s 04-24 20:14:11.741: D/ffmpeg(30746): frame= 77 fps= 12 q=-1.0 size= 1700kB time=00:00:08.25 bitrate=1686.0kbits/s 04-24 20:14:12.397: D/ffmpeg(30746): frame= 86 fps= 12 q=-1.0 size= 1878kB time=00:00:09.04 bitrate=1701.7kbits/s 04-24 20:14:12.425: E/MstarStream > read buffer(30746): Nothing to read 04-24 20:14:13.085: D/ffmpeg(30746): frame= 95 fps= 12 q=-1.0 size= 2141kB time=00:00:09.82 bitrate=1784.2kbits/s 04-24 20:14:13.785: D/ffmpeg(30746): frame= 105 fps= 13 q=-1.0 size= 2326kB time=00:00:10.64 bitrate=1790.3kbits/s 04-24 20:14:14.197: D/ffmpeg(30746): frame= 107 fps= 12 q=-1.0 size= 2368kB time=00:00:10.86 bitrate=1785.2kbits/s Notice the difference in fps, bitrate and size of each frame... that is weird... any clue? anyone?
the problem with ethernet is in the driver (or hardware). It also affects Tronsmart FW so it is probably in SDK from MStar <4>[ 4893.700916] Mstar_emac: Transmit TUND error, TX reset <4>[ 4893.826698] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4896.266154] Mstar_emac: Transmit TUND error, TX reset <4>[ 4896.391980] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4898.122733] Mstar_emac: Transmit TUND error, TX reset <4>[ 4899.451747] Mstar_emac: Transmit TUND error, TX reset <4>[ 4899.577286] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4906.047737] Mstar_emac: Transmit TUND error, TX reset <4>[ 4906.175501] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4906.643071] Mstar_emac: Transmit TUND error, TX reset <4>[ 4912.346786] Mstar_emac: Transmit TUND error, TX reset <4>[ 4912.472299] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4913.172795] Mstar_emac: Transmit TUND error, TX reset <4>[ 4915.966218] Mstar_emac: Transmit TUND error, TX reset <4>[ 4916.092002] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4916.097958] Mstar_emac: Transmit TUND error, TX reset <4>[ 4916.224321] Mstar_emac: Err CheckTSR:0x1e20 <4>[ 4921.417874] Mstar_emac: Transmit TUND error, TX reset
try to run this command as root: ip link set txqueuelen 1000 dev eth0 because when the device boots, qlen is insanely low (30), see: ip addr
Is it just me or the ethernet issue is in every mstar device? (I have 2 tronsmart pavo m9 and they both behave the same)