MPEG-TS to MP4

Mathieu Duponchelle mathieu at centricular.com
Mon Dec 28 12:20:58 UTC 2020


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
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201228/411885fd/attachment.htm>


More information about the gstreamer-devel mailing list