My bad, you're right. This was an old script which obviously didn't work
on .mp4/.mov files because of exiftools limitations. After that I wrote
another one that works fine. Here it is:
https://gist.github.com/Schnouki/5028480

It's basically a .mov/.mp4 parser in pure Python that can change
datetime fields. I never had any trouble with it, but please make sure
to backup your files before using this tool :)

Cheers,
Thomas

Le 24 février 2013 à 14:27 CET, Thomas Novin a écrit :
> http://www.sno.phy.queensu.ca/~phil/exiftool/#supported
>
> It say's MP4 isn't even supported writing to?
>
>
>
> On Sun, Feb 24, 2013 at 2:14 PM, Thomas Novin <[email protected]> wrote:
>
>> That looks like exactly what I want, thanks!
>>
>> However, testing it, it doesn't seem to work?
>>
>> $ exifdate.py -s 2010-04-02_10:00:46 20100402100046.mp4
>> $ exiftool 20100402100046.mp4 | grep -i date
>> File Modification Date/Time     : 2013:02:24 14:10:13+01:00
>> Create Date                     : 1904:01:01 00:00:00
>> Modify Date                     : 1904:01:01 00:00:00
>> Track Create Date               : 1904:01:01 00:00:00
>> Track Modify Date               : 1904:01:01 00:00:00
>> Media Create Date               : 1904:01:01 00:00:00
>> Media Modify Date               : 1904:01:01 00:00:00
>>
>> Rgds//Thomas
>>
>> On Sun, Feb 24, 2013 at 10:45 AM, Thomas Jost <[email protected]>wrote:
>>
>>> You can use exiftool, with something similar to this:
>>>
>>>     exiftool -p -CreateDate="%Y:%m:%d %H:%M:%S" file.mp4
>>>
>>> Here's a little Python3 script I wrote about a year ago to do it with all
>>> the relevant MP4 tags: http://pastebin.com/HTQZMqKX
>>>
>>> Cheers,
>>> Thomas
>>>
>>> Le 24/02/2013 10:36, Thomas Novin a écrit :
>>>
>>>> Hello
>>>>
>>>> I'm converting some old recordings from a DVR we had from .MTS to .MP4.
>>>> After this, I will import them to shotwell. But I can't get shotwell to
>>>> automatically detect the date.
>>>>
>>>> How can this be done? The old .MTS-filename includes the date. But I
>>>> can't
>>>> find any way to write it with avconv. Neither can shotwell use the file
>>>> dates, right?
>>>>
>>>> Tried writing date as metadata with avconv but it doesn't help/doesn't
>>>> work.
>>>>
>>>> for i in `find . -iname *.mts`; do
>>>>
>>>> FN=`echo $i | awk -F\. '{print $2}'`
>>>> DATE=`echo $FN | awk -F'/' '{print $2}' | sed 's/\///'`
>>>>
>>>> /usr/bin/avconv -y -i "$i" -crf 25.0 -vcodec libx264 -acodec libvo_aacenc
>>>> -ar 48000 -ab 160k -coder 1 -flags +loop -cmp +chroma -partitions
>>>> +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250
>>>> -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6
>>>> -qmin 0 -qmax 69 -qdiff 4 -bf 3 -refs 8 -directpred 3 -trellis 2 -flags2
>>>> +bpyramid+mixed_refs+wpred+**dct8x8+fastpskip -wpredp 2 -rc_lookahead 60
>>>> -threads 0 -metadata date=2012-"$DATE" ."$FN".mp4
>>>>
>>>> Suggestions are welcome..
>>>>
>>>> Rgds//Thomas
>>>> ______________________________**_________________
>>>> Shotwell mailing list
>>>> [email protected]
>>>> http://lists.yorba.org/cgi-**bin/mailman/listinfo/shotwell<http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell>
>>>>
>>>
>>> --
>>> Thomas/Schnouki
>>> ______________________________**_________________
>>> Shotwell mailing list
>>> [email protected]
>>> http://lists.yorba.org/cgi-**bin/mailman/listinfo/shotwell<http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell>
>>>
>>
>>

-- 
Thomas/Schnouki
_______________________________________________
Shotwell mailing list
[email protected]
http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell

Reply via email to