tsdemux and avdec_h264 not connectable

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

tsdemux and avdec_h264 not connectable

Rapsey
ffdec_h264 supported alignment au and nal. 
avdec_h264 requires alignment au
tsdemux always returns alignment nal. This means tsdemux can not be directly connected to avdec_h264. Is there a filter that can convert between the alignments?
I presume this is the reason gst can't connect the elements.


thank you,
Sergej

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

Re: tsdemux and avdec_h264 not connectable

Tim-Philipp Müller-2
On Sun, 2012-09-30 at 14:24 +0200, Rapsey wrote:
> ffdec_h264 supported alignment au and nal.
> avdec_h264 requires alignment au
> tsdemux always returns alignment nal. This means tsdemux can not be
> directly connected to avdec_h264. Is there a filter that can convert
> between the alignments?
> I presume this is the reason gst can't connect the elements.

h264parse

 Cheers
  -Tim


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

Re: tsdemux and avdec_h264 not connectable

Rapsey
On Sun, Sep 30, 2012 at 4:01 PM, Tim-Philipp Müller <[hidden email]> wrote:
On Sun, 2012-09-30 at 14:24 +0200, Rapsey wrote:
> ffdec_h264 supported alignment au and nal.
> avdec_h264 requires alignment au
> tsdemux always returns alignment nal. This means tsdemux can not be
> directly connected to avdec_h264. Is there a filter that can convert
> between the alignments?
> I presume this is the reason gst can't connect the elements.

h264parse


I tried adding  h264parse ! video/x-h264,alignment=au (as well as just h264parse) infront of avdec_h264 and it still did not work.  


Sergej

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

Re: tsdemux and avdec_h264 not connectable

Edward Hervey
Administrator
Hi,

  the following works fine here:
  tsdemux ! h264parse ! avdec_h264
  or just playbin (which will auto-plug it)

    Edward

On Sun, 2012-09-30 at 17:06 +0200, Rapsey wrote:

> On Sun, Sep 30, 2012 at 4:01 PM, Tim-Philipp Müller <[hidden email]>
> wrote:
>         On Sun, 2012-09-30 at 14:24 +0200, Rapsey wrote:
>         > ffdec_h264 supported alignment au and nal.
>         > avdec_h264 requires alignment au
>         > tsdemux always returns alignment nal. This means tsdemux can
>         not be
>         > directly connected to avdec_h264. Is there a filter that can
>         convert
>         > between the alignments?
>         > I presume this is the reason gst can't connect the elements.
>        
>        
>         h264parse
>        
>
>
> I tried adding  h264parse ! video/x-h264,alignment=au (as well as just
> h264parse) infront of avdec_h264 and it still did not work.  
>
>
>
>
> Sergej
> _______________________________________________
> 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: tsdemux and avdec_h264 not connectable

Felipe Contreras
In reply to this post by Rapsey
On Sun, Sep 30, 2012 at 2:24 PM, Rapsey <[hidden email]> wrote:
> ffdec_h264 supported alignment au and nal.
> avdec_h264 requires alignment au
> tsdemux always returns alignment nal. This means tsdemux can not be directly
> connected to avdec_h264. Is there a filter that can convert between the
> alignments?
> I presume this is the reason gst can't connect the elements.

You might want to try gst-av[1], I just added support for both au and
nal, since libav actually supports both.

Cheers.

[1] https://github.com/felipec/gst-av

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

Re: tsdemux and avdec_h264 not connectable

Tim-Philipp Müller-2
On Thu, 2012-10-04 at 21:07 +0200, Felipe Contreras wrote:

> On Sun, Sep 30, 2012 at 2:24 PM, Rapsey <[hidden email]> wrote:
> > ffdec_h264 supported alignment au and nal.
> > avdec_h264 requires alignment au
> > tsdemux always returns alignment nal. This means tsdemux can not be directly
> > connected to avdec_h264. Is there a filter that can convert between the
> > alignments?
> > I presume this is the reason gst can't connect the elements.
>
> You might want to try gst-av[1], I just added support for both au and
> nal, since libav actually supports both.

Did you port it to 1.0 then?

Because as I understand it he's using 1.0.

ffdec_h264 in 0.10 supports both too (using libav).

 Cheers
  -Tim

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

Re: tsdemux and avdec_h264 not connectable

Felipe Contreras
On Thu, Oct 4, 2012 at 9:17 PM, Tim-Philipp Müller <[hidden email]> wrote:

> On Thu, 2012-10-04 at 21:07 +0200, Felipe Contreras wrote:
>
>> On Sun, Sep 30, 2012 at 2:24 PM, Rapsey <[hidden email]> wrote:
>> > ffdec_h264 supported alignment au and nal.
>> > avdec_h264 requires alignment au
>> > tsdemux always returns alignment nal. This means tsdemux can not be directly
>> > connected to avdec_h264. Is there a filter that can convert between the
>> > alignments?
>> > I presume this is the reason gst can't connect the elements.
>>
>> You might want to try gst-av[1], I just added support for both au and
>> nal, since libav actually supports both.
>
> Did you port it to 1.0 then?

Not yet.

> Because as I understand it he's using 1.0.

I didn't see any mention of that. Is avdec_h264 only 1.0?

> ffdec_h264 in 0.10 supports both too (using libav).

Yeah, but it's using an extra internal parser from libav. I guess that's why.

Cheers.

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

Re: tsdemux and avdec_h264 not connectable

Tim-Philipp Müller-2
On Thu, 2012-10-04 at 22:31 +0200, Felipe Contreras wrote:

