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.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 23 of 23
Thread
-
-
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.
ScottLast edited by Cornucopia; 15th May 2015 at 19:23.
-
+ 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 -
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. -
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. -
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. -
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"
-> main problem is how to convert the rtmd data to something human readable,...users currently on my ignore list: deadrats, Stears555 -
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.
-
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 -
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. -
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
http://www.divergentmedia.com/editready
Last edited by Jamaika; 16th May 2015 at 11:31.
-
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. -
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
.
.
.
. -
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)
-
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.Last edited by okv; 17th May 2015 at 04:01.
-
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.
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........ -
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) -
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). -
I'm sure I'm not the only one who could have a use for such a program (particularly regarding home videos).Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
-
-
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.
Last edited by Budman1; 20th May 2015 at 00:13. Reason: added image
-
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
Similar Threads
-
Export AVCHD frame specific metadata to subtitles
By HD65 in forum SubtitleReplies: 129Last Post: 16th Apr 2024, 16:34 -
Time & Date Subtitle File Generator (.srt) - Testers Required
By time2innov8 in forum SubtitleReplies: 108Last Post: 5th Feb 2024, 17:31 -
ffmpeg - howto encode creation date/time overlay from metadata
By hydra3333 in forum EditingReplies: 6Last Post: 20th Dec 2014, 18:19 -
Preserving Time / Date metadata in capture files
By jlaymon in forum CapturingReplies: 4Last Post: 28th May 2013, 11:51 -
MPEG2 Metadata for date recorded?
By liberty610 in forum Video ConversionReplies: 1Last Post: 30th Jan 2013, 18:59