Argh. Forget it. It looks like I should get a web from my C and C ++ programming and use this instead. I donβt know all the shell tricks to make it work. This is how far I got.
ffmpeg -i myfile 2>&1 | grep "" > textdump.txt
and then, most likely, we will select the duration using a C ++ application, extracting tokens.
I am not sending a decision because now I am not a good person.
Update - I have my approach to getting this timestamp
Step 1 - Get Media Information into a Text File
`ffprobe -i myfile 2>&1 | grep "" > textdump.txt`
<B> OR
`ffprobe -i myfile 2>&1 | awk '{ print }' > textdump.txt`
Step 2 - Enter the information you need and extract it
cat textdump.txt | grep "Duration" | awk '{ print $2 }' | ./a.out >
a.out. C, , - - 00: 00: 01.33,
C, stdin . , .
#include stdio.h #include string.h void main() { //by Admiral Smith Nov 3. 2016 char time[80]; int len; char *correct; scanf("%s", &time); correct = (char *)malloc(strlen(time)); if (!correct) { printf("\nmemory error"); return; } memcpy(correct,&time,strlen(time)-1); correct[strlen(time)]='/0'; printf("%s", correct); free(correct); }
Now output formats are correct, like 00: 00: 01.33
AdmiralSmith Nov 04 '16 at 2:48 2016-11-04 02:48
source share