Bad video quality - H.264 artifacts #12

Open
matthiasbock opened this Issue Jul 17, 2013 · 9 comments

Comments

Projects
None yet
4 participants
@matthiasbock
Owner

matthiasbock commented Jul 17, 2013

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.

  • maybe that was with V4L2 and without UVC H.264
  • overclocking the VideoCore didn't help
  • dispmanx_offline=1 didn't help

Options:

  • try recording a file, copy it over, try playback
  • try playing the RTP stream on a PC
  • try streaming from a PC using UVC H.264
  • use iptables to find out about dropped packets
  • increase buffer / introduce a delay in playback
@matthiasbock

This comment has been minimized.

Show comment
Hide comment
@matthiasbock

matthiasbock Jul 18, 2013

Owner

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.

Owner

matthiasbock commented Jul 18, 2013

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

This comment has been minimized.

Show comment
Hide comment
@matthiasbock

matthiasbock Jul 18, 2013

Owner

Keywords for buffering:

  • gstrtpbin
  • gstrtpjitterbuffer
  • latency=200...
  • ts-offset
  • queue2 use-buffering=true ...
Owner

matthiasbock commented Jul 18, 2013

Keywords for buffering:

  • gstrtpbin
  • gstrtpjitterbuffer
  • latency=200...
  • ts-offset
  • queue2 use-buffering=true ...
@kunalphalak

This comment has been minimized.

Show comment
Hide comment
@kunalphalak

kunalphalak Jun 3, 2014

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

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

@matthiasbock

This comment has been minimized.

Show comment
Hide comment
@matthiasbock

matthiasbock Jun 3, 2014

Owner

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

Owner

matthiasbock commented Jun 3, 2014

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

This comment has been minimized.

Show comment
Hide comment
@kunalphalak

kunalphalak Jun 3, 2014

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
#12 (comment)
.

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
#12 (comment)
.

@matthiasbock

This comment has been minimized.

Show comment
Hide comment
@matthiasbock

matthiasbock Jun 3, 2014

Owner

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?

Owner

matthiasbock commented Jun 3, 2014

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

This comment has been minimized.

Show comment
Hide comment
@gregd72002

gregd72002 Feb 13, 2015

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?

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

This comment has been minimized.

Show comment
Hide comment
@r3dsm0k3

r3dsm0k3 Feb 16, 2015

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

@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

This comment has been minimized.

Show comment
Hide comment
@r3dsm0k3

r3dsm0k3 Feb 16, 2015

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment