Page 1 of 1

mp4 file in MPEG-2 transport stream

Posted: 12 Oct 2011 16:36
by kazmihusnain
Dear all,

I am new to video streaming. I want to encapsulate .mp4 file in mpeg-2 ts to calculate the overhead this encapsulation adds to the file. I don't want to re-encode the data. Please guide me how to do it. Any advice, tutorial or documentation is welcomed.

Regards,
Husnain

Re: mp4 file in MPEG-2 transport stream

Posted: 12 Oct 2011 23:49
by Jean-Baptiste Kempf
You can't do that...

Re: mp4 file in MPEG-2 transport stream

Posted: 13 Oct 2011 09:17
by Rémi Denis-Courmont
You can encapsulate audio and video tracks from an MP4 file into an MPEG2-TS file, if the codecs are supported by MPEG2-TS. But you cannot encapsulate the MP4 per se. That does not even make sense.

Code: Select all

vlc myfile.mp4 --sout-all --sout '#standard{access=file,mux=ts,dst=myfile.ts}'

Re: mp4 file in MPEG-2 transport stream

Posted: 13 Oct 2011 13:40
by kazmihusnain
Thanks Remi and Jean,

I still am a little confused. Do you people mean to say that I need to first extract the audio and video streams from my mp4 file and then encapsulate them into MPEG-2 TS individually ???

and then what will this command do?

Code: Select all

vlc myfile.mp4 --sout-all --sout '#standard{access=file,mux=ts,dst=myfile.ts}'
isn't it taking an mp4 file and encapsulating it into MPEG-2 TS?

Thanks

Re: mp4 file in MPEG-2 transport stream

Posted: 13 Oct 2011 15:01
by Rémi Denis-Courmont
No. It's decapsulating MP4 content and then encapsulating it into TS.

You cannot encapsulate a container into a container, at least not into TS.

Re: mp4 file in MPEG-2 transport stream

Posted: 13 Oct 2011 17:18
by kazmihusnain
Thanks I get it now,

But the problem is that when i use this command, nothing happens. I don't know why but when I replace the quotes with double quotes or just insert '=' sign, it does something, right or wrong I don't know. I am talking about the following commands:

Code: Select all

vlc rep128.mp4 --sout-all --sout "#standard{access=file,mux=ts,dst=myfile.ts}"
or

Code: Select all

vlc rep128.mp4 --sout-all --sout=#standard{access=file,mux=ts,dst=myfile.ts}
Please tell me if the output they are giving is the right output. Thanks.

Re: mp4 file in MPEG-2 transport stream

Posted: 17 Oct 2011 17:42
by kazmihusnain
Hi all,

I am able to encapsulate the streams into mpeg-2 ts. Can someone tell me whether the output stream is Constant Bit rate or Variable Bit Rate?


Thanks