MPEG-TS to MP4

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

MPEG-TS to MP4

KN
I am learning about GStreamer, and I have trouble putting together a basic
MPEG-TS to MP4 code.

Here is what I have for discover:
Analyzing file:///mnt/videos/stream5/test.ts
Done discovering file:///mnt/videos/stream5/test.ts

Topology:
  container: MPEG-2 Transport Stream
    audio: MPEG-1 Layer 2 (MP2)
    video: MPEG-2 Video

Properties:
  Duration: 0:40:24.615584629
  Seekable: yes
  Live: no
  Tags:
      audio codec: MPEG-1 Audio
      has crc: false
      channel mode: stereo
      nominal bitrate: 384000
      video codec: MPEG-2 Video

I want to transcode it to MP4 and make it 480p(or i is fine too).

I think I am close but something is off. I suspect I should not have
theoradec and oggdemux ... but confused what it needs to be)

(note: I am running on Jetson Xavier thus need to stay away from omxh264enc,
etc).

This is what I have so far...

sudo gst-launch-1.0 filesrc location=test.ts ! oggdemux name=demux qtmux
name=mux ! filesink location=test.mp4 demux. ! theoradec ! x264enc ! mux.
demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec !
avenc_aac compliance=-2 ! mux.

Please help!




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

Re: MPEG-TS to MP4

Mathieu Duponchelle
oggdemux, theoradec and vorbisdec aren't going to help with what you're
trying to do here, I suppose you copy pasted these from some example
command lines?

uridecodebin is probably your best choice here, eg:

uridecodebin uri=file:///path/to/test.ts name=d
  d. ! audio/x-raw ! queue ! avenc_aac ! [..]
  d. ! video/x-raw ! queue ! x264enc ! [..]

On a separate note, on a jetson xavier you should be able to use nvidia's
hardware encoders, eg nvv4l2h264enc, not sure where the source for those
elements lives but their existence is documented in
<https://developer.download.nvidia.com/embedded/L4T/r32-2_Release_v1.0/Accelerated_GStreamer_User_Guide.pdf>

On 12/23/20 2:54 AM, KN wrote:
I am learning about GStreamer, and I have trouble putting together a basic
MPEG-TS to MP4 code.

Here is what I have for discover:
Analyzing file:///mnt/videos/stream5/test.ts
Done discovering file:///mnt/videos/stream5/test.ts

Topology:
  container: MPEG-2 Transport Stream
    audio: MPEG-1 Layer 2 (MP2)
    video: MPEG-2 Video

Properties:
  Duration: 0:40:24.615584629
  Seekable: yes
  Live: no
  Tags: 
      audio codec: MPEG-1 Audio
      has crc: false
      channel mode: stereo
      nominal bitrate: 384000
      video codec: MPEG-2 Video

I want to transcode it to MP4 and make it 480p(or i is fine too).

I think I am close but something is off. I suspect I should not have
theoradec and oggdemux ... but confused what it needs to be)

(note: I am running on Jetson Xavier thus need to stay away from omxh264enc,
etc).

This is what I have so far...

sudo gst-launch-1.0 filesrc location=test.ts ! oggdemux name=demux qtmux
name=mux ! filesink location=test.mp4 demux. ! theoradec ! x264enc ! mux.
demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec !
avenc_aac compliance=-2 ! mux.

Please help!




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: MPEG-TS to MP4

Edward Hervey-4
In reply to this post by KN
Hi,

  You're missing queue elements a bit everywhere. Essentially:

* Before N-to-1 elements (muxers) : put a queue on each incoming stream.
  Ex : demux ! queue ! ...

* After 1-to-N elements (demuxers) : put a queue on each outgoing stream
  Ex: ... ! queue ! mux

* Before sink : put a queue before the sinks (unless you already have one just
before)

  Withtout that ... you're trying to run everything in one thread ... and that
will deadlock.

  BR,

    Edward

On Tue, 2020-12-22 at 19:54 -0600, KN wrote:

> I am learning about GStreamer, and I have trouble putting together a basic
> MPEG-TS to MP4 code.
>
> Here is what I have for discover:
> Analyzing file:///mnt/videos/stream5/test.ts
> Done discovering file:///mnt/videos/stream5/test.ts
>
> Topology:
>   container: MPEG-2 Transport Stream
>     audio: MPEG-1 Layer 2 (MP2)
>     video: MPEG-2 Video
>
> Properties:
>   Duration: 0:40:24.615584629
>   Seekable: yes
>   Live: no
>   Tags:
>       audio codec: MPEG-1 Audio
>       has crc: false
>       channel mode: stereo
>       nominal bitrate: 384000
>       video codec: MPEG-2 Video
>
> I want to transcode it to MP4 and make it 480p(or i is fine too).
>
> I think I am close but something is off. I suspect I should not have
> theoradec and oggdemux ... but confused what it needs to be)
>
> (note: I am running on Jetson Xavier thus need to stay away from omxh264enc,
> etc).
>
> This is what I have so far...
>
> sudo gst-launch-1.0 filesrc location=test.ts ! oggdemux name=demux qtmux
> name=mux ! filesink location=test.mp4 demux. ! theoradec ! x264enc ! mux.
> demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec !
> avenc_aac compliance=-2 ! mux.
>
> Please help!
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> 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