VideoHelp Forum
+ Reply to Thread
Page 1 of 5
1 2 3 ... LastLast
Results 1 to 30 of 127
Thread
  1. Is there any simple free tool out there that takes an AVCHD stream (.m2ts etc) and yields a text-based subtitle file (.srt etc) with the frame specific metadata as content? My Sony camera generates this metadata (time, date, shutter info, geo info) and stores it for each frame (perhaps group of frames) and DVMP seems to be the only tool that can read it. But DVMP is not free.
    Quote Quote  
  2. If someone knows a related forum to post this question in please advise as well...!
    Quote Quote  
  3. Bumping this thread because I have the same request and it is more than 7 months later.

    DVMP appears to do this, but this feature is disabled in the demo version, and $70 seems a bit steep, anyway.

    multiAVCHD has potential, but needs some work in this area, especially for geotagging.

    My ambition is to extract the date/time and geotagging data, to place in a subtitle track of my edited home videos on a Bluray disk or DVD.
    Quote Quote  
  4. I recently came across http://hirntier.blogspot.com/2010/02/avchd-timecode-update.html
    This seems to have potential as well - bgavdump can read the metadata in the stream, it seems straightforward to create the converter we're looking for from that.
    However, to date I've not been able to compile it successfully (on Ubuntu 9.10).
    Any help appreciated.
    Quote Quote  
  5. OK - I finally created a converter using the ffmpeg library. Testing it at the moment. Let me know if anyone is interested.

    So, in goes an m2ts file (from a Sony camcorder for instance) and out comes the corresponding subtitle srt file with date, time and geo information. My mediaplayer plays them nicely together.

    Does someone have a little program/script that takes latitude/longitude info and converts it to place/state/country?
    Quote Quote  
  6. HD65, thanks for taking up the challenge. I am interested (see my earlier post) and willing to beta test. I have a Sony HD camcorder which produces mts/m2ts files containing date, time, geotagging and camera settings metadata. Ideally, I would like to create .sub files to use with Sony Vegas and DVD Architect.
    Quote Quote  
  7. Not sure how many people read this thread but the "avchd2srt" program seems OK sofar, so looking for a few more testers.

    From Sony HD files it will extract time, date and geo info and translate it to a corresponding SRT file. It also translates the position info to an address. Note that this is not taken from MODD or MOFF files, but from meta-data in the video stream.

    Would be interested to hear about some more experience with it, in particular on non-Sony AVCHD files.

    See http://www.mediafire.com/?7i6y9f9037vj1c4

    It runs on Ubuntu (10.10), also under Windows via vmplayer.
    Quote Quote  
  8. Very interesting. Sorry for being a noob, but is there any way in running this under Windows?
    (I do not have linux and I'm not familiar with that OS).
    Quote Quote  
  9. Member
    Join Date
    Mar 2004
    Location
    Texas, USA
    Search Comp PM
    HD65, I've got a Canon AVCHD camcorder, and a Fedora system. I'll give it a shot.
    Quote Quote  
  10. Originally Posted by Xymox View Post
    Very interesting. Sorry for being a noob, but is there any way in running this under Windows?
    (I do not have linux and I'm not familiar with that OS).
    Xymox,

    The distribution comes with the source and explanations on how it compiles. If you manage to compile the ffmpeg package under windows, then adding this one should be a breeze.

    You may find that running Ubuntu via VMPlayer under windows is a lot less difficult than you thought. It's all free software, and will open a new world for you! No partitioning or whatever needed, actually quite straightforward.

    -HD65
    Quote Quote  
  11. Originally Posted by Steve Stepoway View Post
    HD65, I've got a Canon AVCHD camcorder, and a Fedora system. I'll give it a shot.
    I managed to find a Panasonic clip, but it did not work. Apparently, Panasonic puts the metadata somewhere else in the stream (compared to Sony). I need to find that. Sony puts it in the first packet of the key frames - this is where I'm currently looking for it. If it's somewhere else, it won't be found yet.

    Be interesting to see how it works for Canon. If it does not, please make a short clip available and I can start looking.
    Quote Quote  
  12. Originally Posted by HD65 View Post
    Originally Posted by Steve Stepoway View Post
    HD65, I've got a Canon AVCHD camcorder, and a Fedora system. I'll give it a shot.
    I managed to find a Panasonic clip, but it did not work. Apparently, Panasonic puts the metadata somewhere else in the stream (compared to Sony). I need to find that. Sony puts it in the first packet of the key frames - this is where I'm currently looking for it. If it's somewhere else, it won't be found yet.

    Be interesting to see how it works for Canon. If it does not, please make a short clip available and I can start looking.
    Well, Panasonic seems to put the metadata in every frame except key frames! That generates a lot more data - need to think about how to deal with that.

    Does anyone have a Panasonic avchd clip available with geotagged information? My test clip just has date/time.
    Quote Quote  
  13. I've created version 0.2. Creates better SRT, handles spaces in filenames and deals with panasonic video (next to sony).

    http://www.mediafire.com/?4g8ow5alxuzcmg4

    Still looking for some Canon files, so it can be tested better.
    Quote Quote  
  14. Version 0.3 also handles Canon (from testing a few samples found on internet). Also changed the SRT file to UTF-8, so it works pretty good with e.g. Corel VideoStudio ProX3.

    http://www.mediafire.com/?3lx5d7tx9f4qv5g
    Quote Quote  
  15. Originally Posted by HD65 View Post
    Originally Posted by Xymox View Post
    Very interesting. Sorry for being a noob, but is there any way in running this under Windows?
    (I do not have linux and I'm not familiar with that OS).
    Xymox,

    The distribution comes with the source and explanations on how it compiles. If you manage to compile the ffmpeg package under windows, then adding this one should be a breeze.

    You may find that running Ubuntu via VMPlayer under windows is a lot less difficult than you thought. It's all free software, and will open a new world for you! No partitioning or whatever needed, actually quite straightforward.

    -HD65
    I installed MinGW/MSYS and the program compiled with minimal trouble. So here it is for Windows: http://www.mediafire.com/?f2wpl8frcfhj4na. But note: this is the core program only. It just takes one input file, and sends SRT to output and other info to stderr. It does not translate position to address.

    So for correct use, open a CMD window and type "avchd2srt-core YOURFILE.MTS > YOURFILE.srt 2> YOURFILE.INF".

    Let me know what you think...
    Quote Quote  
  16. Sorry it took a while for me to respond.

    WOW !

    This is surely great !

    It works like a charm here.

    Sample screenshot showing it


    Here the srt and inf file contents



    So I'm very happy and pleased to finally see a way to get the datecodes from AVCHD files.

    What I do not understand is why there are no tools like this. Al least they are hard to find.
    When looking at the DV format, there are numerous (free) tools to extract the info and save it as sub/srt.
    Why are there not more such tools for the AVCHD format ?

    First for your info, I'm using a Panasonic HDC-HS60 camcorder.

    So, what are your plans with this tool? Are you enhancing it further?

    For the DV format I use DVSubmaker :
    http://www.video2dv.com/index.php?lang=en&page=dvsm

    This tool offers a template system, where you can use tags to indicate how the datecode is presented.
    For instance, here a screenshot showing this on one of my video's:



    The language of the days and month can be adjusted. Also the rate of datecode display (second, minutes etc).

    I could write a wrapper around your tool to convert the generated srt into needed formats.
    I do not know if your sourcecode is public so I can tweak it to get the needed results.

    But this is already very cool !
    Quote Quote  
  17. Originally Posted by Xymox View Post
    Sorry it took a while for me to respond.

    WOW !

    This is surely great !

    It works like a charm here.

    .... !
    I also don't understand why there are no other free tools. Searched for a year - in vain. I'm sure they will come soon.

    I don't intend to develop it much further. I'm tuning it a little, essentially for it to behave a bit better on windows. The linux version works fine already, I'm especially pleased with the translation of GPS position info to an actual address on linux.

    The source code is in the linux distribution, not the windows distribution. Wait for version 0.4 before your tweak it - that's the one which compiles flawlessly under windows/mingw as well.
    Last edited by HD65; 17th Jan 2011 at 01:57.
    Quote Quote  
  18. To elaborate some more on the tweaked output of avchd2srt.
    I was thinking of creating the output exact like the intermediate file of DVSubMaker.

    It extracts the DV avi and saves a .dvdt file which has this format:

    Code:
    00000001 07 04 08 12 09 30
    00000019 07 04 08 12 09 31
    00000044 07 04 08 12 09 32
    00000069 07 04 08 12 09 33
    00000094 07 04 08 12 09 34
    00000119 07 04 08 12 09 35
    00000144 07 04 08 12 09 36
    00000169 07 04 08 12 09 37
    00000194 07 04 08 12 09 38
    00000219 07 04 08 12 09 39
    00000244 07 04 08 12 09 40
    00000269 07 04 08 12 09 41
    00000294 07 04 08 12 09 42
    00000319 07 04 08 12 09 43
    00000344 07 04 08 12 09 44
    00000369 07 04 08 12 09 45
    frame yy mm dd hh mm ss

    When avchd2srt creates such a formatted file, it can be read by DVSubMaker and creates a .sub file from it.
    This .sub file can be formatted using the build in options of DVSubmaker.
    Quote Quote  
  19. I tried the windows version,

    nice work , and thanks HD65
    Quote Quote  
  20. I posted V04 here: http://www.mediafire.com/?q0j3h61u4jwrt3s. This one compiles under Linux as well as Windows/MinGW, has a few new features and bug fixes.

    The package contains the source, both the linux and windows executables and the Readme.

    Here is a picture showing the features:


    From the Readme:

    AVCHD2SRT for Windows and Linux

    FFMPEG-based program to extract the time/date/GPS/speed information from a h264 video stream and make this available in a subtitle file of the SRT format.

    On the linux version, using googleapi, the location information is translated to an address (street/place/state/country) where possible and added. An internet connection and the packages "lynx" and "awk" are required for this to work.

    Tested on Ubuntu 10.10 and Windows 7 – older/other versions may work as well.
    Last edited by HD65; 31st Jan 2011 at 16:17.
    Quote Quote  
  21. Version 0.5: following healthy challenge from Xymox the core is now 20 times faster. Other than that no change.

    Linux version: http://www.mediafire.com/?fjt9kvasvvj723f
    Windows version: http://www.mediafire.com/?6h2tgroslodbk3r

    Packages include readme file, source and executable.
    Quote Quote  
  22. Member
    Join Date
    Feb 2011
    Location
    Los Angles
    Search PM
    I'm new here, and after getting a new camera that records in AVCHD, I have spent the last week trying to find a way to get the time/date metadata into subtitles. I usually use Corel Moviefactory which does this automatically for DV files.

    Anyway I ran into this thread after much googling, and sure enough this tool works. Thank you!

    Except for one thing. The srt file that it creates generates subtitles that are exactly 2 fold to long for my video clip. For instance, if my video clip is 00:01:28 in length, the tool generates subtitles that go up to 00:02:56. Its funny because the text of the title counts up in one second intervals, but the subtitle duration is set for 2 second intervals, when it should only be one. So the subtitles don't sync match the video clip when played together.

    Further inspection tells me that this only happens to files that have been "concatenated" into a m2ts file by the crappy imagemixer software that came with my camera. Srt files generated from the original clips are ok. The output of the avchd2srt tool tells me that the problematic input file has a frame rate of 29.97 but that the working file has a framerate of 59.96.

    Any ideas will be helpful. Thanks so much for this nice little tool.
    Quote Quote  
  23. Originally Posted by caen44 View Post
    I'm new here, and after getting a new camera that records in AVCHD, I have spent the last week trying to find a way to get the time/date metadata into subtitles. I usually use Corel Moviefactory which does this automatically for DV files.

    Anyway I ran into this thread after much googling, and sure enough this tool works. Thank you!

    Except for one thing. The srt file that it creates generates subtitles that are exactly 2 fold to long for my video clip. For instance, if my video clip is 00:01:28 in length, the tool generates subtitles that go up to 00:02:56. Its funny because the text of the title counts up in one second intervals, but the subtitle duration is set for 2 second intervals, when it should only be one. So the subtitles don't sync match the video clip when played together.

    Further inspection tells me that this only happens to files that have been "concatenated" into a m2ts file by the crappy imagemixer software that came with my camera. Srt files generated from the original clips are ok. The output of the avchd2srt tool tells me that the problematic input file has a frame rate of 29.97 but that the working file has a framerate of 59.96.

    Any ideas will be helpful. Thanks so much for this nice little tool.
    Couple of things to try I think:
    • Use version 0.4 of avchd2srt. It's a lot slower, but uses a different setting to determine frame rate.
    • Use a different tool to concatenate your video segments
    • Use subtitleworkshop or something to change the frame rate of the srt file

    I'd be curious to hear whether that helps. If bullet 1 solves your trouble I may need to post an update....
    Quote Quote  
  24. Member
    Join Date
    Feb 2011
    Location
    Los Angles
    Search PM
    Hi,

    Thanks for the advice.

    What definitely works if if I use tsmuxer for joining the avchd files. If I do that, then your tool works perfectly. It's a little more work than using the combining feature of the Imagemixer software that came with my camera, but it works. If I get time, I might write a small program to dig through my video files and build the tsmuxer command so that I dont need to click a hundred times on the tsmuxer gui.

    I'll also try the version 4 of your tool and let you know if that works better on the crippled files that ImageMixer makes, and let you know if that helps.

    On a completely different topic, do you know if it is possible to use the FFMPEG dlls from the visual studio express environment? I pulled your c code into there, but can't compile from within visual studio. I guess I need some sort of mingw or something (http://www.ffmpeg.arrozcru.com/wiki/index.php?title=Building_64-bit_static_libraries). Unfortunately, this has passed the limit of what I can figure out myself...
    Quote Quote  
  25. Member
    Join Date
    Feb 2011
    Location
    Los Angles
    Search PM
    Hi Again,

    I just checked, and yes indeed, your version 4 of the avchd2srt tool processes the files combined with ImageMixer correctly and I get the correct timing on the subtitle file.

    And you are right, it is indeed a lot slower. But since I don't actually need to be clicking on things while it is working, that gives me time to play computer games. So I'll consider it a feature.

    Thanks again. This is awesome.
    Quote Quote  
  26. Originally Posted by caen44 View Post
    ...I just checked, and yes indeed, your version 4 of the avchd2srt tool processes the files combined with ImageMixer correctly and I get the correct timing on the subtitle file.
    ...
    I'll post version 0.6: fast, but using the 0.4-way of determining frame rate.
    Quote Quote  
  27. Member
    Join Date
    Feb 2011
    Location
    Los Angles
    Search PM
    Thanks so much.

    I think I can see where you changed the code to use a different way of determining the frame rate, the other method being commented out but still visible in the source.

    I also think I am 80% of the way to compiling your code under visual studio. In case you are interested I found this link:

    http://ffmpeg.arrozcru.org/builds/

    The SDK shared library seems to have all the headers needed to compile under visual studio. Your source compiles to object code, but the linking fails. If this works then I don't have to figure out mingw, and I won't need to bug you to customize it to my needs.

    On the other hand the odds of me actually getting it to compile are low, so I really appreciate you posting the 0.6 version.

    Thanks so much.
    Quote Quote  
  28. Following the discussion with caen44: V06beta for windows only: http://www.mediafire.com/?x1a0imniasgdrgp.

    Am working on the script for windows to translate gps to location info. That'll hopefully be the full v06.
    Quote Quote  
  29. CAEN44:

    Could you make some test video files available: the ones from the camera and the combined one using Imagemuxer?

    Reason I ask is that I have trouble finding the most robust way to extract the fps. Using the old method (which seems to work better for you) fails on my tests for Panasonic video fragments.
    Quote Quote  
  30. Member
    Join Date
    Feb 2011
    Location
    Los Angles
    Search PM
    Sure,

    I am away from my main computer for the weekend (skiing, yahoo), but will be able to get you some when I get back home on Tuesday. I'll put them somewhere on the internet and send you a message with the link.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!