2

Back in 14.04 I was able to watch and edit .MTS files without any sort of issue.

Some months ago I updated the system to 15.04, and it didn't happen to me to work on MTS files ever since. Now I'm back to work on them, and I'm seeing isseus that I never had before.

First of all, all the thumbnails of the MTS files that I moved to my computer yesterday appear green and screwed up. Also, this happens with many of the MTS files with which I worked months ago, and with which I never had troubles.

green thumbnails around

Second, Totem is able to read them perfectly, so I can watch them normally. VLC is not; as you can see in the following screenshot, the image isn't smooth but is full of lines and imperfections.

VLC issues

The real issue comes out when it comes to editing. Kdenlive will add the videos to the project, but won't be able to work with them. If I try to watch them through the project monitor they don't work. If I put them on the timeline, cut them, and render them, this is what I get:

screwed up mp4

The audio dies after the first half-second of video, while the image you see above vibrates, but does not change, from the beginning to the end of the video.

Curiously, if I recover old projects and just export them, the final video file is watchable, even though it isn't "smooth"; it's like it has a low framerate. And this goes on both on Totem and on VLC.

I checked the information about some of these MTS files, and they basically all are the same, and that's normal since they were all recorded with cameras of the same kind. This is the output of 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

This is the ExifTooloutput on the same file:

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

I tried to convert and MTS file to a mp4 file through ffmpeg. These are the terminal messages I get:

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

The final file works, but whether I open it with Totem or VLC I see the same lines you can see in the second image.

I'm trying to revert the situation back to normal, since I need to work with these files somehow. Any idea about where to get started?

0

You must log in to answer this question.

Browse other questions tagged .