Fixing DTS in h264 video during the conversion to mp4

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fixing DTS in h264 video during the conversion to mp4

Monyz Wacon
Hello,
I'm trying to wrap h.264 video to mp4 container. The conversion is done in this way:

gst-launch-1.0 filesrc location=test.h264 ! h264parse ! qtmux ! filesink location="test.mp4"

The problem is that during the playback using playbin, there is just shown a static image from the video for several seconds and nothing more. The command is:

gst-launch-1.0 playbin uri=file:///home/monyz/test/test.mp4

The problem doesn't occur with mplayer - I am able to playback it. However there are printed warnings like:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3f4cdf4600]Non-increasing DTS in stream 0: packet 2 with DTS -140462610, packet 3 with DTS -140462610
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3f4cdf4600]Non-increasing DTS in stream 0: packet 3 with DTS -140462610, packet 4 with DTS -140462610
[...]

When the video is converted using avconv, then I am able to playback it with gstreamer playbin plugin:

avconv -i test.h264 -c copy test.mp4

however there are warnings during the conversion about DTS like:

Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
Non-monotonous DTS in output stream 0:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file.
[...]

Is there a way to fix these DTS with gstreamer during the conversion?

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fixing DTS in h264 video during the conversion to mp4

Nicolas Dufresne-4
Le dimanche 28 février 2016 à 15:19 +0000, Monyz Wacon a écrit :
> gst-launch-1.0 filesrc location=test.h264 ! h264parse ! qtmux !
> filesink location="test.mp4"

The problem is that h264parse cannot guess the timestamp information.
You need to provide that in order to produce a valid ISOMP4. You can do
that using a buffer probe, assuming you have this information saved
somewhere.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fixing DTS in h264 video during the conversion to mp4

Monyz Wacon
I don't have this information, is there any way to guess it, the same way as avconv does?

On Sun, Feb 28, 2016 at 4:59 PM, Nicolas Dufresne <[hidden email]> wrote:
Le dimanche 28 février 2016 à 15:19 +0000, Monyz Wacon a écrit :
> gst-launch-1.0 filesrc location=test.h264 ! h264parse ! qtmux !
> filesink location="test.mp4"

The problem is that h264parse cannot guess the timestamp information.
You need to provide that in order to produce a valid ISOMP4. You can do
that using a buffer probe, assuming you have this information saved
somewhere.

Nicolas

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel