15.04 中的 MTS 文件问题

15.04 中的 MTS 文件问题

回到 14.04,我能够观看和编辑 .MTS 文件,没有任何问题。

几个月前,我将系统更新至 15.04,从此以后我就再也没有处理过 MTS 文件。现在我又开始处理这些文件,却遇到了以前从未遇到过的问题。

首先,我昨天移动到电脑上的所有 MTS 文件的缩略图都显示为绿色且乱七八糟。此外,几个月前我处理过的许多 MTS 文件也出现了这种情况,而这些文件我从未遇到过问题。

周围有绿色缩略图

其次,Totem 可以完美读取,所以我可以正常观看。VLC 不行;正如您在下面的屏幕截图中看到的那样,图像不流畅,而且充满了线条和瑕疵。

VLC 问题

真正的问题出现在编辑时。Kdenlive 会将视频添加到项目中,但无法处理它们。如果我尝试通过项目监视器观看它们,它们不起作用。如果我将它们放在时间线上,剪切并渲染它们,我得到的是:

搞砸了 mp4

视频的前半秒之后音频就消失了,而您在上方看到的图像从视频的开始到结束都会振动,但是不会发生变化。

奇怪的是,如果我恢复旧项目并直接导出,最终的视频文件是可以观看的,尽管它并不“流畅”;就像它的帧速率很低一样。Totem 和 VLC 上都是这种情况。

我查看了其中一些 MTS 文件的信息,它们基本上都是一样的,这很正常,因为它们都是用同一类型的相机录制的。这是 的输出avprobe

alex@Sargon:~/Video/WIVA/Mantova C&G 2015$ avprobe CM\ 2\ Turbo\ vs\ Horus.MTS
avprobe version 11.2-6:11.2-1, Copyright (c) 2007-2014 the Libav developers
  built on Jan 18 2015 05:12:33 with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu2)
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 2 with DTS 156718, packet 3 with DTS 156718
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 5 with DTS 199918, packet 6 with DTS 199918
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 6 with DTS 199918, packet 7 with DTS 199918
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 7 with DTS 199918, packet 8 with DTS 199918
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 10 with DTS 243118, packet 11 with DTS 243118
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 11 with DTS 243118, packet 12 with DTS 243118
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 12 with DTS 243118, packet 13 with DTS 243118
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 15 with DTS 286318, packet 16 with DTS 286318
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 16 with DTS 286318, packet 17 with DTS 286318
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 17 with DTS 286318, packet 18 with DTS 286318
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 20 with DTS 329518, packet 21 with DTS 329518
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 21 with DTS 329518, packet 22 with DTS 329518
[mpegts @ 0xf71d20] Non-increasing DTS in stream 2: packet 22 with DTS 329518, packet 23 with DTS 329518
Input #0, mpegts, from 'CM 2 Turbo vs Horus.MTS':
  Duration: 00:17:41.72, start: 1.807089, bitrate: 21473 kb/s
  Program 1 
    Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 50 fps, 90k tbn, 50 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, fltp, 384 kb/s
    Stream #0.2[0x1200]: Subtitle: pgssub
# avprobe output

这是ExifTool同一文件的输出:

alex@Sargon:~/Video/WIVA/Mantova C&G 2015$ exiftool CM\ 2\ Turbo\ vs\     Horus.MTS
ExifTool Version Number         : 9.74
File Name                       : CM 2 Turbo vs Horus.MTS
Directory                       : .
File Size                       : 2718 MB
File Modification Date/Time     : 2015:03:07 18:12:54+01:00
File Access Date/Time           : 2016:01:09 19:56:46+01:00
File Inode Change Date/Time     : 2015:07:25 13:37:41+02:00
File Permissions                : rw-r--r--
File Type                       : M2TS
MIME Type                       : video/m2ts
Video Stream Type               : H.264 Video
Audio Stream Type               : A52/AC-3 Audio
Audio Bitrate                   : 384 kbps
Surround Mode                   : Not indicated
Audio Channels                  : 2
Image Width                     : 1920
Image Height                    : 1080
Date/Time Original              : 2015:03:07 17:55:12+01:00
Aperture Setting                : 1.8
Gain                            : 9 dB
Exposure Program                : Program AE
White Balance                   : Auto
Image Stabilization             : n/a
Exposure Time                   : 1/50
Exposure Compensation           : 0
Focal Length In 35mm Format     : inf mm
Make                            : Panasonic
Audio Sample Rate               : 48000
Duration                        : 0:17:41
Image Size                      : 1920x1080
Shutter Speed                   : 1/50

