[FFmpeg-user] MTS to MOV with different audio codec

Mateusz Sołtys bugzolsoto at gmail.com
Thu May 26 14:20:14 CEST 2016


Hi,

I have a problem with converting .mts to .mov with copying video codec.
Recorded video is AVCHD which cannot be open with audio track in Davinci
Resolve, so i tried to converd for .mov and .avi with copying video codec.
Everything looks ok untill i open converted file .avi works with 50i while
.mov cannot play 50i, intead it's just 25p. All i need is .mov format with
same video codec as .mts and 50i becouse avi cannot be open in Resolve

This is metadata from all 3files:

*.MTS:*




















































*Complete name                  :
C:\Users\SotO\Desktop\00003.MTSFormat                         :
BDAVFormat/Info                    : Blu-ray VideoFile
size                      : 19.0 MiBDuration                       : 7s
191msOverall bit rate mode          : VariableOverall bit
rate               : 22.2 MbpsMaximum Overall bit rate       : 24.0
MbpsVideoID                             : 4113 (0x1011)Menu
ID                        : 1 (0x1)Format                         :
AVCFormat/Info                    : Advanced Video CodecFormat
profile                 : High at L4Format settings, CABAC         : YesFormat
settings, ReFrames      : 4 framesFormat settings, GOP           : M=3,
N=12Codec ID                       : 27Duration                       : 7s
120msBit rate mode                  : VariableBit
rate                       : 20.9 MbpsWidth                          : 1
920 pixelsHeight                         : 1 080 pixelsDisplay aspect
ratio           : 16:9Frame rate                     : 25.000 fpsColor
space                    : YUVChroma subsampling             : 4:2:0Bit
depth                      : 8 bitsScan type                      :
InterlacedScan type, store method        : Separated fieldsScan
order                     : Top Field FirstBits/(Pixel*Frame)             :
0.403Stream size                    : 17.8 MiB
(93%)AudioID                             : 4352 (0x1100)Menu
ID                        : 1 (0x1)Format                         :
AC-3Format/Info                    : Audio Coding 3Mode
extension                 : CM (complete main)Format settings,
Endianness    : BigCodec ID                       :
129Duration                       : 7s 232msBit rate mode
: ConstantBit rate                       : 384
KbpsChannel(s)                     : 2 channelsChannel
positions              : Front: L RSampling rate                  : 48.0
KHzFrame rate                     : 31.250 fps (1536 spf)Compression
mode               : LossyDelay relative to video        : -80msStream
size                    : 339 KiB (2%)*

*.AVI:*



















































*Complete name                  :
C:\Users\SotO\Desktop\00003.aviFormat                         :
AVIFormat/Info                    : Audio Video InterleaveFile
size                      : 19.1 MiBDuration                       : 7s
232msOverall bit rate mode          : VariableOverall bit
rate               : 22.2 MbpsWriting application            :
Lavf57.37.100VideoID                             :
0Format                         : AVCFormat/Info                    :
Advanced Video CodecFormat profile                 : High at L4Format
settings, CABAC         : YesFormat settings, ReFrames      : 4
framesFormat settings, GOP           : M=3, N=12Codec
ID                       : H264Duration                       : 7s 200msBit
rate mode                  : VariableBit rate                       : 20.9
MbpsWidth                          : 1 920
pixelsHeight                         : 1 080 pixelsDisplay aspect
ratio           : 16:9Frame rate                     : 100.000 fpsOriginal
frame rate            : 25.000 fpsColor space                    :
YUVChroma subsampling             : 4:2:0Bit depth                      : 8
bitsScan type                      : ProgressiveOriginal scan
type             : InterlacedScan type, store method        : Separated
fieldsOriginal scan order            : Top Field
FirstBits/(Pixel*Frame)             : 0.101Stream size                    :
17.8 MiB (93%)AudioID                             :
1Format                         : PCMFormat settings, Endianness    :
LittleFormat settings, Sign          : SignedCodec ID
: 1Duration                       : 7s 232msBit rate mode
: ConstantBit rate                       : 1 536
KbpsChannel(s)                     : 2 channelsSampling
rate                  : 48.0 KHzBit depth                      : 16
bitsStream size                    : 1.32 MiB
(7%)Alignment                      : Aligned on interleavesInterleave,
duration           : 32 ms (3.19 video frames)*
*.MOV:*





















































