mencoder <yourfile.ts> -ovc copy -oac copy -forceidx -o mynew.avi
This command will only change container/format to AVI mencoder is creating by default AVI output format
TS2MP4.bat: Basic example
mencoder <yourfile.ts> -ovc copy -oac copy -of lavf -o mynew.mp4
This command will create MP4/ISOM format you can (dont change AV codec we are changing only format)
TS2AVI-copy_mp3.bat: Basic reencoding audio track example
mencoder <yourfile.ts> -ovc copy -oac mp3lame -forceidx -o mynew.avi
This command is changinh audio codec to MPEG1Layer3/MP3 this is required only if previous examples producing Video without sound/Silent Movie/ Video codec stay untouched this conversion is little bit slower then examples with -ovc copy and -oac copy options.
you need AtomicParsley CLI tool for MP4 files tagging and FFmpeg or MEncoder.
mencoder <yourfile.ts> -ovc copy -oac copy -forceidx -of lavf -o mynewmp4file.mp4
This command will only change container/format to MP4
AtomicParsley mynewmp4file.mp4 --artwork cover.jpg -o mynewmp4file-tagged.mp4
you can create 2 lines short batch script for this task
ffmpeg" -i %1 -vcodec copy -acodec copy %1.mp4 AtomicParsley.exe %1.mp4 --artwork %2 -o %1-tagged.mp4
when you have this script in PATH you can always call toMP4tag.bat script this way
toMP4tag.bat batman.avi batman.jpg
Script will remux AVI to MP4 container and add externalcover image into MP4 result will single file (batman.avi.-tagged.mp4) with thumbnail in WDTV file browser. finally you need only rename file batman.avi.-tagged.mp4 to batman-tagged.mp4 or to whatever.