我尝试通过 将 MTS 文件转换为 mp4 文件ffmpeg。以下是我收到的终端消息:

alex@Sargon:~/Video/Scarpa$ ./ffmpeg -i scarpa.MTS scarpa.mp4
ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 16 2014 05:38:01 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 66.101 / 55. 66.101
  libavformat    55. 43.100 / 55. 43.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  8.100 /  4.  8.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'scarpa.MTS':
  Duration: 00:00:40.02, start: 1.416000, bitrate: 20973 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s
[libx264 @ 0x2f58620] using SAR=1/1
[libx264 @ 0x2f58620] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX AVX2 FMA3 BMI1 BMI2
[libx264 @ 0x2f58620] profile High, level 4.0
[libx264 @ 0x2f58620] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'scarpa.mp4':
  Metadata:
    encoder         : Lavf55.43.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc55.66.101 libx264
    Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc55.66.101 libvo_aacenc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame=   11 fps=0.0 q=0.0 size=       0kB time=00:00:00.47 bitrate=   0.8kbits/s
frame=   25 fps= 24 q=0.0 size=       0kB time=00:00:01.05 bitrate=   0.4kbits/s
frame=   40 fps= 25 q=0.0 size=       0kB time=00:00:01.65 bitrate=   0.2kbits/s
...
frame= 1002 fps=5.2 q=28.0 size=   19301kB time=00:00:39.96 bitrate=3956.1kbits/s dup=9 drop=0
frame= 1002 fps=5.1 q=-1.0 Lsize=   20506kB time=00:00:40.00 bitrate=4198.6kbits/s dup=9 drop=0    
video:19848kB audio:626kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.152066%
[libx264 @ 0x2f58620] frame I:5     Avg QP:19.65  size:139778
[libx264 @ 0x2f58620] frame P:302   Avg QP:22.48  size: 40043
[libx264 @ 0x2f58620] frame B:695   Avg QP:25.80  size: 10837
[libx264 @ 0x2f58620] consecutive B-frames:  0.6%  5.0% 47.3% 47.1%
[libx264 @ 0x2f58620] mb I  I16..4:  6.7% 76.0% 17.3%
[libx264 @ 0x2f58620] mb P  I16..4:  0.5%  4.0%  1.0%  P16..4: 41.1% 11.6%  7.3%  0.0%  0.0%    skip:34.4%
[libx264 @ 0x2f58620] mb B  I16..4:  0.1%  0.2%  0.1%  B16..8: 31.6%  3.5%  0.9%  direct: 1.4%  skip:62.2%  L0:39.3% L1:53.7% BI: 7.0%
[libx264 @ 0x2f58620] 8x8 transform intra:70.5% inter:77.5%
[libx264 @ 0x2f58620] coded y,uvDC,uvAC intra: 79.6% 54.8% 21.1% inter: 12.1% 11.4% 0.4%
[libx264 @ 0x2f58620] i16 v,h,dc,p:  7% 60%  7% 25%
[libx264 @ 0x2f58620] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 25% 19%  5%  6%  6%  9%  6%  9%
[libx264 @ 0x2f58620] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 47% 13%  4%  5%  4%  6%  4%  5%
[libx264 @ 0x2f58620] i8c dc,h,v,p: 58% 22% 15%  5%
[libx264 @ 0x2f58620] Weighted P-Frames: Y:3.3% UV:0.3%
[libx264 @ 0x2f58620] ref P L0: 57.8% 13.5% 20.1%  8.4%  0.3%
[libx264 @ 0x2f58620] ref B L0: 81.4% 15.1%  3.5%
[libx264 @ 0x2f58620] ref B L1: 92.0%  8.0%
[libx264 @ 0x2f58620] kb/s:4056.68

最终文件可以运行,但无论我用 Totem 还是 VLC 打开它,我都会看到第二张图像中相同的线条。

我正在尝试将情况恢复正常,因为我需要以某种方式处理这些文件。有没有什么想法可以开始?

相关内容