Format SDcard as ext4 for birth time - ext4

I am using a GoPro Hero 4 to record groundtruth videos. I need to collect the exact time the video has been created (down to miliseconds).
In ext4, there is a field of birthtime ( or ctime, btime). Could I format the SD card to ext4, and stat the birth time later?

Related

ffmpeg - How to replace / overwrite part of audio from given timestamp on?

I am using ffmpeg-kit to manage audio recordings in React Native.
I have 2 recordings - rec_1.m4a and rec_2.m4a.
I only know the duration of rec_1.m4a, which is 10.0 seconds.
I want to overwrite rec_1.m4a with rec_2.m4a from a specific timestamp on - e.g. from 5.6 seconds.
How can I do this with ffmpeg?
There are two special cases:
rec_2.m4a ends before rec_1.m4a does (in our case this means rec_2.m4a's duration is <4.4 seconds - 10.0-5.6=4.4).
rec_2.m4a does not end even after rec_1.m4a does (in our case this means rec_2.m4a's duration is >=4.4 seconds).
I know I could split the files and then concatenate them. But for that I would have to know rec_2.m4a's duration, which I don't.
Edit: Figured I could use the FFprobeKit.getMediaInformationAsync() function to easily get the duration of rec_2.m4a. But it would still be nice to know if replacement is possible without this extra step.

Wrong Time in Change Documents (Data Element)

I created Data element ZDT_NKS_DESCR and flagged Change Document when creating for logging the changes on WebUI table. Everything is good, but the time of changing logging wrong. It adds +3 hours to current time.
For example: if the current time is 10:00 it's logging 13:00 on Web UI.
How can I fix it? Can anybody explain what happens?
Here is my data element (NB: in fact I ticked the "Change Document" checkbox later on):
Here is the change logging on Web UI table, the time should be 9:48, 9:48, 9:45 :
P.S: On Web UI timezone is correct.
In ABAP-based softwares, many screens display the dates using the SAP system time unfortunately (that's been always a big problem). Some modules sometimes display the local time (according to user's time) or according to the local time of the partner (transportation modules for instance). So users have to learn for every module or every screen what kind of date/time it is.
Even in database tables, it's impossible to be sure what kind of date/time it is. Usually it's the system time. But some modules may store the date/time according to UTC.
I guess that the times of the change documents are displayed in the system time.
The system time can be seen via the classic SAP GUI, in the menu System > Status > System time.
Here's my final solution based on Sandra answer:
In xxxxx_WRITE_DOCUMENT FM we should change time_of_change value from utime to sy-uzeit. Your CHANGEDOCUMENT_CLOSE function should look like this:
CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
EXPORTING
objectclass = 'ZCHD00005'
objectid = objectid
date_of_change = udate
time_of_change = sy-uzeit (it's current system time)
tcode = tcode
username = username
object_change_indicator = object_change_indicator
no_change_pointers = no_change_pointers
EXCEPTIONS
header_insert_failed = 1
object_invalid = 2
open_missing = 3
no_position_inserted = 4
OTHERS = 5.
If it's necessary, you should change the timezone on WebUI. I'm using system timezone, because of this on WebUI->Personalization->Timezone I choose UTC from F4.
Save and activate your solution!

How can I know if I've already played a segment of an M3U8 video?

I'm writing an m3u8 player and have a small issue. One m3u8 video I'm trying to play returns a media sequence that has nothing to do with the segment file names and the file names repeat themselves forever. How can I know if I already played a given segment?
This is what the requests look like over a few seconds:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5609
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:10.000000,
channel001.ts
#EXTINF:10.000000,
channel000.ts
Then a few seconds later:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5610
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:10.000000,
channel000.ts
#EXTINF:10.000000,
channel001.ts
Then again a few seconds later:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5611
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:10.000000,
channel001.ts
#EXTINF:10.000000,
channel000.ts
so the segment names are the same, the media sequence doesn't tell me much. How can I know if I already played those specific segments?
Thanks.
The segment names don't matter, you always use the media sequence. MEDIA-SEQUENCE is incremented each time a segment is removed from the playlist.
3. Media Segments
...
Each segment in a Media Playlist has a unique integer Media Sequence
Number. The Media Sequence Number of the first segment in the Media
Playlist is either 0 or declared in the Playlist (Section 4.3.3.2).
The Media Sequence Number of every other segment is equal to the
Media Sequence Number of the segment that precedes it plus one.
and
6.3.5. Determining the Next Segment to Load
...
The first segment to load is generally the segment that the client
has chosen to play first (see Section 6.3.3).
In order to play the presentation normally, the next Media Segment to
load is the one with the lowest Media Sequence Number that is greater
than the Media Sequence Number of the last Media Segment loaded.
RFC 8216 - HTTP Live Streaming

How to detect active video card and retrieve hardware ids?

I'd like to make a driver installer and I need to detect the active VGA card and retrive hardware ids.
I used devcon64 and save the output to a txt file, but it saves values like this:
devcon64 listclass display > display.txt:
Listing 1 device(s) for setup class "Display" . PCI\VEN_...: Videocard
Name
I just only need the PCI/VEN part.

Selecting a datetime range in YII input form

Here is the problem.
I have to create a submission form on my Yii-based website. The form requires to enter a datetime range.For that I am using "jui datetimepicker" third-party Yii extension.
http://www.yiiframework.com/extension/datetimepicker/
I use two date fields with this extension pertaining to start and end time respectively. So, what I want to achieve is be able to restrict the start datetime only to time in the future (neither past dates nor time should be selected) and the end time itself should be restricted to the maximum of three hours following the start time.
EXAMPLE: a user wants to schedule an event. They choose a date and time, which are of course in the future. Let's say they choose March 15, 13 O'clock as the start time in the start time field. Once they are done and move to the next field ("end time"), the respective datetimepicker restricts the range of time from March 15, 13:00 to March 15, 16:00.
Hence the second datetimepicker should be dynamically updated depending on the input of the first one.
It's possible o specify date range in the datetimepicker starting from the current date, but there is nothing like that for the time selection, so a user still can select time which has already passed.
It's not that I want to solve this problem with this extention, if anybody has any suggestions about YII solutions allowing to specify a datetime range in the most clean and effective way - it would be much appreciated.
You should use the edaterangepicker extension instead.
Given the API for the jquery timepicker addon. you should add the following to your widget call (along side 'model','attribute', etc)
'options'=>array(
'minDateTime'=>'<start dateTime here>',
'onSelect'=>'<JS function to run>'
)
The function you run on the "onSelect" event should dynamically set the minDateTime for the second dateTime input field, for ex:
function (selectedDateTime){
<EndDatePickerElement>.datetimepicker('option', 'minDateTime', <start dateTime here using selectedDateTime> );
}
There are more examples on the link provided earlier if you need to make it even more precise (like say if you wanted the starting date to be pushed back by the amount of time the user was on the page rather than it being set when the page was loaded. etc...)