Encoder (x264enc) and Decoder VDPAU incompatibility?

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

Encoder (x264enc) and Decoder VDPAU incompatibility?

Lauraire
Hi,
 
I have posted many questions on this forum and I would like to sum up my problem today.
 
I have developed :
 
- an Encoder h264 on this model : appsrc -> x264enc -> appsink
- a Decoder that does VDPAU hardware acceleration with : appsrc -> vdpauh264dec -> vdpauvideopostprocess -> vdpausink.
 
(The use of GstAppSrc and GstAppSink responds to my project's constraint which is the use of a particular network protocol...)
 
I have tested the whole process with MPEG2 codec and it works fine (CPU < 2%). But no way to do it with h264...?
 
The decoder replies (GST_DEBUG log) :
 
0:00:04.492899441  8629      0x1c2d570 DEBUG       basevideodecoder gstbasevideodecoder.c:567:gst_base_video_decoder_drain: no sync, scanning
0:00:04.492909724  8629      0x1c2d570 DEBUG       basevideodecoder gstbasevideodecoder.c:587:gst_base_video_decoder_drain: found possible sync after 0 bytes (of 3)
0:00:04.492918819  8629      0x1c2d570 DEBUG           vdpauh264dec h264/gstvdph264dec.c:654:gst_vdp_h264_dec_scan_for_packet_end: start_code: 1
 
No error and no warning.....? I don't understand what is going wrong. Any idea? Thanks in advance!
 

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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Julien Moutte
What type of H264 stream are you generating ? Elementary stream ? Muxed in MPEG4 with AVCc ?

Looks like the VDPAU decoder is just not able to figure out the stream markers.

Best regards,

Julien Moutte
CTO 
Fluendo
San Francisco, USA & Barcelona, SPAIN
Tel BCN. +34 933 175 153
Tel USA. 
+1 415 773 5353

www.fluendo.com & www.moovida.com

P Please consider the environment before printing this e-mail.




On Fri, Aug 26, 2011 at 9:57 AM, Jérémy Lauraire <[hidden email]> wrote:
Hi,
 
I have posted many questions on this forum and I would like to sum up my problem today.
 
I have developed :
 
- an Encoder h264 on this model : appsrc -> x264enc -> appsink
- a Decoder that does VDPAU hardware acceleration with : appsrc -> vdpauh264dec -> vdpauvideopostprocess -> vdpausink.
 
(The use of GstAppSrc and GstAppSink responds to my project's constraint which is the use of a particular network protocol...)
 
I have tested the whole process with MPEG2 codec and it works fine (CPU < 2%). But no way to do it with h264...?
 
The decoder replies (GST_DEBUG log) :
 
0:00:04.492899441  8629      0x1c2d570 DEBUG       basevideodecoder gstbasevideodecoder.c:567:gst_base_video_decoder_drain: no sync, scanning
0:00:04.492909724  8629      0x1c2d570 DEBUG       basevideodecoder gstbasevideodecoder.c:587:gst_base_video_decoder_drain: found possible sync after 0 bytes (of 3)
0:00:04.492918819  8629      0x1c2d570 DEBUG           vdpauh264dec h264/gstvdph264dec.c:654:gst_vdp_h264_dec_scan_for_packet_end: start_code: 1
 
No error and no warning.....? I don't understand what is going wrong. Any idea? Thanks in advance!
 

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



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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Lauraire
Thanks for your answer.
 
I don't use any muxer... so yes it is elementary stream. My source is a raw format video. I take slices of it, encode those data with x264enc and send it on the network.
 
Then I decode the data with the VDPAU pipeline (appsrc -> vdpauh264dec -> vdpauvideopostprocess -> vdpausink).
 
I am not supposed to take care of stream markers, am I? and how?
 
Best regards.

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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Julien Moutte
Well, by default x264enc should generate an elementary stream and that should be decodable by a decoder. Maybe you should try a direct pipeline connection first to make sure the problem is not happening in your network transmission ? 

gst-launch-0.10 videotestsrc ! x264enc ! queue !  vdpauh264dec ! vdpauvideopostprocess ! vdpausink

Best regards,

Julien Moutte
CTO 
Fluendo
San Francisco, USA & Barcelona, SPAIN
Tel BCN. +34 933 175 153
Tel USA. 
+1 415 773 5353

www.fluendo.com & www.moovida.com

P Please consider the environment before printing this e-mail.




On Fri, Aug 26, 2011 at 11:04 AM, Jérémy Lauraire <[hidden email]> wrote:
Thanks for your answer.
 
I don't use any muxer... so yes it is elementary stream. My source is a raw format video. I take slices of it, encode those data with x264enc and send it on the network.
 
Then I decode the data with the VDPAU pipeline (appsrc -> vdpauh264dec -> vdpauvideopostprocess -> vdpausink).
 
I am not supposed to take care of stream markers, am I? and how?
 
Best regards.

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



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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Lauraire
Thanks Julien...
 
Best idea ever! I have tried your pipeline :
 
gst-launch-0.10 videotestsrc ! x264enc ! queue !  vdpauh264dec ! vdpauvideopostprocess ! vdpausink
 
which doesn't work for unknow reason for me... But I have tried to go a little bit further and I did a SERVER :
 
> gst-launch-0.10 filesrc location=/home/jeremy/Bureau/BBB.mkv ! matroskademux ! decodebin ! queue ! x264enc ! queue ! udpsink host=192.168.1.14 port=10308
 
.... and a CLIENT :
 
> GST_DEBUG="*:9" gst-launch-0.10 udpsrc port=10308 ! video/x-h264 ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink
 
And I have reproduce exactly the same behavior as I obtained :
 
gstbasevideodecoder.c:567:gst_base_video_decoder_drain: no sync, scanning
0:00:14.391205975 27686      0x1e5a190 DEBUG       basevideodecoder gstbasevideodecoder.c:587:gst_base_video_decoder_drain: found possible sync after 0 bytes (of 3)
0:00:14.391212857 27686      0x1e5a190 DEBUG           vdpauh264dec

What can I do to correct this....? I will work on those pipeline to fix that before I get back to my code. Thanks a lot!!!
 
PS : are you from France cause I know a Julien Moutte there.... no such chance....
 
++

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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Julien Moutte
You can try replacing the vdpau decoder by a software one like ffdec_264 to check what's going on with the h264 stream.

Yes I am from Lyon (France)

Cheers

Julien

On Friday, August 26, 2011, Jérémy Lauraire <[hidden email]> wrote:
> Thanks Julien...
>  
> Best idea ever! I have tried your pipeline :
>  
> gst-launch-0.10 videotestsrc ! x264enc ! queue !  vdpauh264dec ! vdpauvideopostprocess ! vdpausink
>  
> which doesn't work for unknow reason for me... But I have tried to go a little bit further and I did a SERVER :
>  
>> gst-launch-0.10 filesrc location=/home/jeremy/Bureau/BBB.mkv ! matroskademux ! decodebin ! queue ! x264enc ! queue ! udpsink host=192.168.1.14 port=10308
>  
> .... and a CLIENT :
>  
>> GST_DEBUG="*:9" gst-launch-0.10 udpsrc port=10308 ! video/x-h264 ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink
>  
> And I have reproduce exactly the same behavior as I obtained :
>  
> gstbasevideodecoder.c:567:gst_base_video_decoder_drain: no sync, scanning
> 0:00:14.391205975 27686      0x1e5a190 DEBUG       basevideodecoder gstbasevideodecoder.c:587:gst_base_video_decoder_drain: found possible sync after 0 bytes (of 3)
> 0:00:14.391212857 27686      0x1e5a190 DEBUG           vdpauh264dec
> What can I do to correct this....? I will work on those pipeline to fix that before I get back to my code. Thanks a lot!!!
>  
> PS : are you from France cause I know a Julien Moutte there.... no such chance....
>  
> ++

--

Julien Moutte
CTO 
Fluendo
San Francisco, USA & Barcelona, SPAIN
Tel BCN. +34 933 175 153
Tel USA. 
+1 415 773 5353

www.fluendo.com & www.moovida.com

P Please consider the environment before printing this e-mail.



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

Re: Encoder (x264enc) and Decoder VDPAU incompatibility?

Lauraire
In reply to this post by Lauraire

Hi,
 
I am trying to do video streaming with UDP and take advantage of VDPAU decoder.... but no way to have this working! Please consider those 2 examples :
 
1 - UDP / h264 using ffdec_h264:
 
CLIENT : gst-launch-0.10 udpsrc port=10308 ! application/x-rtp, clock-rate=90000, payload=96 ! rtph264depay ! ffdec_h264 ! xvimagesink
 
SERVER : gst-launch-0.10 filesrc location=/myvideo.mkv ! matroskademux ! decodebin ! queue ! x264enc ! video/x-h264 ! rtph264pay pt=96 ! udpsink host=IP@@@@@ port=10308 sync=false
 
===> This works fine!
 
2 - UDP / h264 using vdpauH264dec :
 
CLIENT : gst-launch-0.10 udpsrc port=10308 ! application/x-rtp, clock-rate=90000, payload=96 ! rtph264depay ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink
 
SERVER : gst-launch-0.10 filesrc location=/myvideo.mkv ! matroskademux ! decodebin ! queue ! x264enc ! video/x-h264 ! rtph264pay pt=96 ! udpsink host=IP@@@@@ port=10308 sync=false
 
===> No display.... and debug claims for "invalid packet size"!
 
What is wrog with vdpau decoding in this case?


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