matthiasbock / gstreamer

Raspberry Pi gstreamer with UVC H.264 and OpenMAX plugins
26 stars 7 forks source link

Bad video quality - H.264 artifacts #12

Open matthiasbock opened 11 years ago

matthiasbock commented 11 years ago

The video is streaming reliably via RTP as well as SSH tunnel, but the video quality is very bad. Except for the completely transmitted frames, the picture is distorted by missing parts, grey parts and (mostly) incorrectly altered squares inside the picture. After the key frames the picture starts to get blurry due to this incorrectly altered squares, especially when motion in the image occurs. In that case the borders and content texteure of the moving object become blurry.

The problem appears to be re-occuring, since it had already been fixed. I already was able to stream a completely intact picture.

Options:

matthiasbock commented 11 years ago

I updated to the recent firmware, but it didn't help.

ifconfig says 0 packets dropped on both machines.

I noticed, that slow movements produce a less drastic distortion of the picture.

Also, sometimes no distortions occur for several seconds until distortions re-occur. Maybe frames are dropped for being received too late. If that's the case, buffering could help.

matthiasbock commented 11 years ago

Keywords for buffering:

kunalphalak commented 10 years ago

I face the same issues, is there any solution for these ?

matthiasbock commented 10 years ago

Unfortunately no. I got stuck on this problem and haven't tried it again in a while. Maybe the problem has been fixed in a more recent version of gstreamer. Please let me know, if it is.

Have you tried using vontaene's pre-compiled gstreamer? http://wiki.matthiasbock.net/index.php/Hardware-accelerated_video_playback_on_the_Raspberry_Pi#Download_precompiled_version

kunalphalak commented 10 years ago

No, this doesn't seem to have been fixed in the recent versions.I am using this to stream video on laptops. I have not tried using the pre-compiled version,will it make a difference

Kunal Phalak

On Tue, Jun 3, 2014 at 12:14 PM, Matthias notifications@github.com wrote:

Unfortunately no. I got stuck on this problem and haven't tried it again in a while. Maybe the problem has been fixed in a more recent version of gstreamer. Please let me know, if it is.

Have you tried using vontaene's pre-compiled gstreamer?

http://wiki.matthiasbock.net/index.php/Hardware-accelerated_video_playback_on_the_Raspberry_Pi#get_a_third_party_package

— Reply to this email directly or view it on GitHub https://github.com/matthiasbock/gstreamer/issues/12#issuecomment-44925291 .

matthiasbock commented 10 years ago

Don't know. It's possible that vontaene has found a solution for the problem. Maybe not though, if the problem persists with recent versions of gstreamer.

Check out the Raspberry Pi forums on http://www.raspberrypi.org/forums/. There might be a thread on this problem.

It might also be worth a shot to try pi3g.com's precompiled version: http://blog.pi3g.com/2014/02/gstreamer-1-0-packages-with-hardware-support/

Success?

gregd72002 commented 9 years ago

Hi, same problem in here using official gstreamer-1.4.5. It works well for bitrate of up to around 500-600k. Above not really.

Anyone got any update on this?

r3dsm0k3 commented 9 years ago

@gregd72002 same thing here as for me as well. Also the video stutters as if the frames are being dropped, but it is not.

r3dsm0k3 commented 9 years ago

Using the capture program (https://github.com/DeLaGuardo/capture) and piping the output to gstreamer. So far good with very less artefacts than uvch264src, also this eliminates the stutter issue absolutely. This is my pipeline if it helps someone.

capture -d /dev/video0 -o | gst-launch-1.0 -v -e filesrc location=/dev/fd/0 do-timestamp=true ! \
queue ! h264parse ! queue ! mux. alsasrc device="plughw:0" do-timestamp=true ! \
audio/x-raw,format=\(string\)S16LE,rate=32000,channels=2 ! queue !  \
voaacenc bitrate=41000 ! aacparse ! queue ! mux. flvmux name=mux streamable=true !  \
queue leaky=1 ! filesink location=test.flv