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:

And this is the receiving side:

ffplay -f h264 -f mpegts udp://

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?

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

1 Answer 1


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.