Page 1 of 1
looking for script to merge multiple m2ts
Posted: March 7th, 2010, 6:10 pm
by mrsieb
I am looking for a script witch join m2ts files from AVCHD to one m2ts or one MKV on linux,
for easier handling on the XBMC Libray to prevent multiple detection.
-> 00000.m2ts
-> 00001.m2ts
-> 00002.m2ts
-> 0000x.m2ts
= MOIVE_Name.m2ts or .mkv
I think this should be possible with tsmuxer but i have no idea how to start, maybe someone can give me a hint how to do this.
Re: looking for script to merge multiple m2ts
Posted: March 14th, 2010, 3:06 pm
by roads
I have the same problem, could you please mention this problem to the XBMC devs? If you open a thread there I will second it. I deleted one of them from the lib leaving the file where it is. Now the library update is failing. Great..
Re: looking for script to merge multiple m2ts
Posted: March 19th, 2010, 6:55 am
by roads
So here is the thread if you are still interested
http://forum.xbmc.org/showthread.php?t=70275
Re: looking for script to merge multiple m2ts
Posted: March 21st, 2010, 3:24 pm
by mrsieb
I tried it with tsmuxer.
the cli version for linux is easy to use but the meta file is a little bit work
so i will try to write script for this.
- Stept one read out and count m2ts files
- Catch Infos and write to file [for i in *.m2ts; do ~/tsMuxeR "$i" > "scan_$i.txt"; done] (i don know how t o count the amount of the files
- Read out scaned files and greate meta file
- Call tsmuxer
meta file example
Code: Select all
MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500
V_MPEG4/ISO/AVC, "00000.m2ts"+"00001.m2ts"+"00002.m2ts", fps=23.976, insertSEI, contSPS, track=4113
A_AC3, "00000.m2ts"+"00001.m2ts"+"00002.m2ts", track=4352, lang=ger
A_AC3, "00000.m2ts"+"00001.m2ts"+"00002.m2ts", track=4353, lang=eng
S_HDMV/PGS, "00000.m2ts"+"00001.m2ts"+"00002.m2ts",bottom-offset=24,font-border=2,text-align=center,video-width=1920,video-height=1080,fps=23.976, track=4608, lang=ger
S_HDMV/PGS, "00000.m2ts"+"00001.m2ts"+"00002.m2ts",bottom-offset=24,font-border=2,text-align=center,video-width=1920,video-height=1080,fps=23.976, track=4609, lang=ger
S_HDMV/PGS, "00000.m2ts"+"00001.m2ts"+"00002.m2ts",bottom-offset=24,font-border=2,text-align=center,video-width=1920,video-height=1080,fps=23.976, track=4610, lang=eng
example scan file
Code: Select all
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
Track ID: 4113
Stream type: H.264
Stream ID: V_MPEG4/ISO/AVC
Stream info: Profile: [email protected] Resolution: 1920:1080p Frame rate: 23.976
Stream lang:
Track ID: 4352
Stream type: AC3
Stream ID: A_AC3
Stream info: Bitrate: 640Kbps Sample Rate: 48KHz Channels: 6
Stream lang: ger
Track ID: 4353
Stream type: AC3
Stream ID: A_AC3
Stream info: Bitrate: 640Kbps Sample Rate: 48KHz Channels: 6
Stream lang: eng
Track ID: 4608
Stream type: PGS
Stream ID: S_HDMV/PGS
Stream info: Presentation Graphic Stream #0
Stream lang: ger
Track ID: 4609
Stream type: PGS
Stream ID: S_HDMV/PGS
Stream info: Presentation Graphic Stream #1 Resolution: 1920:1080 Frame rate: 23.976
Stream lang: ger
Track ID: 4610
Stream type: PGS
Stream ID: S_HDMV/PGS
Stream info: Presentation Graphic Stream #2
Stream lang: eng