0

This is my first time encountering video codecs/video streaming.

I am receiving raw h.264 packets over TCP. When I connect to the socket, listen to it and simply save the received data to a file, I am able to play it back using

ffplay data.h264

However, when I try to directly play it from the stream without saving it, using

ffplay tcp://addr:port

all I get is the error

Invalid data found when processing input

Why is that?

Robbsen
  • 153
  • 2
  • 11

2 Answers2

1

Specify the format: ffplay -f h264 tcp://addr:port

Gyan
  • 85,394
  • 9
  • 169
  • 201
1

Alright I found another way to display the video stream.

ffplay -f h264 -codec:v h264 tcp://addr:port?listen

The ?listen parameter makes it so ffplay creates its own tcp server. All I do now is send the data to the specified address.

Robbsen
  • 153
  • 2
  • 11