[Libav-user] ffmpeg error “Could not allocate picture: Invalid argument Found Video Stream Found Audio Stream”

Teena Movies teenamo.vies at gmail.com
Wed Nov 22 00:13:45 EET 2017


I am trying to write a C program to stream AV by copying both AV codecs
with rtp_mpegts using RTP over network

"/ffmpeg -re -i Sample_AV_15min.ts -acodec copy -vcodec copy -f rtp_mpegts
rtp://192.168.1.1:5004"

using muxing.c as example which used ffmpeg libraries. ffmpeg application
works fine.

Stream details
Input #0, mpegts, from 'Weather_Nation_10min.ts':
  Duration: 00:10:00.38, start: 41313.400811, bitrate: 2840 kb/s
  Program 1
    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
    Stream #0:1[0x14]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp, 448 kb/s
Output #0, rtp_mpegts, to 'rtp://192.168.1.1:5004':
  Metadata:
    encoder         : Lavf54.63.104
    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
    Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)

However, my application fails with

./my_test_app Sample_AV_15min.ts rtp://192.168.1.1:5004

[h264 @ 0x800b30] non-existing PPS referenced
[h264 @ 0x800b30] non-existing PPS 0 referenced
[h264 @ 0x800b30] decode_slice_header error
[h264 @ 0x800b30] no frame!
[....snipped...]
[h264 @ 0x800b30] non-existing PPS 0 referenced
[h264 @ 0x800b30] non-existing PPS referenced
[h264 @ 0x800b30] non-existing PPS 0 referenced
[h264 @ 0x800b30] decode_slice_header error
[h264 @ 0x800b30] no frame!
[h264 @ 0x800b30] mmco: unref short failure
[mpegts @ 0x800020] max_analyze_duration 5000000 reached at 5024000
microseconds
[mpegts @ 0x800020] PES packet size mismatch
could not find codec tag for codec id 17075200, default to 0.
could not find codec tag for codec id 86019, default to 0.
Could not allocate picture: Invalid argument
Found Video Stream Found Audio Stream

How do I fix this? Complete source code based on muxing.c attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171121/931b823b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: muxing_sample.c
Type: text/x-csrc
Size: 18550 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171121/931b823b/attachment.c>


More information about the Libav-user mailing list