View Full Version : ACVHD .m2ts stream copy
dizzysaurus
18th January 2008, 20:23
Hi All,
I'd like to move the video and audio streams from AVCHD .m2ts mpeg2 ts files to mpeg4 .mp4/.m4v containers.
Is there a way to do this without re-encoding the video? I just want to copy the streams!
Thanks!
dizzysaurus
18th January 2008, 21:50
latest svn of ffmpeg almost gets there:
ffmpeg -v 5 -y -i 2007-09-0200000.m2ts -acodec copy -vcodec copy out.mp4
FFmpeg version SVN-r11556, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-libfaac --enable-libfaad --enable-libx264 --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gpl --enable-pthreads
libavutil version: 49.6.0
libavcodec version: 51.49.0
libavformat version: 52.4.0
libavdevice version: 52.0.0
built on Jan 18 2008 15:07:30, gcc: 4.1.2 (Gentoo 4.1.2)
Input #0, mpegts, from '2007-09-0200000.m2ts':
Duration: 00:02:14.1, start: 2.223289, bitrate: 5909 kb/s
Program 1
Stream #0.0[0x1011], 1/90000: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 1001/30000, 29.97 tb(r)
Stream #0.1[0x1100], 1/90000: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Output #0, mp4, to 'out.mp4':
Stream #0.0, 1/90000: Video: libx264, yuv420p, 1440x1080 [PAR 0:1 DAR 0:1], 1001/30000, q=2-31, 29.97 tb(c)
Stream #0.1, 1/90000: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
timestamp discontinuity -33367, new offset= -2189922
timestamp discontinuity -66733, new offset= -2123189
error, non monotone timestamps 5005 >= 5005
av_interleaved_write_frame(): Error while opening file
Any pointers on those errors at the end?
dizzysaurus
18th January 2008, 22:02
Tried this, but I'm not sure about the outputs:
xporthdmv -h 2007-09-0200000.m2ts 1 1 1
ffmpeg -y -f h264 -r 29.97 -i bits0001.mpv -i bits0001.mpa -vcodec copy -acodec copy test.mp4
mp4info test.mp4
test.mp4:
Track Type Info
1 video H264 High@4, 268.268 secs, 2570 kbps, 1440x1080 @ 29.970030 fps
2 audio ms , 134.112 secs, 384 kbps, 48000 Hz
Atak_Snajpera
18th January 2008, 22:05
AC3 is not allowed in MP4 container therefore I suggest MKV. Use MKVmerge instead of ffmpeg.
bond
19th January 2008, 11:23
he said he wants .mp4. in this case you need to reencode the audio into the aac format
dizzysaurus
20th January 2008, 12:59
Heh, looks like I got moved.
It was pretty easy to copy streams from m2ts -> xport -> mkvmerge. However I found that mkv doesn't seek very well, are there settings to enable faster seeking or indexing?
With .mp4 seeking is near instant (on a recent PC), but with mkv, it seems to take 10 to 40 seconds to seek, depending on how far into the video I go.
How does one enable fast seeking in .mkv? Also, .mp4 will be much more widely supported, correct?
Many Thanks
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.