MPEG-TS to MP4

Edward Hervey bilboed at bilboed.com
Thu Dec 31 08:09:42 UTC 2020


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
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list