<div dir="ltr"><br>I am trying to write a C program to stream AV by copying both AV codecs with rtp_mpegts using RTP over network<br><br>"/ffmpeg -re -i Sample_AV_15min.ts -acodec copy -vcodec copy -f rtp_mpegts rtp://<a href="http://192.168.1.1:5004">192.168.1.1:5004</a>"<br><br>using muxing.c as example which used ffmpeg libraries. ffmpeg application works fine.<br><br>Stream details<br>Input #0, mpegts, from 'Weather_Nation_10min.ts':<br>  Duration: 00:10:00.38, start: 41313.400811, bitrate: 2840 kb/s<br>  Program 1<br> 
   Stream #0:0[0x11]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 
59.94 tbc<br>    Stream #0:1[0x14]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 448 kb/s<br>Output #0, rtp_mpegts, to 'rtp://<a href="http://192.168.1.1:5004">192.168.1.1:5004</a>':<br>  Metadata:<br>    encoder         : Lavf54.63.104<br> 
   Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1440x1080
 [SAR 4:3 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 29.97 tbc<br>    Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 448 kb/s<br>Stream mapping:<br>  Stream #0:0 -> #0:0 (copy)<br>  Stream #0:1 -> #0:1 (copy)<br><br>However, my application fails with<br><br>./my_test_app Sample_AV_15min.ts rtp://<a href="http://192.168.1.1:5004">192.168.1.1:5004</a><br><br>[h264 @ 0x800b30] non-existing PPS referenced<br>[h264 @ 0x800b30] non-existing PPS 0 referenced<br>[h264 @ 0x800b30] decode_slice_header error<br>[h264 @ 0x800b30] no frame!<br>[....snipped...]<br>[h264 @ 0x800b30] non-existing PPS 0 referenced<br>[h264 @ 0x800b30] non-existing PPS referenced<br>[h264 @ 0x800b30] non-existing PPS 0 referenced<br>[h264 @ 0x800b30] decode_slice_header error<br>[h264 @ 0x800b30] no frame!<br>[h264 @ 0x800b30] mmco: unref short failure<br>[mpegts @ 0x800020] max_analyze_duration 5000000 reached at 5024000 microseconds<br>[mpegts @ 0x800020] PES packet size mismatch<br>could not find codec tag for codec id 17075200, default to 0.<br>could not find codec tag for codec id 86019, default to 0.<br>Could not allocate picture: Invalid argument<br>Found Video Stream Found Audio Stream<br><br>How do I fix this? Complete source code based on muxing.c attached.<br><br><br></div>