News:

--

Main Menu

Converting .m2ts to .ts and vice versa

Started by TCmullet, February 24, 2013, 11:39:11 PM

Previous topic - Next topic

TCmullet

Is it possible to use AviDemux (2.6 r 8473 at this moment) to convert a .m2ts file into a .ts file?  Also the reverse?  I was under the impression that encoded video and audio streams could be put into any container (or nearly any).  Yet, I can't figure out these 2.  There seems to be only "Mpeg TS Muxer (ff)" for an output format.  My current suspicion is that if I give it .m2ts files, that muxer outputs .m2ts files, and if I give it .ts files, it outputs .ts files.  How do we convert between them?

Btw, I've scoured the wiki documentation and can't find the answer.  Same w/forum.

styrol

QuoteMy current suspicion is that if I give it .m2ts files, that muxer outputs .m2ts files, and if I give it .ts files, it outputs .ts files.  How do we convert between them?
Not answering your question explicitly, but some info:

mt2s is an extension of ts, and both are containers for MPEG-2 transport streams.

mt2s usually contains h.264 encoded video stream, it's the container format used for high definition video (AVCHD and Blu-ray discs). But the extension may also be mts for this content.

Sometimes the extension mts is also used for ts streams, but ts should only contain MPEG-2 encoded video to avoid confusion.

"ffmpeg -formats" shows that there is no specific m2ts format (D=Decoder, E= Encoder:

DE mpeg               MPEG-1 System format
E   mpeg1video      raw MPEG-1 video
E   mpeg2video      raw MPEG-2 video
DE mpegts           MPEG-2 transport stream format
D   mpegtsraw       MPEG-2 raw transport stream format
D   mpegvideo        raw MPEG video

So for ts to m2ts conversion you should select: video=x.264, audio=aac
And for mt2s to ts conversion you should select (strictly interpreted): video=MPEG2, audio=MP2

TCmullet

Thanks Styrol, but I think I'm supposed to be doing "Copy" "Copy", so there's no reencoding.  But your info is good to know.

If AviDemux is not the tool for the job, I hope someone will say so clearly.  And if it is, how to do it.  And AFAIK, "Copy" "Copy" is the only way to avoid reencoding.

TCmullet

Styrol (and anyone else), just so you know the context I'm coming with.  I create (by capturing) H264 video and ac3 or aac audio from the Hauppauge Colossus capture board.  They give me the option before the capture starts of saving it in any their 3 choices: .m2ts, .ts., and .mp4.  If I cap in .m2ts but AviDemux has problems, someone says "try .ts".  I may be able to recapture the same DVR's program that way, or can capture new footage in .ts, but it would be good to remux from "any" to "any" container, generally.  An important part of this is knowing whether or not AviDemux is even intended to be able to accomplish this.