*Complete name                  :
C:\Users\SotO\Desktop\00003.movFormat                         :
MPEG-4Format profile                 : QuickTimeCodec
ID                       : qt   0000.02 (qt  )File
size                      : 19.1 MiBDuration                       : 7s
232msOverall bit rate mode          : VariableOverall bit
rate               : 22.2 MbpsWriting application            :
Lavf57.37.100VideoID                             :
1Format                         : AVCFormat/Info                    :
Advanced Video CodecFormat profile                 : High at L4Format
settings, CABAC         : YesFormat settings, ReFrames      : 4
framesFormat settings, GOP           : M=3, N=12Codec
ID                       : avc1Codec ID/Info                  : Advanced
Video CodingDuration                       : 7s 200msBit rate
mode                  : VariableBit rate                       : 20.9
MbpsWidth                          : 1 920
pixelsHeight                         : 1 080 pixelsDisplay aspect
ratio           : 16:9Frame rate mode                : ConstantFrame
rate                     : 50.000 fpsOriginal frame rate            :
25.000 fpsColor space                    : YUVChroma
subsampling             : 4:2:0Bit depth                      : 8 bitsScan
type                      : InterlacedScan type, store method        :
Separated fieldsScan order                     : Top Field
FirstBits/(Pixel*Frame)             : 0.202Stream size                    :
17.8 MiB (93%)Language                       :
EnglishAudioID                             :
2Format                         : PCMFormat settings, Endianness    :
LittleFormat settings, Sign          : SignedCodec ID
: sowtDuration                       : 7s 232msBit rate
mode                  : ConstantBit rate                       : 1 536
KbpsChannel(s)                     : 2 channelsChannel
positions              : Front: L RSampling rate                  : 48.0
KHzBit depth                      : 16 bitsStream size                    :
1.32 MiB (7%)*


This is log from cmd:
*Converting to .MOV*
C:\Users\SotO\Desktop>ffmpeg -i 00003.mts -vcodec copy -acodec pcm_s16le
-ar 480
00 -ac 2 00003.mov
ffmpeg version N-80085-g9591ca7 Copyright (c) 2000-2016 the FFmpeg
developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b
--en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame
--enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr
--enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 43.100 / 57. 43.100
  libavformat    57. 37.100 / 57. 37.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.100 /  6. 46.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from '00003.mts':
  Duration: 00:00:07.23, start: 0.374967, bitrate: 22068 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
1920x1
080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp,
 384 kb/s
File '00003.mov' already exists. Overwrite ? [y/N] y
[mov @ 0000000003d882a0] Using AVStream.codec to pass codec parameters to
muxers
 is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, mov, to '00003.mov':
  Metadata:
    encoder         : Lavf57.37.100
    Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR
1:1 DA
R 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn
    Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo,
s16, 15
36 kb/s
    Metadata:
      encoder         : Lavc57.43.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[mov @ 0000000003d882a0] 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
timesta
mps properly
[mov @ 0000000003d882a0] pts has no value
    Last message repeated 179 times
frame=  360 fps=0.0 q=-1.0 Lsize=   19582kB time=00:00:07.23
bitrate=22181.2kbit
s/s speed=33.6x
video:18221kB audio:1356kB subtitle:0kB other streams:0kB global
headers:0kB mux
ing overhead: 0.025740%


*Converting to .AVI*
C:\Users\SotO\Desktop>ffmpeg -i 00003.mts -vcodec copy -acodec pcm_s16le
-ar 480
00 -ac 2 00003.avi
ffmpeg version N-80085-g9591ca7 Copyright (c) 2000-2016 the FFmpeg
developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-nv
enc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enabl
e-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b
--en
able-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libil
bc --enable-libmodplug --enable-libmfx --enable-libmp3lame
--enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-
librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr
--enable-li
bspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo
-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libweb
p --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-l
ibzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 43.100 / 57. 43.100
  libavformat    57. 37.100 / 57. 37.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.100 /  6. 46.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from '00003.mts':
  Duration: 00:00:07.23, start: 0.374967, bitrate: 22068 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
1920x1
080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp,
 384 kb/s
[avi @ 0000000003c682a0] Using AVStream.codec to pass codec parameters to
muxers
 is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to '00003.avi':
  Metadata:
    ISFT            : Lavf57.37.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR
1:1 DA
R 16:9], q=2-31, 25 fps, 25 tbr, 100 tbn
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16
, 1536 kb/s
    Metadata:
      encoder         : Lavc57.43.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[avi @ 0000000003c682a0] 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
timesta
mps properly
frame=  360 fps=0.0 q=-1.0 Lsize=   19607kB time=00:00:07.23
bitrate=22210.0kbit
s/s speed= 163x
video:18221kB audio:1356kB subtitle:0kB other streams:0kB global
headers:0kB mux
ing overhead: 0.155772%


More information about the ffmpeg-user mailing list