> > Because as I understand it he's using 1.0.
>
> I didn't see any mention of that. Is avdec_h264 only 1.0?

Yes. (Not directly related to whether ffmpeg or libav are used under the
hood).

 -Tim

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

Re: tsdemux and avdec_h264 not connectable

Rapsey

On Thu, Oct 4, 2012 at 10:55 PM, Tim-Philipp Müller <[hidden email]> wrote:
On Thu, 2012-10-04 at 22:31 +0200, Felipe Contreras wrote:

> > Because as I understand it he's using 1.0.
>
> I didn't see any mention of that. Is avdec_h264 only 1.0?

Yes. (Not directly related to whether ffmpeg or libav are used under the
hood).


Yes I was talking about 1.0. I went back to 0.10 though, because I could not get anything but the most trivial graphs to work on 1.0. Everything fails on some strange reason.


Sergej

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

Re: tsdemux and avdec_h264 not connectable

Edward Hervey
Administrator
On Fri, 2012-10-05 at 06:57 +0200, Rapsey wrote:

>
> On Thu, Oct 4, 2012 at 10:55 PM, Tim-Philipp Müller <[hidden email]>
> wrote:
>         On Thu, 2012-10-04 at 22:31 +0200, Felipe Contreras wrote:
>        
>         > > Because as I understand it he's using 1.0.
>         >
>         > I didn't see any mention of that. Is avdec_h264 only 1.0?
>        
>        
>         Yes. (Not directly related to whether ffmpeg or libav are used
>         under the
>         hood).
>        
>
>
> Yes I was talking about 1.0. I went back to 0.10 though, because I
> could not get anything but the most trivial graphs to work on 1.0.
> Everything fails on some strange reason.

  If you give us more details, we could maybe help.
  The pipeline you described work fine here.

   Edward

>
>
>
>
> Sergej
> _______________________________________________
> 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
|

Porting gst-launch pipelines from 0.10 to 1.0 (was: Re: tsdemux and avdec_h264 not connectable)

Tim-Philipp Müller-2
In reply to this post by Rapsey
On Fri, 2012-10-05 at 06:57 +0200, Rapsey wrote:

> Yes I was talking about 1.0. I went back to 0.10 though, because I
> could not get anything but the most trivial graphs to work on 1.0.
> Everything fails on some strange reason.

Further to what Edward said, there are only few things to look out for
when moving gst-launch pipelines from 0.10 to 1.0:

1) parsers are now required before many audio/video decoders (esp.
mpeg-y ones)

2) raw audio and video caps have changed, both in name and how the
fields work

3) ffmpegcolorspace has been replaced by videoconvert

4) mpegtsdemux is no more, replaced by tsdemux

5) many request pad template names and sometimes pad template names have
changed from src%d or src_%d or src_%02d or so to e.g. sink%u etc. In
the unlikely event that you use those directly by template name, you'll
have to update those. Occasionally the numbered pad name might have
changed too, e.g. from src0 to src_0. that should be quite rare though.

Maybe I forget some things. I'm sure other people will fill in the
blanks.

Cheers
 -Tim


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

Re: tsdemux and avdec_h264 not connectable

Rapsey
In reply to this post by Edward Hervey

Working 0.10 pipeline:
gst-launch-0.10 --gst-debug-level=2  flvmux name=mflv1 ! filesink location="high.flv"  \
filesrc location="romantica.ts" ! tsdemux name=d \
d. ! queue  ! mad ! queue ! audioconvert ! ffenc_aac bitrate=128000 ! queue ! mflv1. \
d. ! queue ! ffdec_h264 ! queue ! videoscale ! video/x-raw-yuv, width=640, height=360 ! x264enc byte-stream=true bitrate=1024  speed-preset=superfast ! queue ! mflv1.

Should be equivalent but not working 1.0 pipeline:
gst-launch-1.0 --gst-debug-level=2  flvmux name=mflv1 ! filesink location="high.flv"  \
filesrc location="romantica.ts1" ! tsdemux name=d \
d. ! queue  ! mad ! queue ! audioconvert ! avenc_aac bitrate=128000 ! queue ! mflv1. \
d. ! queue ! h264parse ! avdec_h264 ! queue ! videoscale ! video/x-raw,format=YV12, width=640, height=360 ! x264enc byte-stream=true bitrate=1024  speed-preset=superfast ! queue ! mflv1.

The error is:
** (gst-launch-1.0:25804): CRITICAL **: gst_video_decoder_set_latency: assertion `GST_CLOCK_TIME_IS_VALID (min_latency)' failed


Sergej

On Fri, Oct 5, 2012 at 2:25 PM, Edward Hervey <[hidden email]> wrote:
On Fri, 2012-10-05 at 06:57 +0200, Rapsey wrote:
>
> On Thu, Oct 4, 2012 at 10:55 PM, Tim-Philipp Müller <[hidden email]>
> wrote:
>         On Thu, 2012-10-04 at 22:31 +0200, Felipe Contreras wrote:
>
>         > > Because as I understand it he's using 1.0.
>         >
>         > I didn't see any mention of that. Is avdec_h264 only 1.0?
>
>
>         Yes. (Not directly related to whether ffmpeg or libav are used
>         under the
>         hood).
>
>
>
> Yes I was talking about 1.0. I went back to 0.10 though, because I
> could not get anything but the most trivial graphs to work on 1.0.
> Everything fails on some strange reason.

  If you give us more details, we could maybe help.
  The pipeline you described work fine here.

   Edward

>
>
>
>
> Sergej
> _______________________________________________
> 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


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