PDA

View Full Version : [SOLVED] How can I remux MPEG-TS to 'non-MPEG-TS' format?


cord-factor
11th April 2010, 13:46
Hello all, I have the .ts video file (HD-DVD Remux) and I want to put it in matroska. MKVtoolnix doesn't support MPEG-TS container at input. First, I have to extract all streams to something else.
I tried to use ffmpeg, but it returns error:

localhost $ ffmpeg -i Drozh_zemli.ts -vcodec copy -acodec copy -map 0.0:0.0 -map 0.1:0.1 -map 0.2:0.2 -map 0.3:0.3 /mnt/media2/tremors1.mp4 -acodec copy -newaudio -acodec copy -newaudio -acodec copy -newaudio
FFmpeg version SVN-r20373, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Mar 23 2010 00:36:36 with gcc 4.3.4
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=jack --enable-x11grab --enable-libfaad --enable-libopenjpeg --enable-libfaac --enable-nonfree --disable-vdpau --disable-vdpau --disable-altivec --disable-mmx --disable-mmx2 --enable-pic --cpu=host --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1. 4. 1 / 1. 4. 1
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 0x616eb8c65e0]MAX_READ_SIZE:5000000 reached
Input #0, mpegts, from 'Drozh_zemli.ts':
Duration: 01:35:44.96, start: 600.000000, bitrate: 24478 kb/s
Program 1
Stream #0.0[0x1011]: Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 29.97 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Stream #0.2[0x1101]: Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
Stream #0.3[0x1102]: Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
Number of stream maps must match number of output streams
localhost $

What is the correct command?

Midzuki
11th April 2010, 13:56
Give a try to tsmuxer or eac3to under WINE.

cord-factor
11th April 2010, 14:08
Give a try to tsmuxer or eac3to under WINE.
tsmuxer supports (at output) only MPEG-TS format
eac3to? ok, will try it...

cord-factor
11th April 2010, 16:31
eac3to under wine is buggy for me :(
Is there ffmpeg solution?

cord-factor
11th April 2010, 17:05
localhost $ ffmpeg -i Drozh_zemli.ts -vn -map 0:1 -map 0:2 -map 0:3 -acodec copy -f mp4 /mnt/media2/tremors1.mp4 -vn -acodec copy -newaudio -acodec copy -newaudio
FFmpeg version SVN-r20373, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Mar 23 2010 00:36:36 with gcc 4.3.4
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=jack --enable-x11grab --enable-libfaad --enable-libopenjpeg --enable-libfaac --enable-nonfree --disable-vdpau --disable-vdpau --disable-altivec --disable-mmx --disable-mmx2 --enable-pic --cpu=host --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1. 4. 1 / 1. 4. 1
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 0x42f02062b00]MAX_READ_SIZE:5000000 reached
Input #0, mpegts, from 'Drozh_zemli.ts':
Duration: 01:35:44.96, start: 600.000000, bitrate: 24478 kb/s
Program 1
Stream #0.0[0x1011]: Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 29.97 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Stream #0.2[0x1101]: Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
Stream #0.3[0x1102]: Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
File '/mnt/media2/tremors1.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 0x42f02080ef0]track 1: could not find tag, codec not currently supported in container
Output #0, mp4, to '/mnt/media2/tremors1.mp4':
Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Stream #0.1: Audio: 0x0082, 48000 Hz, 5.1, s16, 1536 kb/s
Stream #0.2: Audio: 0x0082, 48000 Hz, 5.1, s16, 1536 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.2 -> #0.1
Stream #0.3 -> #0.2
Could not write header for output file #0 (incorrect codec parameters ?)
localhost $
looks like mp4 format can't contain only audio streams...

nm
11th April 2010, 17:16
[mp4 @ 0x42f02080ef0]track 1: could not find tag, codec not currently supported in container
Output #0, mp4, to '/mnt/media2/tremors1.mp4':
Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Stream #0.1: Audio: 0x0082, 48000 Hz, 5.1, s16, 1536 kb/s
Stream #0.2: Audio: 0x0082, 48000 Hz, 5.1, s16, 1536 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.2 -> #0.1
Stream #0.3 -> #0.2
Could not write header for output file #0 (incorrect codec parameters ?)
localhost $
looks like mp4 format can't contain only audio streams...

Sure it can, but you are trying to put a DTS track to MP4 file, which is currently not allowed by FFmpeg. Try muxing to Matroska, or just demux the tracks to elementary streams.

Limit
11th April 2010, 17:16
I use mplayer for that task.

Try this:

mplayer "Drozh_zemli.ts" -dumpvideo -dumpfile "Drozh_zemli.vc1"
mplayer "Drozh_zemli.ts" -dumpaudio -dumpfile "Drozh_zemli.ac3" -aid 4113
mplayer "Drozh_zemli.ts" -dumpaudio -dumpfile "Drozh_zemli_1.dca" -aid 4114
mplayer "Drozh_zemli.ts" -dumpaudio -dumpfile "Drozh_zemli_2.dca" -aid 4115

cord-factor
12th April 2010, 11:39
Thanks, it works! :)