VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 23 of 23
Thread
  1. Hey all, I have a Sony CX-405 camcorder capable of recording XAVC S video.

    I'm looking for a program that will convert XAVC S metadata (time/date) into subtitles (srt), like avchd2srt does for AVCHD ( http://avchd2srt.webs.com/ ). If I try the above program on my XAVC-S-files (mp4), all it gives me is an empty srt file.

    Hopefully someone out there knows of a solution! Thanks for reading.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Sorry can't help much more right now, but I would look into AVC & MP4 (atomic parsley, mp4tools, mp3tag, metaz, metax..) metadata utilities, since Date/Time ought to be encapsulated via one of those standard systems.

    Scott
    Last edited by Cornucopia; 15th May 2015 at 19:23.
    Quote Quote  
  3. + if you post a small sample of such a fine, others could analyze it, be can only through out suggestions for tools to use.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Originally Posted by okv View Post
    I'm looking for a program that will convert XAVC S metadata (time/date) into subtitles (srt)...
    I have not seen such a program, which NonRealTimeMeta track from the container MOV / MP4 / MFX / XAVCS convert to SRT.
    You can only muxer NonRealTime track and a attachment with the data in the XML to MP4 / MKV. The only question is why? Do not open this any program or camera manufacturer does not provide the appropriate software.
    Quote Quote  
  5. Thanks for your tips! I will test the programs you suggest. I want subtitles in the srt format to know when it was shot, and to avoid having to "burn" the time and date into the video itself.

    I've attached a small sample XAVC-S video shot this morning, imported into the computer using PlayMemories Home (free Sony program).

    Additionally, when I looked at the files on the camera via USB there is an XML file for each video clip (in the same folder) that is not imported by PlayMemories Home. It's probably just for internal usage by the camera, but I've uploaded that as well.
    Image Attached Files
    Quote Quote  
  6. The xml file contains only basic information about the camera and the first time inclusion of the camera. Worse, when we stopped record and after some time back record. This does not show time in the XML.
    RTMD you are interested in converting to the SRT.
    Image Attached Files
    Quote Quote  
  7. MP4Box reports:
    Code:
    Root Meta type: "nrtm" - 0 resource item(s)
    Meta has XML resource
    * Movie Info *
            Timescale 50000 - Duration 00:00:04.800
            3 track(s)
            Fragmented File: no
            File Brand XAVC - version 16785407
            Created: GMT Sat May 16 05:52:01 2015
            Modified: GMT Sat May 16 05:52:01 2015
    
    File has no MPEG4 IOD/OD
    
    Track # 1 Info - TrackID 1 - TimeScale 50000 - Media Duration 00:00:04.800
    Track has 1 edit lists: track duration is 00:00:04.800
    Media Info: Language "und (und)" - Type "vide:avc1" - 240 samples
    Visual Track layout: x=0 y=0 width=1920 height=1080
    MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 1920 x 1080
            AVC Info: 1 SPS - 1 PPS - Profile High @ Level 4.2
            NAL Unit length bits: 32
            Pixel Aspect Ratio 1:1 - Indicated track size 1920 x 1080
            Chroma format 1 - Luma bit depth 8 - chroma bit depth 8
            SPS#1 hash: B948CBCAC12161C1030072F32E9B4D9C0A78706B
            PPS#1 hash: DD1EBB92D5B8A427BF3984F18BD9980F4A62372C
    Self-synchronized
            RFC6381 Codec Parameters: avc1.64002a
            Average GOP length: 48 samples
    
    Track # 2 Info - TrackID 2 - TimeScale 48000 - Media Duration 00:00:04.800
    Track has 1 edit lists: track duration is 00:00:04.800
    Media Info: Language "und (und)" - Type "soun:twos" - 230400 samples
    Audio Track - Sample Rate 48000 - 2 channel(s)
            RFC6381 Codec Parameters: twos
            All samples are sync
    
    Track # 3 Info - TrackID 3 - TimeScale 50000 - Media Duration 00:00:04.800
    Track has 1 edit lists: track duration is 00:00:04.800
    Media Info: Language "und (und)" - Type "meta:rtmd" - 240 samples
    Unknown Metadata Stream
            RFC6381 Codec Parameters: rtmd
            All samples are sync
    Code:
    MP4Box -raw 3 "Path to file"
    will extract the stream as Jamaika posted it.
    -> main problem is how to convert the rtmd data to something human readable,...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Nice work. So this means that at least the time and date are stored in the file. The problem is, as you say, how to convert this into something useful.
    Quote Quote  
  9. probably, atm. we only know that an additional stream is present which might contain the data you want.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. This program actually seems to work!

    https://forum.videohelp.com/threads/335788-Time-Date-Subtitle-File-Generator-(-srt)-Testers-Required

    It can also create subtitles for each mp4 file in a folder, very handy.

    I'm not exactly sure how it works, though. It might just take the date the file was created, which is OK, but I need to make it work with merged files. I need to do some testing.
    Quote Quote  
  11. Originally Posted by okv View Post
    This program actually seems to work!
    For me, it's incomplete conwerer. No GPS position. Time should be start about 7:52 and why breaks are every 1s? In record RTMD is more.
    Code:
    1
    00:00:00,000 --> 00:00:00,999
    Saturday, 16 maja 2015 08:28:46
    
    2
    00:00:01,000 --> 00:00:01,999
    Saturday, 16 maja 2015 08:28:47
    
    3
    00:00:02,000 --> 00:00:02,999
    Saturday, 16 maja 2015 08:28:48
    
    4
    00:00:03,000 --> 00:00:03,999
    Saturday, 16 maja 2015 08:28:49
    I found something else in the MAC. I have not tested the program because there is no MAC. I see that supports reading time and GPS position MOV container.
    http://www.divergentmedia.com/editready
    Last edited by Jamaika; 16th May 2015 at 11:31.
    Quote Quote  
  12. Yes, it probably just starts counting the time from the creation date of the video clip. If I merge two different video clips the program doesn't catch that the clips have been shot at different times.

    I've sent a mail to Sony support asking about how to access the metadata. Really strange that there is no established way of extracting date/time from a fairly new video format intended for professional use....

    My camera has no GPS so I'd not be surprised if no such info was available.
    Quote Quote  
  13. Are you able to view the date/time in camera on your model when replaying a clip?

    mp4v2 can extract the 3rd (metadata) stream, but they look like timecodes only, not the date/time/location/gps info of the acquisition

    http://code.google.com/p/mp4v2/

    This is the format of the RTMD stream for those that don't want to DL it


    mp4file C0126.MP4, track 3, samples 240, timescale 50000
    sampleId 1, size 1024 duration 1000 time 0 00:00:00.000 S
    sampleId 2, size 1024 duration 1000 time 1000 00:00:00.020 S
    sampleId 3, size 1024 duration 1000 time 2000 00:00:00.040 S
    sampleId 4, size 1024 duration 1000 time 3000 00:00:00.060 S
    sampleId 5, size 1024 duration 1000 time 4000 00:00:00.080 S
    sampleId 6, size 1024 duration 1000 time 5000 00:00:00.100 S
    sampleId 7, size 1024 duration 1000 time 6000 00:00:00.120 S
    sampleId 8, size 1024 duration 1000 time 7000 00:00:00.140 S
    sampleId 9, size 1024 duration 1000 time 8000 00:00:00.160 S
    .
    .
    .
    .
    Image Attached Files
    Quote Quote  
  14. I'm just checking with exiftool, and in video files that store that metadata, usually there is an "Date/Time Original" which is separate from the date created/modified/accessed field. So if you modify the date created, modifed or accessed, those will change, but the original date/time will not change. You do not have the Date/Time Original field as reported by exiftool (or maybe the author hasn't added it for xavc-s files yet)
    Quote Quote  
  15. Thanks for your effort, guys!

    My camera doesn't display the time at playback, only the duration of the current clip. It also shows the clips by date. Probably it just uses the file creation dates or the xml file I uploaded previously. I should add that this is not an expensive camera at all. It would be interesting if someone with a high-end camera capable of recording XAVC-S could upload a clip and see if the metadata differs.

    Even if there is no metadata, it should be possible to use the creation dates of each clip to create a subtitle with the time and date of recording. I will do some more research and report back. Meanwhile, I've uploaded a few more clips for testing. Again, the XML files exist in the camera only and are not transferred to the computer using PlayMemories Home.
    Image Attached Files
    Last edited by okv; 17th May 2015 at 04:01.
    Quote Quote  
  16. Another thing. Could anyone recommend a program to display the exact length of these video clips (milliseconds)? Windows only displays them in seconds. I tried Virtualdub, but it doesn't support these files.
    Quote Quote  
  17. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Originally Posted by okv View Post
    Another thing. Could anyone recommend a program to display the exact length of these video clips (milliseconds)? Windows only displays them in seconds. I tried Virtualdub, but it doesn't support these files.
    Virtualdub supports those files just fine if you use the latest FFmpeg input driver.
    Image Attached Thumbnails Click image for larger version

