Sie sind nicht angemeldet.

1

20.09.2014, 14:54

ffmpeg parameters do not match the corresponding output link

Hi,

Ich möchte auf 2 Dateien concatenate, bei der 2. Datei ein Stück abschneiden, die Video Spur und 2 Audio spuren mitnehmen und die 3 Spuren konvertieren.

Mein Befehl dafür:

Quellcode

1
2
3
4
5
6
ffmpeg -fflags +genpts -i VTS_01_1.VOB -i VTS_01_2.VOB \
-ss 00:00:00 -to 01:06:19 \
-vcodec hevc -x265-params crf=20 \
-sn -acodec ac3 \
-filter_complex '[0:#0x1e0] [0:#0x80] [0:#0x81] [1:#0x1e0] [1:#0x80] [1:#0x81] concat=n=2:v=1:a=2 [v] [a1] [a2]' \
 -map '[v]' -map '[a1]' -map '[a2]' e01.mkv


Allerdings bekomme ich immer den Fehler:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ffmpeg version 2.2.7 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 13 2014 12:27:47 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=core-avx-i' --extra-cflags='-O2 -pipe -march=core-avx-i' --extra-cxxflags='-O2 -pipe -march=core-avx-i' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --disable-vaapi --enable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --enable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --disable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-mmxext --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --cpu=core-avx-i
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:25:08.97, start: 0.280633, bitrate: 5692 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg), 720x576 [SAR 16:15 DAR 4:3], max. 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:3[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:4[0x82]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:5[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
[mpeg2video @ 0x1fa5df0] Invalid frame dimensions 0x0.
    Last message repeated 1 times
Input #1, mpeg, from 'VTS_01_2.VOB':
  Duration: 26:12:39.77, start: 1509.119267, bitrate: 91 kb/s
    Stream #1:0[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
    Stream #1:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #1:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #1:3[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #1:4[0x82]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #1:5[0x1bf]: Data: dvd_nav_packet
    Stream #1:6[0x20]: Subtitle: dvd_subtitle
    Stream #1:7[0x21]: Subtitle: dvd_subtitle
[Parsed_concat_0 @ 0x1b61a90] Input link in1:v0 parameters (size 720x576, SAR 64:45) do not match the corresponding output link in0:v0 parameters (720x576, SAR 16:15)
[Parsed_concat_0 @ 0x1b61a90] Failed to configure output pad on Parsed_concat_0
Conversion failed!


mediainfo Datei 1:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
General
Complete name                            : VTS_01_1.VOB
Format                                   : MPEG-PS
File size                                : 1 024 MiB
Duration                                 : 25mn 9s
Overall bit rate mode                    : Variable
Overall bit rate                         : 5 691 Kbps
Writing library                          : encoded by TMPGEnc (ver. 2.524.63.181)

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Duration                                 : 25mn 9s
Bit rate mode                            : Variable
Bit rate                                 : 4 010 Kbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.387
Stream size                              : 721 MiB (70%)
Writing library                          : TMPGEnc 2.524.63.181
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.470 System B, BT.470 System G
Matrix coefficients                      : BT.601

Audio #1
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 25mn 8s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : 6ms
Stream size                              : 80.6 MiB (8%)

Audio #2
ID                                       : 189 (0xBD)-129 (0x81)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 25mn 8s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : 6ms
Stream size                              : 80.6 MiB (8%)

Audio #3
ID                                       : 189 (0xBD)-130 (0x82)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 25mn 8s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : 6ms
Stream size                              : 80.6 MiB (8%)

Audio #4
ID                                       : 189 (0xBD)-131 (0x83)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Format profile                           : Dolby Digital
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 25mn 8s
Bit rate mode                            : Constant
Bit rate                                 : 224 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : 6ms
Stream size                              : 40.3 MiB (4%)

Text #1
ID                                       : 189 (0xBD)-32 (0x20)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Duration                                 : 25mn 6s
Delay relative to video                  : 566ms

Text #2
ID                                       : 189 (0xBD)-33 (0x21)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Duration                                 : 25mn 6s
Delay relative to video                  : 566ms

Text #3
ID                                       : 189 (0xBD)-34 (0x22)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Duration                                 : 25mn 4s
Delay relative to video                  : 566ms

Text #4
ID                                       : 189 (0xBD)-35 (0x23)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Duration                                 : 25mn 4s
Delay relative to video                  : 566ms

Text #5
ID                                       : 189 (0xBD)-36 (0x24)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Duration                                 : 25mn 4s
Delay relative to video                  : 566ms

Menu


Mediainfo Datei 2

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
General
Complete name                            : VTS_01_2.VOB
Format                                   : MPEG-PS
File size                                : 1 024 MiB
Overall bit rate mode                    : Variable

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=12
Bit rate mode                            : Variable
Maximum bit rate                         : 9 800 Kbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy

Audio #1
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -608ms

Audio #2
ID                                       : 189 (0xBD)-129 (0x81)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -608ms

Audio #3
ID                                       : 189 (0xBD)-130 (0x82)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel count                            : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -608ms

Audio #4
ID                                       : 189 (0xBD)-131 (0x83)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Format profile                           : Dolby Digital
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Bit rate mode                            : Constant
Bit rate                                 : 224 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -608ms

Text #1
ID                                       : 189 (0xBD)-32 (0x20)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Delay relative to video                  : 240ms

Text #2
ID                                       : 189 (0xBD)-33 (0x21)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video
Delay relative to video                  : 240ms

Text #3
ID                                       : 189 (0xBD)-34 (0x22)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video

Text #4
ID                                       : 189 (0xBD)-35 (0x23)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video

Text #5
ID                                       : 189 (0xBD)-36 (0x24)
Format                                   : RLE
Format/Info                              : Run-length encoding
Muxing mode                              : DVD-Video

Menu


Es liegt wohl daran dass eine Datei 16:9 ist und die andere 4:3, wie kann ich erreichen dass es trotzdem funktioniert?

Vielen Dank
Thorus

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Thorus« (22.09.2014, 12:55)


2

21.09.2014, 22:56

Hi,

in was möchtest du denn die dritte Spur konvertieren. Ich kann dir bei deinem ganzheitlichen Befehl leider nicht helfe. Benutze zwar ffmpeg schon seit Jahre, konvertiere und schnipple alles damit. Aber ich machs der einfach halber heit in mehreren Schritten. Oder muss es unbdingt ein Schritt sein?

In deinem Fall würde ich es so machen: Die einzelnen Dateien richten so wie du sie brauchst, zusammenhängen, und zwecks der Zeitachse nochmal durch ffmpeg laufen lasssen. Zusammenhängen mach ich immer mit cat.

Quellcode

1
cat video1.ts video2.ts video3.ts > fertig.ts


lg
boospy
Gentoo Can Do!

Wiki auf: http://deepdoc.at

3

22.09.2014, 12:55

Hi,

Ich konnte es jetzt folgendermaßen lösen:

Quellcode

1
2
3
4
5
6
ffmpeg -fflags +genpts -i VTS_01_1.VOB -i VTS_01_2.VOB \
-ss 00:00:00 -to 01:06:19 \
-vcodec hevc -x265-params crf=20 \
-sn -acodec ac3 \
-filter_complex '[0:#0x1e0]setsar=64/45[sarfix];[sarfix] [0:#0x80] [0:#0x81] [1:#0x1e0] [1:#0x80] [1:#0x81] concat=n=2:v=1:a=2 [v] [a1] [a2]' \
 -map '[v]' -map '[a1]' -map '[a2]' e01.mkv


Damit wandelt er das SAR des ersten File auf den Wert des zweiten Files. Interessanterweise fehlert es wenn ich versuche beide SAR auf das gleich zu setzen, oder das SAR des zweiten Files zu ändern, es geht wohl nur das erste.

Das von dir beschriebene concatenating auf file level geht leider nur bei manchen Containern, VOB und mkv gehören nicht dazu, bei mir ging es auf jeden fall so nicht. Das hatte ich vorher schon probiert ;)