0

I'm using ffmpeg and ffplay to stream a raw H.264 video between two computers. This is what the transmitting command line looks like:

ffmpeg -i input.h264 -f mpegts udp:10.0.2.101:1234

And this is the receiving side:

ffplay -f h264 -f mpegts udp://127.0.0.1:1234

The problem is that the the playback on the receiving side shows much worse quality than what I see when playing the source file on the sender side. The network is actually a simulated network on my computer (two virtual machines) so there isn't any packet loss or anything.

What did I do wrong?

1
  • Note that -f h264 -f mpegts is invalid. Just -f mpegts should suffice.
    – slhck
    Mar 20, 2017 at 19:53

1 Answer 1

3

You're re-encoding the video stream. Note that if you don't specify a video codec, ffmpeg will choose one for you – in your case, MPEG-2 with its default settings, which indeed will look quite bad.

If you plan on copying the bitstream, add the -c:v copy option to your sending command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.