Name:	xavc.png
Views:	619
Size:	7.8 KB
ID:	31745  

    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  18. Originally Posted by okv View Post
    Another thing. Could anyone recommend a program to display the exact length of these video clips (milliseconds)? Windows only displays them in seconds.
    mediainfoxp (view=>text)


    Format : XAVC
    Codec ID : XAVC
    File size : 27.9 MiB
    Duration : 4s 800ms
    Overall bit rate mode : Variable
    Overall bit rate : 48.8 Mbps
    Encoded date : UTC 2015-05-16 05:52:01
    Tagged date : UTC 2015-05-16 05:52:01

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.2
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Format settings, GOP : M=1, N=12
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 4s 800ms
    Bit rate mode : Variable
    Bit rate : 46.9 Mbps
    Maximum bit rate : 60.0 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 50.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.452
    Stream size : 26.8 MiB (96%)
    Encoded date : UTC 2015-05-16 05:52:01
    Tagged date : UTC 2015-05-16 05:52:01
    Color primaries : BT.709
    Transfer characteristics : IEC 61966-2-4
    Matrix coefficients : BT.709
    Color range : Limited

    Audio
    ID : 2
    Format : PCM
    Format settings, Endianness : Big
    Format settings, Sign : Signed
    Codec ID : twos
    Duration : 4s 800ms
    Bit rate mode : Constant
    Bit rate : 1 536 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Stream size : 900 KiB (3%)
    Encoded date : UTC 2015-05-16 05:52:01
    Tagged date : UTC 2015-05-16 05:52:01

    Other
    Type : meta
    Duration : 4s 800ms


    If you looked at the track 3 dump above, it agrees with the timing given by mediainfo (the dump shows the start timecode of the frame, so the last frame starts at 4.780, ends at 4.800)
    Quote Quote  
  19. Thanks again for trying to help me out! I've done some more research.

    Please look at the attached files, they show exactly what kind of subtitle I want to have in my videos (note: both files must be in the same directory). For this example I have merged three clips into one short movie. The clips used are slightly different from the ones I uploaded previously.

    I did it like this:

    1) I used mediainfoxp to obtain the exact duration of the three clips. In this case they were 3 s 360 ms, 2 s 400 ms and 2 s 400 ms, respectively. Total time: 8 s 160 ms. This step is necessary because Windows for some reason only reports clip duration in whole seconds.

    2) I used mp4 time/date subtitle file (.srt) creator v1.0 (see an earlier post for link) to auto-generate three subtitle files, one for each clip. Note: I have discovered that it uses the "date modified" file attribute to find the correct time and date. It also uses the local language which is fine.

    3) Since the above program sadly only deals with whole seconds, I had to manually modify each of the three srt files. As an example, the auto-generated srt file for the second video looked like this:

    1
    00:00:00,000 --> 00:00:00,999
    17. mai 2015 08:21:01

    2
    00:00:01,000 --> 00:00:01,999
    17. mai 2015 08:21:02


    However, since the video clip was 2 s 400 ms long I had to manually edit the srt file like so:

    1
    00:00:00,000 --> 00:00:00,999
    17. mai 2015 08:21:01

    2
    00:00:01,000 --> 00:00:01,999
    17. mai 2015 08:21:02

    3
    00:00:02,000 --> 00:00:02,400
    17. mai 2015 08:21:03


    And the same for the other two srt files.

    4) I ran Subtitle Workshop 6.0b to join the srts together (in the same order as the video clips, of course). I selected Tools > join subtitles. There, I also selected "recalculate new time values". The resulting srt file is included in this post. As you can see, it is the same duration as the clips combined.

    5) I merged the three video clips into one clip using PlayMemories Home. The resulting mp4 file is included.


    Although this works, it becomes increasingly time consuming as the amount of clips to be combined increases. Imagine 100 clips, for instance! So, the big question is: How can this be done automatically? Right now I wish I had some programming skills! It would at least be great to be able to skip step 3.

    Thanks for any input on this! I'm sure I'm not the only one who could have a use for such a program (particularly regarding home videos).
    Image Attached Files
    Quote Quote  
  20. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    I'm sure I'm not the only one who could have a use for such a program (particularly regarding home videos).
    Maybe a handful of other people (at best) may be interested in this. Why can't you just add your tittles when you edit the clips, like most people would? This seams to me to be a lot of work for nothing at all. Unless this is needed for forensic purpose.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  21. Originally Posted by racer-x View Post
    I'm sure I'm not the only one who could have a use for such a program (particularly regarding home videos).
    Maybe a handful of other people (at best) may be interested in this. Why can't you just add your tittles when you edit the clips, like most people would? This seams to me to be a lot of work for nothing at all. Unless this is needed for forensic purpose.
    Hello, are you saying there is an easier way of doing this? Please let me know how. Thanks.
    Quote Quote  
  22. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    okv,

    Creating a program for creating SRT is not too difficult, DEPENDING on what you want done. After reading this thread several times, I'm still a little unsure of what you need.

    You just want a program to create an SRT with each Second, for just a second, starting with the created time, and then another created the same way and appended to the first SRT? That's a question...

    You do understand all his must be done BEFORE your clips are joined or any information regarding 2nd, third, etc. clip is lost in the merge/join. It could be automated but would be much more involved. Is there a long time need for this or large need for it?

    UPDATE: Quick addition to one of my existing programs gives all data for a video.

    Click image for larger version

Name:	ScreenHunter_140 May. 20 00.07.jpg
Views:	599
Size:	26.3 KB
ID:	31846
    Last edited by Budman1; 20th May 2015 at 00:13. Reason: added image
    Quote Quote  
  23. Hey Budman1, thank you for your reply. An updated version of TimeDateSRTcreator was released a few days ago, and it now does exactly what I need!

    https://forum.videohelp.com/threads/335788-Time-Date-Subtitle-File-Generator-(-srt)-Tes...=1#post2391362
    Quote Quote  



Similar Threads