So i have a ts video file and want to cut it and put it into an mkv container but i am getting an error. I am able to cut it into a .ts container but would prefer mkv.
what is data that is giving me the error when trying to put into a mkv container. All i really want is the video, ac3 audio and subs.
here is the streams in my ts files.
heres the command i am usingCode:Stream #0:0[0x1388]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x138d](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:2[0x138c](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:3[0x138b](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006) Stream #0:4[0x1389](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s Stream #0:5[0x901]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:6[0x911]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:7[0x90f]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:8[0xf0b]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:9[0xf04]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:10[0xf03]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:11[0xf02]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:12[0xf01]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:13[0xf00]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:14[0xf08]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:15[0xf06]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:16[0xf05]: Unknown: none ([11][0][0][0] / 0x000B)
Code:ffmpeg -i movie.ts -ss 00:03:45 -to 00:32:25 -map 0 -c copy -ignore_unknown movie-cut.mkv
error i am getting
Code:[matroska @ 0x5643a6bfef00] Tag [6][0][0][0] incompatible with output codec id '94215' ([0][0][0][0]) Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Any help would be appreciated.
+ Reply to Thread
Results 1 to 14 of 14
-
-
Try explicitly mapping streams 0 to 4.
Code:ffmpeg -i movie.ts -ss 00:03:45 -to 00:32:25 -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c copy -ignore_unknown movie-cut.mkv
-
same thing.
[matroska @ 0x562b819be800] Tag [6][0][0][0] incompatible with output codec id '94215' ([0][0][0][0])
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Last message repeated 1 times
seems the subs are the issue. as if i map just stream 0,1 and 4 it seems to copy ok but i do get an error after converting.
Code:File 'movie-cut.mkv' already exists. Overwrite? [y/N] y Output #0, matroska, to 'movie-cut.mkv': Metadata: encoder : Lavf58.45.100 Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc Stream #0:1(NAR): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:2(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:4 -> #0:2 (copy) Press [q] to stop, [?] for help [matroska @ 0x562e5cf0ad80] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [matroska @ 0x562e5cf0ad80] Can't write packet with unknown timestamp av_interleaved_write_frame(): Invalid argument [matroska @ 0x562e5cf0ad80] Can't write packet with unknown timestamp Error writing trailer of movie-cut.mkv: Invalid argument frame=42457 fps=9951 q=-1.0 Lsize= 743283kB time=00:28:18.27 bitrate=3585.4kbits/s speed= 398x video:649277kB audio:92846kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.156358% Conversion failed!
-
I was going to suggest removing that next. Guess you figured it out.
I don't know what's in all those "unknown" streams. You might try including one or more and see what happens. I suspect the remux will fail because MVK won't support the data type or ffmpeg will not know what to label the stream(s) as. -
Any idea how to fix the video conversion/timestamps not set error. I found online that -fflags +genpts should fix it but doesnt for me.
Code:[matroska @ 0x55ca77ec4280] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [matroska @ 0x55ca77ec4280] Can't write packet with unknown timestamp av_interleaved_write_frame(): Invalid argument [matroska @ 0x55ca77ec4280] Can't write packet with unknown timestamp Error writing trailer of test.mkv: Invalid argument frame=42469 fps=3866 q=-1.0 Lsize= 747750kB time=00:28:20.96 bitrate=3601.2kbits/s speed= 155x video:649322kB audio:92866kB subtitle:4440kB other streams:0kB global headers:0kB muxing overhead: 0.150127% Conversion failed!
Code:ffmpeg -fflags +genpts -i movie.ts -ss 00:03:45 -to 00:32:25 -map 0:0 -map 0:4 -map 0:2 -map 0:1 -c copy -ignore_unknown movie-cut.mkv
would prefer to do things from the command line as the machine is headless so does not have a UI. -
thanks looks like that didnt work either and got a different error.
Code:ffmpeg version 4.3.3-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] non-existing PPS 0 referenced Last message repeated 1 times [h264 @ 0x55b3d64e6e80] decode_slice_header error [h264 @ 0x55b3d64e6e80] no frame! [h264 @ 0x55b3d64e6e80] mmco: unref short failure [h264 @ 0x55b3d64e6e80] reference picture missing during reorder [h264 @ 0x55b3d64e6e80] Missing reference picture, default is 2147483647 [h264 @ 0x55b3d64e6e80] reference picture missing during reorder [h264 @ 0x55b3d64e6e80] Missing reference picture, default is 2147483647 [h264 @ 0x55b3d64e6e80] reference picture missing during reorder [h264 @ 0x55b3d64e6e80] Missing reference picture, default is 2147483647 [h264 @ 0x55b3d64e6e80] mmco: unref short failure Last message repeated 1 times [h264 @ 0x55b3d64e6e80] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one [h264 @ 0x55b3d64e6e80] Increasing reorder buffer to 2 [h264 @ 0x55b3d64e6e80] Increasing reorder buffer to 3 [mpegts @ 0x55b3d64c03c0] PES packet size mismatch [mpegts @ 0x55b3d64c03c0] Packet corrupt (stream = 1, dts = 5065402495). [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 5 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 7 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 8 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 9 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 10 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 11 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 12 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 13 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 14 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 15 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x55b3d64c03c0] Could not find codec parameters for stream 16 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Error parsing framerate framerate.
the video that it results when it says conversion failed still seems to work fine. -
-
try ffmpeg -i output3.mkv -t 00:04:20 -c:v copy -c:a copy output-cut.mkv
more info - https://superuser.com/questions/477711/using-ffmpeg-to-cut-up-mkv-video -
If you have access to a computer with a display you can use MkvToolnixGUI to get the command line equivalent for any operation you set up.
-
is there docs for how to use either of these via commandline? I cant seem to find any.
tsMuxeR: https://github.com/justdan96/tsMuxer/blob/master/docs/USAGE.mdusers currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
ffmpeg MKV to MP4 without rencode makes output frame rate variable?
By Anonymous543 in forum Newbie / General discussionsReplies: 26Last Post: 1st May 2024, 17:05 -
Screen recording software with x265 codec support and small output size?
By Unknown01 in forum Newbie / General discussionsReplies: 1Last Post: 31st Aug 2022, 00:02 -
ffmpeg MKV to MP4 error track 1: codec frame size is not set
By Anonymous543 in forum Newbie / General discussionsReplies: 23Last Post: 4th Mar 2022, 07:06 -
FFmpeg error: non-monotonous DTS in output stream
By Hakunamatata67 in forum Video ConversionReplies: 1Last Post: 30th Jan 2022, 07:07 -
Output file #0 does not contain any stream error using ytl
By Kizuna in forum Video Streaming DownloadingReplies: 4Last Post: 9th Nov 2021, 04:27