Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream handler_name has changed again on Hero6 files #14

Open
JuanIrache opened this issue Nov 25, 2017 · 3 comments
Open

Stream handler_name has changed again on Hero6 files #14

JuanIrache opened this issue Nov 25, 2017 · 3 comments

Comments

@JuanIrache
Copy link
Contributor

So, apparently the stream handler_name has changed again in Hero6 files. And that makes automated data extraction difficult for those of us who use ffmpeg. If I'm not wrong, for Hero5 files up to 60 fps, it was something like

Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 33 kb/s (default)
Metadata:
creation_time : 2017-11-25T15:46:16.000000Z
handler_name : GoPro MET

Which could be extracted via

ffmpeg -y -i VIDEOFILE.MP4 -codec copy -map 0:3 -f rawvideo DATA.BIN

Then, over 60 fps the Stream was:

Stream #0:2(eng): Data: none (gpmd / 0x646D7067), 66 kb/s (default)
Metadata:
creation_time : 2017-11-25T15:46:48.000000Z
handler_name : GoPro MET

So this call, despite the awkward tabulator character before "GoPro MET" would work for both:

ffmpeg -y -i VIDEOFILE.MP4 -codec copy -map 0:m:handler_name:" GoPro MET" -f rawvideo DATA.BIN

Now, Hero6 files don't have the tabulator character:

Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 37 kb/s (default)
Metadata:
creation_time : 2017-11-21T22:25:40.000000Z
handler_name : GoPro MET

So they can be retrieved with the 0:3 of the H5 sub 60fps command, but not with the previously universal 0:m:handler_name:" GoPro MET" and 0:m:handler_name:"GoPro MET" does not work either for some reason I don't comprehend.

Does anyone know how to solve this? Maybe using regular expressions or looking for the "(gpmd / 0x646D7067)" bit?

@KonradIT
Copy link

@JuanIrache
Copy link
Contributor Author

@KonradIT Awesome.

I managed to do something similar for my Windows batch script: https://github.com/JuanIrache/gopro-utils/blob/master/GPMD2CSV/GPMD2CSV.bat Not as elegant as yours probably, but works for now. (it also extracts the data to .csv. That was the initial intention of the script)

Thanks

@stilldavid
Copy link
Owner

Strong work!

I wonder what the most cross-platform solution would be, perhaps a perl or python script rather than a bash or batch script? I don't run windows, does it ship with another cross-platform scripting language?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants