View Full Version : Converting MTS to MOV looseless and adding create date info
alvgarci
17th December 2010, 14:06
Hi all:
I'm looking for the way to looseless convert .MTS files to MOV. It works fine, but I can't put the source date creating of the MTS to MOV.
-timestamp option seems not working.
Any help?
Thanks
BTW: I'm doing it because is the best way to manage MTS files with Lightroom without loosing quality. I've tried Jeffrey's plug-inn, but it's so limitated. Converting it to MOV leaves Lightroom manipulate it much better.
ffmpeg -i 00064.MTS -vcodec copy -ab 128000 -f mov myfile.mov -timestamp '19740331 13:00:00'
alvgarci
22nd December 2010, 08:04
Should me for me also ok use mp4 (Lightroom manages it ok). There is a lot of tools that can edit mp4 format. Is it a solution for it? Any pros/cons on using mov instead of mp4?
Thanks
alvgarci
29th December 2010, 22:44
This is the process:
Goal I have a 00064.MTS file to convert without recompress video and compressing the audio into a mov container: also required > tag correctly the source creation date info
1) this is the exiftool 00064.MTS output
ExifTool Version Number : 8.40
File Name : 00064.MTS
Directory : .
File Size : 37 MB
File Modification Date/Time : 2010:10:28 21:25:07+02:00
File Permissions : rwxrwxrwx
File Type : M2TS
MIME Type : video/m2ts
Video Stream Type : H.264 Video
Audio Stream Type : A52/AC-3 Audio
Audio Bitrate : 448000
Surround Mode : Not indicated
Audio Channels : 3/2
Image Width : 1440
Image Height : 1080
Date/Time Original : 2008:07:13 03:47:28+02:00
Aperture Setting : Auto
Gain : 0 dB
Exposure Program : Program AE
White Balance : Auto
Focus : Auto (2.5)
Image Stabilization : On
F Number : 4
Make : Sony
Audio Sample Rate : 48000
Aperture : 4.0
Image Size : 1440x1080
2) Let's do the conversion:
ffmpeg -i 00064.MTS -vcodec copy -ab 128000 -metadata "Create Date=2008:07:13 03:47:28" -f mov myfile.mov
Here is the output
FFmpeg version SVN-r25922, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 9 2010 08:38:58 with gcc 4.2.1 (Apple Inc. build 5664)
configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64
libavutil 50.34. 0 / 50.34. 0
libavcore 0.15. 0 / 0.15. 0
libavcodec 52.99. 0 / 52.99. 0
libavformat 52.88. 0 / 52.88. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.68. 0 / 1.68. 0
libswscale 0.12. 0 / 0.12. 0
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 59.94 (60000/1001)
Input #0, mpegts, from '00064.MTS':
Duration: 00:00:35.04, start: 1.000033, bitrate: 8909 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.2[0x1200]: Subtitle: pgssub
Output #0, mov, to 'myfile.mov':
Metadata:
Create Date : 2008:07:13 03:47:28
encoder : Lavf52.88.0
Stream #0.0: Video: avc1 / 0x31637661, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], q=2-31, 30k tbn, 29.97 tbc
Stream #0.1: Audio: aac, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 2100 fps=530 q=-1.0 Lsize= 34473kB time=35.05 bitrate=8056.9kbits/s
video:33702kB audio:715kB global headers:0kB muxing overhead 0.159716%
3) Conversion is OK
4) Now check the Metadata of the new mov file.
This is the output:
ExifTool Version Number : 8.40
File Name : myfile.mov
Directory : .
File Size : 34 MB
File Modification Date/Time : 2010:12:28 21:08:37+01:00
File Permissions : rw-r--r--
File Type : MOV
MIME Type : video/quicktime
Major Brand : Apple QuickTime (.MOV/QT)
Minor Version : 0.2.0
Compatible Brands : qt
Movie Data Size : 35243853
Movie Header Version : 0
Create Date : 0000:00:00 00:00:00
Modify Date : 0000:00:00 00:00:00
Time Scale : 1000
Duration : 00:35
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 3
Track Header Version : 0
Track Create Date : 0000:00:00 00:00:00
Track Modify Date : 0000:00:00 00:00:00
Track ID : 1
Track Duration : 00:35
Track Layer : 0
Track Volume : 0.00%
Image Width : 1920
Image Height : 1080
Graphics Mode : srcCopy
Op Color : 0 0 0
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 0000:00:00 00:00:00
Media Modify Date : 0000:00:00 00:00:00
Media Time Scale : 48000
Media Duration : 00:35
Balance : 0
Handler Class : Data Handler
Handler Type : URL
Handler Description : DataHandler
Other Format : mp4a
Software Version : Lavf52.88.0
Avg Bitrate : 8044017
Image Size : 1920x1080
Rotation : 0
As you can see all create date is 0 (null). I've tried many formats and Tags.. none works.
Questions:
1) How to do it?
2) What is the metadata flag that usually video editing program uses to catalog the media?
Thanks
Alvaro
Blue_MiSfit
30th December 2010, 04:57
You might try using QuickTime Pro to update the metadata.
Sorry I can't be more helpful :(
Derek
cacepi
30th December 2010, 21:42
ffmpeg -i 00064.MTS -vcodec copy -ab 128000 -f mov myfile.mov -timestamp '19740331 13:00:00'
-timestamp needs to be before you write out:
ffmpeg -i file.m4v -acodec copy -vcodec copy -timestamp '1974-03-31 13:00:00' -f mov test.mov
Result:
$ exiftool test.mov
ExifTool Version Number : 8.43
File Name : test.mov
Directory : .
File Size : 742 MB
File Modification Date/Time : 2010:12:30 15:42:22-05:00
File Permissions : rw-r--r--
File Type : MOV
MIME Type : video/quicktime
Major Brand : Apple QuickTime (.MOV/QT)
Minor Version : 0.2.0
Compatible Brands : qt
Movie Data Size : 776728777
Movie Header Version : 0
Create Date : 1974:03:31 13:00:00
Modify Date : 1974:03:31 13:00:00
Time Scale : 1000
Duration : 0:28:31
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 4
Track Header Version : 0
Track Create Date : 1974:03:31 13:00:00
Track Modify Date : 1974:03:31 13:00:00
Track ID : 1
Track Duration : 0:28:31
Track Layer : 0
Track Volume : 0.00%
Image Width : 640
Image Height : 480
Graphics Mode : srcCopy
Op Color : 0 0 0
Chapter List : 3
Media Language Code : ja
Balance : 0
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 1974:03:31 13:00:00
Media Modify Date : 1974:03:31 13:00:00
Media Time Scale : 1000
Media Duration : 0:28:31
Gen Media Version : 0
Gen Flags : 0 0 0
Gen Graphics Mode : ditherCopy
Gen Op Color : 32768 32768 32768
Gen Balance : 0
Handler Class : Data Handler
Handler Type : URL
Handler Description : DataHandler
Other Format : text
Software Version : Lavf52.73.0
Avg Bitrate : 3630189
Image Size : 640x480
Rotation : 0
alvgarci
14th January 2011, 07:22
Did anyone played with avisynth?... sure it works fine.. but never used before.
alvgarci
14th January 2011, 23:33
cacepi: THANKS!!!!! yes.. you're full right. I works great now.. really good news (I spent a lot of time in google looking for the solution
I've test it:
ffmpeg -i 00064.MTS -vcodec copy -ab 128000 -timestamp '1974-03-31 13:00:00' -f mp4 test.mp4
And here is the result:
ExifTool Version Number : 8.40
File Name : test.mp4
Directory : .
File Size : 34 MB
File Modification Date/Time : 2011:01:14 23:29:45+01:00
File Permissions : rw-r--r--
File Type : MP4
MIME Type : video/mp4
Major Brand : MP4 Base Media v1 [IS0 14496-12:2003]
Minor Version : 0.2.0
Compatible Brands : isom, iso2, avc1, mp41
Movie Data Size : 35243855
Movie Header Version : 0
Create Date : 1974:03:31 12:00:00
Modify Date : 1974:03:31 12:00:00
Time Scale : 1000
Duration : 00:35
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 3
Track Header Version : 0
Track Create Date : 1974:03:31 12:00:00
Track Modify Date : 1974:03:31 12:00:00
Track ID : 1
Track Duration : 00:35
Track Layer : 0
Track Volume : 0.00%
Image Width : 1920
Image Height : 1080
Graphics Mode : srcCopy
Op Color : 0 0 0
Compressor ID : avc1
Source Image Width : 1440
Source Image Height : 1080
X Resolution : 72
Y Resolution : 72
Bit Depth : 24
Video Frame Rate : 59.94
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 1974:03:31 12:00:00
Media Modify Date : 1974:03:31 12:00:00
Media Time Scale : 48000
Media Duration : 00:35
Media Language Code : und
Handler Description : SoundHandler
Balance : 0
Audio Format : mp4a
Audio Channels : 2
Audio Bits Per Sample : 16
Audio Sample Rate : 48000
Handler Type : Metadata
Handler Vendor ID : Apple
Encoder : Lavf52.88.0
Avg Bitrate : 8044017
Image Size : 1920x1080
Rotation : 0
Thanks
alvgarci
14th January 2011, 23:58
BTW: I'm looking also for copy all old metadata on the new container.. but it was unsuccessful...
Is possible put as much metadata as I want on a MP4 container?.. also which is the correct syntax for it:
ffmpeg -i 00817.MTS -vcodec copy -ab 128000 -metadata Test="yes" -timestamp '1974-03-31 13:00:00' -f mp4 test.mp4
but didn't work.
Thanks
alvgarci
20th April 2011, 23:37
Well:
doing this:
ffmpeg -i 00064.MTS -vcodec copy -ab 128000 -timestamp '1974-03-31 13:00:00' -f mp4 test.mp4
Works fine:
exiftool 00064.MTS
ExifTool Version Number : 8.40
File Name : 00064.MTS
Directory : .
File Size : 37 MB
File Modification Date/Time : 2010:10:28 21:25:07+02:00
File Permissions : rwxrwxrwx
File Type : M2TS
MIME Type : video/m2ts
Video Stream Type : H.264 Video
Audio Stream Type : A52/AC-3 Audio
Audio Bitrate : 448000
Surround Mode : Not indicated
Audio Channels : 3/2
Image Width : 1440
Image Height : 1080
Date/Time Original : 2008:07:13 03:47:28+02:00
Aperture Setting : Auto
Gain : 0 dB
Exposure Program : Program AE
White Balance : Auto
Focus : Auto (2.5)
Image Stabilization : On
F Number : 4
Make : Sony
Audio Sample Rate : 48000
Aperture : 4.0
Image Size : 1440x1080
and
exiftool test.mov
ExifTool Version Number : 8.40
File Name : test.mp4
Directory : .
File Size : 34 MB
File Modification Date/Time : 2011:04:21 00:38:12+02:00
File Permissions : rw-r--r--
File Type : MP4
MIME Type : video/mp4
Major Brand : MP4 Base Media v1 [IS0 14496-12:2003]
Minor Version : 0.2.0
Compatible Brands : isom, iso2, avc1, mp41
Movie Data Size : 35243853
Movie Header Version : 0
Create Date : 1974:03:31 12:00:00
Modify Date : 1974:03:31 12:00:00
Time Scale : 1000
Duration : 00:35
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 3
Track Header Version : 0
Track Create Date : 1974:03:31 12:00:00
Track Modify Date : 1974:03:31 12:00:00
Track ID : 1
Track Duration : 00:35
Track Layer : 0
Track Volume : 0.00%
Image Width : 1920
Image Height : 1080
Graphics Mode : srcCopy
Op Color : 0 0 0
Compressor ID : avc1
Source Image Width : 1440
Source Image Height : 1080
X Resolution : 72
Y Resolution : 72
Bit Depth : 24
Video Frame Rate : 59.94
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 1974:03:31 12:00:00
Media Modify Date : 1974:03:31 12:00:00
Media Time Scale : 48000
Media Duration : 00:35
Media Language Code : und
Handler Description : SoundHandler
Balance : 0
Audio Format : mp4a
Audio Channels : 2
Audio Bits Per Sample : 16
Audio Sample Rate : 48000
Handler Type : Metadata
Handler Vendor ID : Apple
Encoder : Lavf52.88.0
Avg Bitrate : 8044017
Image Size : 1920x1080
Rotation : 0
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.