Hey guys!
So I'm really trying hard to get good at FFMpeg, and I had one particular reason to use it lately. I occasionally convert VHS tapes to DVD, and I do this by way of an El Gato capture card. Normally I would use Avidemux for something like this, but for some reason I can't get the captured files to open in that program. The El Gato native capture format is AVC inside of a .ts container, with the following streams in it:
All I need is stream 0:0 and 0:2.Code:Stream #0:0[0x64]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709, top first), 720x480 [SAR 10:11 DAR 15:11], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x66]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv), 90k tbr, 90k tbn, 90k tbc Stream #0:2[0x67](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 227 kb/s Stream #0:3[0x69](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:4[0x3ec](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:5[0x3f0](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:6[0x3f7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:7[0x65](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 227 kb/s Stream #0:8[0x3f3](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:9[0x3eb](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:10[0x3f5](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:11[0x3ed](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:12[0x3f1](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:13[0x4e7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
The following command is what I use to select those two streams and swap to an .MP4 container so it will play nice with a wider variety of programs.
And it...sort of works? The audio and video play, but there are some discrepancies reported by MediaInfo, notably the bitrate which confuses me.Code:ffmpeg -i MOVIE.ts -map 0:0 -map 0:2 -c:v copy -c:a copy OUTPUT.mp4
Original video (with irrelevant audio streams excluded):
Converted video:Code:General ID : 1 (0x1) Complete name : C:\Users\Cursed Lemon\Videos\EGC_Library\My Great Game - My Great Capture - 2018-08-25 00-24-05\Recording_2018-08-25_00-24-05_0011.ts Format : MPEG-TS File size : 2.55 GiB Duration : 24 min 29 s Overall bit rate mode : Variable Overall bit rate : 14.9 Mb/s Video ID : 100 (0x64) Menu ID : 2 (0x2) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 2 frames Format settings, GOP : M=2, N=14 Codec ID : 27 Duration : 24 min 29 s Width : 720 pixels Height : 480 pixels Display aspect ratio : 4:3 Frame rate : 29.970 (30000/1001) FPS Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Color range : Limited Color primaries : BT.601 NTSC Transfer characteristics : BT.709 Matrix coefficients : BT.601 Audio #1 ID : 101 (0x65) Menu ID : 2 (0x2) Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Muxing mode : ADTS Codec ID : 15 Duration : 24 min 29 s Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Delay relative to video : -4 ms Language : English
Further, when converting the video, the following message shows up repeatedly through the conversion process:Code:General Complete name : C:\Users\Cursed Lemon\Videos\EGC_Library\My Great Game - My Great Capture - 2018-08-25 00-24-05\test.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 1.97 GiB Duration : 24 min 30 s Overall bit rate mode : Variable Overall bit rate : 11.5 Mb/s Writing application : Lavf58.17.103 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 2 frames Format settings, GOP : M=2, N=14 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 24 min 30 s Bit rate : 11.3 Mb/s Width : 720 pixels Height : 480 pixels Display aspect ratio : 4:3 Frame rate mode : Variable Frame rate : 59.940 (59940/1000) FPS Minimum frame rate : 6.660 FPS Maximum frame rate : 90 000.000 FPS Original frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.543 Stream size : 1.93 GiB (98%) Color range : Limited Color primaries : BT.601 NTSC Transfer characteristics : BT.709 Matrix coefficients : BT.601 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 24 min 30 s Bit rate mode : Variable Bit rate : 221 kb/s Maximum bit rate : 228 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Stream size : 38.8 MiB (2%) Language : English Default : Yes Alternate group : 1
Similarly, when I attempt to swap the container to an MKV instead of an MP4, I get the following error:Code:... [mp4 @ 0000021e98059280] Invalid DTS: 132284670 PTS: 132280164 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Invalid DTS: 132284670 PTS: 132281666 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132284670, current: 132284670; changing to 132284671. This may result in incorrect timestamps in the output file. [mp4 @ 0000021e98059280] Invalid DTS: 132290675 PTS: 132286171 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132290675, current: 132290675; changing to 132290676. This may result in incorrect timestamps in the output file. [mp4 @ 0000021e98059280] Invalid DTS: 132290675 PTS: 132287673 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132290676, current: 132290675; changing to 132290677. This may result in incorrect timestamps in the output file. [mp4 @ 0000021e98059280] Invalid DTS: 132296681 PTS: 132292176 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132296682, current: 132296681; changing to 132296683. This may result in incorrect timestamps in the output file. [mp4 @ 0000021e98059280] Invalid DTS: 132296681 PTS: 132293678 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132296683, current: 132296681; changing to 132296684. This may result in incorrect timestamps in the output file. [mp4 @ 0000021e98059280] Invalid DTS: 132302688 PTS: 132298182 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Invalid DTS: 132302688 PTS: 132299684 in output stream 0:0, replacing by guess [mp4 @ 0000021e98059280] Non-monotonous DTS in output stream 0:0; previous: 132302688, current: 132302688; changing to 132302689. This may result in incorrect timestamps in the output file. ...
Does anyone know what this error means, and why the video characteristics (frame rate, bit rate, etc.) are showing differently?Code:... [matroska @ 0000019a67cf3f00] Invalid DTS: 1469629 PTS: 1469596 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469696 PTS: 1469646 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469696 PTS: 1469663 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469763 PTS: 1469713 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469763 PTS: 1469730 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469830 PTS: 1469780 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469830 PTS: 1469796 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469896 PTS: 1469846 in output stream 0:0, replacing by guess [matroska @ 0000019a67cf3f00] Invalid DTS: 1469896 PTS: 1469863 in output stream 0:0, replacing by guess ...
EDIT: This also seems to happen when I try to concatenate the TS files using FFMpeg.
+ Reply to Thread
Results 1 to 5 of 5
-
-
Hi, I've seen that "Non-monotonous DTS in output stream" problem from time to time, too. Usually connected to the audio stream.
Is it possible that you extract a piece of your video and upload it? -
-
It seems that decoding time stamps are broken. You can try "-fflags +igndts" to regenerate DTS based on PTS:
Code:ffmpeg -fflags +igndts -i MOVIE.ts -map 0:0 -map 0:2 -c:v copy -c:a copy OUTPUT.mp4
Similar Threads
-
How to fix DTS non monotonous error in ffmpeg
By Chemist116 in forum RestorationReplies: 2Last Post: 23rd Aug 2017, 12:24 -
ffmpeg trim + concat = Non-monotonous DTS errors
By TorBru in forum Video ConversionReplies: 9Last Post: 27th Dec 2015, 05:33 -
ffmpeg "unsuitable output format" error
By arthurm in forum Video ConversionReplies: 10Last Post: 17th Sep 2015, 10:04 -
How i can encode audio of "REMUX" to "BluRay.720p.DTS" wit handbrake?
By VideoHelp4Ever in forum Blu-ray RippingReplies: 1Last Post: 2nd Jul 2015, 11:41 -
the "-intra" command in ffmpeg.exe affects encoding "-vcodec copy" mode?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 23rd Oct 2013, 15:53