H.264 encoded video has data distortion at the start of file.

Chuck Crisler ccrislerathome at gmail.com
Fri Feb 12 16:50:49 UTC 2016


The h.264 decoder needs a complete reference frame to properly decode a
stream. That includes an SPS, PPS and an IFrame. Probably you are writing
data to the file that doesn't start with this data. You should delay the
file write until you have these elements. Often they are transmitted in
that order. However, some IP sources will only transmit the SPS and PPS
once and some may never transmit them in band, only in an SDP. So you need
to be careful depending on the source and encoder. GSTREAMER elements do
have properties to force re-transmitting those elements.
On Feb 12, 2016 4:55 AM, "Ashish Kumar Mishra" <
ashish.kmishra at dexceldesigns.com> wrote:

> Hi All ,
>
> I am working with v4l2src + alsasrc , the application creates multiple
> files
> of user defined chunk
> The basic logic of the could be mapped to :-
> *gst-launch-1.0 -v v4l2src do-timestamp=true !
> video/x-raw,width=960,height=720,framerate=30/1 ! timeoverlay
> shaded-background=1 ! x264enc tune=zerolatency ! mux. alsasrc !
> audio/x-raw,width=16,depth=16,rate=44100,channels=2 ! queue ! mux.
> matroskamux name=mux  ! filesink *
>
> The files has some quality issue at the start of every file created
> ,attached is the snapshot of the same.
> Basic google search pointed to some problems in H.264 frame .
>
> Could team member please provide some pointers as to how could this problem
> be addressed.
> The video is proper after 3-4sec in every file.
>
> Thanks
> Ashish Kumar Mishra
>
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4675812/38.png>
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/H-264-encoded-video-has-data-distortion-at-the-start-of-file-tp4675812.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160212/2b065a9e/attachment.html>


More information about the gstreamer-devel mailing list