Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eyesis4pi-393-gui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
eyesis4pi-393-gui
Commits
ed1754f3
Commit
ed1754f3
authored
Apr 11, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added channel number offset as a single command line parameter
parent
4141c71a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
split_mov_jp4.php
footage_downloader/split_mov_jp4.php
+7
-1
No files found.
footage_downloader/split_mov_jp4.php
View file @
ed1754f3
...
...
@@ -32,6 +32,11 @@ set_time_limit(60*60*24);
$chunksize
=
10000000
;
// 10MB
$startMarkerWithExif
=
chr
(
hexdec
(
"ff"
))
.
chr
(
hexdec
(
"d8"
))
.
chr
(
hexdec
(
"ff"
))
.
chr
(
hexdec
(
"e1"
));
if
(
count
(
$_SERVER
[
'argv'
])
>
1
)
{
$chn_shift
=
$_SERVER
[
'argv'
][
1
]
+
0
;
}
else
{
$chn_shift
=
0
;
}
echo
"<pre>
\n
"
;
...
...
@@ -65,6 +70,7 @@ foreach ($files as $file) {
function
split_mov
(
$path
,
$mov_file
,
$dest
,
$ext
,
$startMarkerWithExif
,
$chunksize
)
{
global
$chn_shift
;
$path_with_name
=
"
$path
/
$mov_file
"
;
...
...
@@ -109,7 +115,7 @@ function split_mov($path,$mov_file,$dest,$ext,$startMarkerWithExif,$chunksize) {
//converting GMT a local time GMT+7
$DateTimeOriginal_local
=
strtotime
(
$exif_data
[
'DateTimeOriginal'
]);
/*-25200;*/
// $new_file_name = $exif_data['PageNumber'] . "_" . $DateTimeOriginal_local."_".$exif_data['SubSecTimeOriginal'].".".$ext;
$new_file_name
=
$DateTimeOriginal_local
.
"_"
.
$exif_data
[
'SubSecTimeOriginal'
]
.
"_"
.
$exif_data
[
'PageNumber'
]
.
"."
.
$ext
;
$new_file_name
=
$DateTimeOriginal_local
.
"_"
.
$exif_data
[
'SubSecTimeOriginal'
]
.
"_"
.
(
$exif_data
[
'PageNumber'
]
+
$chn_shift
)
.
"."
.
$ext
;
rename
(
$old_file_name
,
"
$path
/
$dest
/
$new_file_name
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment