FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

Tool to extract Samsung Motion Photos to plain jpg and mp4

36 posts
Thanks Meter: 22
 
By Chupi383, Member on 7th March 2017, 11:21 AM
Post Reply Email Thread
First off, I've been browsing here for some time, but I've just registered so I'm sorry if I'm breaking any etiquette or conventions on posting.

I ran across goofwear's tool to extract videos and photos from Samsung Motion Photos and thought it was useful. But I really wanted something that I'd be able to throw a whole album of motion photos at, rather than doing one at a time with this or the share app. I looked at the .bat file they used and implemented the same technique in C, so it could quickly process many photos. It's written with some direct Win32 API calls, so it's pretty much Windows only though making a cross platform command line version without the open dialog would be trivial. It is a simple program though, so it should work fine on Linux or Mac through Wine.

Here's the exe.
See the main page of that Github repository for more complete instructions and full source.

How to use:
1. Copy your Motion Photos off your Samsung phone, to your PC. Just copy them out of the DCIM folder.
2. Run the program. An "open" dialog appears. Apart from that there's no GUI on this program.
3. Browse to your photos and select them. Hold ctrl to select more than one, or shift to select a range. Or, ctrl+A to select all in a folder.
4. Click Open.
5. Wait. Depending how many you selected, it might take a little bit. When it's done, a message box will appear.
6. You should see *_photo.jpg and *_video.mp4 files next to the originals in the source directory. Note that this program does not modify the original files. It doesn't even open them with write permissions enabled.

Alternately, drag one or more photos from Windows Explorer onto the exe's icon instead of using the open dialog.

Screenshots:

Open dialog
Completion message
Resulting files


Version History:

1.0: Initial release
1.1: Added optional compile-time option to delete the original file after extracting
2.0: Refactored a bit, added a proper build system, and multilanguage support; moved to a 'real' Github repo


Andylain has written a Chinese language explanation of the usage of this program, and kindly translated the UI to Chinese (Traditional). To use it in Chinese, either have your Windows set to Chinese language, or rename the exe to put _zh at the end of the name. To use it in English on a Chinese Windows, put _en at the end of the name.

If for some reason you want the old version exe, the old "delete-original" exe, or the old source code, you can still have them.
The Following 2 Users Say Thank You to Chupi383 For This Useful Post: [ View ] Gift Chupi383 Ad-Free
 
 
22nd October 2017, 02:54 PM |#2  
Junior Member
Taipei, Taiwan
Thanks Meter: 0
 
More
Can you help to make a version that delete the source after successfully exact?
22nd October 2017, 10:13 PM |#3  
OP Member
Flag Boston, MA
Thanks Meter: 22
 
More
@Andylain Here's one that deletes the original file after splitting it into photo and video.

Oops -- turns out it was smaller because I forgot to include the icon last time. I've updated the link now and it points at a new build that has an icon.
The Following 2 Users Say Thank You to Chupi383 For This Useful Post: [ View ] Gift Chupi383 Ad-Free
23rd October 2017, 05:39 PM |#4  
Junior Member
Taipei, Taiwan
Thanks Meter: 0
 
More
This is super helpful, Thank you! Oh, there is no beautiful icon in this version.

BTW, I am a Chinese blogger live in Taiwan, I blogged this tool and made a Chinese user guide in my blog "andylain‧blogspot‧com/2017/07/SamsungMotionPictureExtractor.html" .
(Sorry, I am a new user and not allowed to post link.)
If you think that's not a great idea, please tell me and I'll delete my post.
23rd October 2017, 10:03 PM |#5  
OP Member
Flag Boston, MA
Thanks Meter: 22
 
More
@Andylain Thanks for linking me to your post, and thanks for writing a Chinese explanation for how to use it. I'm happy for people to use my program if they find it useful.

Would a proper Chinese language version of the program be helpful, or are most people there able to read enough English to understand the few error and status messages the program has?
The Following User Says Thank You to Chupi383 For This Useful Post: [ View ] Gift Chupi383 Ad-Free
23rd October 2017, 10:20 PM |#6  
OP Member
Flag Boston, MA
Thanks Meter: 22
 
More
@Andylain Please update your link to the "delete original" version to this one. I forgot to include the icon when building it yesterday.
The Following User Says Thank You to Chupi383 For This Useful Post: [ View ] Gift Chupi383 Ad-Free
24th October 2017, 02:55 PM |#7  
Junior Member
Taipei, Taiwan
Thanks Meter: 0
 
More
Quote:
Originally Posted by Chupi383

@Andylain Thanks for linking me to your post, and thanks for writing a Chinese explanation for how to use it. I'm happy for people to use my program if they find it useful.

Would a proper Chinese language version of the program be helpful, or are most people there able to read enough English to understand the few error and status messages the program has?

I think it's not hard to understand the status messages
However, a proper Chinese language version of the program would be much more helpful for girls and elderly since Samsung sell a lot of pink S8/S7 for this target.

I really love this app (super helpful for me) and I am happy to translate it , but I don't know how to code BTW. (just a blogger/photographer)

---------- Post added at 12:55 PM ---------- Previous post was at 12:47 PM ----------

Quote:
Originally Posted by Chupi383

@Andylain Please update your link to the "delete original" version to this one. I forgot to include the icon when building it yesterday.

Thank you for the update. I update the link to my blog and facebook fanpage
25th October 2017, 12:41 AM |#8  
OP Member
Flag Boston, MA
Thanks Meter: 22
 
More
@Andylain I've extracted all the user-facing strings from my code. The text in [square brackets] are comments giving some context for the message that follows, and don't appear anywhere in the program.

Code:
=====
[this message is shown in a dialog box if you click cancel on the open photos dialog]

You can use this program 3 different ways:

GUI USE: Just run it. You'll get an file-open dialog where you can open .jpg files. Use ctrl or shift or drag to select more than one.

DRAG & DROP USE: Drag one or more motion photos onto the icon for this exe.

COMMAND LINE USE: Run this program with one or more motion photo file names as arguments. Remember to use "quotes" if there are spaces in the names.

Any way you run it, the original files will not be modified. The extracted photo and video will be stored in *_photo.jpg and *_video.mp4 where * is the name of the original file, minus the .jpg extension.

Coded by Chupi383. All credit for the method goes to goofwear at the XDA forums. I've just ported their .bat file to plain C and Win32.

=====
[this is the title of the program]

Samsung Motion Photo Batch Extractor

=====
[this is displayed in the open dialog, under the box where you can type a filename, in a drop-down list]

Motion Photos (*.jpg)

All Files (*.*)

=====
[this is the title bar of the open dialog]

Open some Samsung Motion Photos

=====
[this message is shown if the user selected a file with a really really long name]

Skipping too-long path: <filename goes here>

=====
[title bar for error dialogs]

Error

=====
[error if the user selects over the maximum number of files (currently 10000)]

You've selected too many files. I can only do up to 10000 at a time.

=====
[error if the user selects so many files the Windows "open" dialog box gives up]

You've selected too many files. Try selecting fewer files and process them in bunches.

=====
[appended to names of extracted files - not sure if these should be translated]

_photo
_video

=====
[error if enough memory couldn't be allocated, possibly because the computer is out of RAM]

Can't allocate RAM to read <number> bytes from <filename>

=====
[error if a file can't be read for some reason, perhaps a damaged disk]

Skipping due to read error:
<filename>

=====
[error if an output file can't be written, generally because of full disk, read only disk, file exists and is read only, or permissions on the folder]

Can't write to <filename>

=====
[message on completion]

Finished extracting Motion Photos
    Photos extracted: <number>
    Videos extracted: <number>

=====
[added to the end of the previous success message if some files didn't contain a photo and a video]

<number> files were skipped because they weren't Motion Photos

=====
[title bar of completion message if at least 1 file was processed successfully]

Success

=====
[title bar of completion message if nothing was done successfully]

Failure

=====
["description" shown in right-click->properties dialog for the exe file]

Extract Samsung Motion Photos to jpg and mp4

=====
["product name" shown in properties dialog for the exe file]

Motion Photo Batch Extractor Utility
If you translate these for me, I'll put them back into my program to make either a Chinese or multi-language version.
29th October 2017, 09:22 PM |#9  
Junior Member
Taipei, Taiwan
Thanks Meter: 0
 
More
Here is the translation of Chinese, sorry for the delay of this reply.
BTW, maybe a dialog for user to choose whether delete original files would be a great idea?

Code:
=====
[this message is shown in a dialog box if you click cancel on the open photos dialog]
有三種方式可以使用本軟體:

一:點開軟體後選擇你要轉存的照片,你可以使用Ctrl或是Shift來多選檔案。

二:把你要的照片拖移到本軟體的icon上也能轉存!

三:你也能使用Command Line來處理喔! (記得用”quotes”取代空格)

請放心:無論你怎麼做,原始檔案都不會被修改。轉存成功的檔案將會存在原始檔案位置,並新增為 *_photo.jpg 和 *_video.mp4。

GUI軟體由Chupi383撰寫,軟體內核由XDA forums的goofwear撰寫,Andylain翻譯正體中文,詳細中文使用教學請上「安迪連碎碎念」。

=====
[this is the title of the program]

三星動態相片批次轉存工具

=====
[this is displayed in the open dialog, under the box where you can type a filename, in a drop-down list]

動態相片 (*.jpg)

所有檔案 (*.*)

=====
[this is the title bar of the open dialog]

開啟一些動態相片

=====
[this message is shown if the user selected a file with a really really long name]

已忽略太長的路徑:<filename goes here>

=====
[title bar for error dialogs]

發生錯誤

=====
[error if the user selects over the maximum number of files (currently 10000)]
你一次選太多檔案了。我一次只能處理一萬個檔案。

=====
[error if the user selects so many files the Windows "open" dialog box gives up]

你一次選太多檔案了。嘗試選少一點檔案吧!

=====
[appended to names of extracted files - not sure if these should be translated ]

_photo
_video

=====
[error if enough memory couldn't be allocated, possibly because the computer is out of RAM]

記憶體定位錯誤,無法讀取 <number> bytes 上的 <filename> 檔案,有可能電腦的RAM不足。

=====
[error if a file can't be read for some reason, perhaps a damaged disk]

由於讀取錯誤,已跳過處理:
<filename>


=====
[error if an output file can't be written, generally because of full disk, read only disk, file exists and is read only, or permissions on the folder]

無法寫入 <filename> 可能目的地已滿或是為唯讀。

=====
[message on completion]

動態相片轉存結果:
	有 <number> 張照片輸出成功!
	有 <number> 個影片輸出成功!


=====
[added to the end of the previous success message if some files didn't contain a photo and a video]

<number> 個檔案被跳過了,因為它們不是三星動態相片。

=====
[title bar of completion message if at least 1 file was processed successfully]

轉存成功

=====
[title bar of completion message if nothing was done successfully]

轉存失敗

=====
["description" shown in right-click->properties dialog for the exe file]

批次把三星動態相片轉存成JPG照片和MP4影片!

=====
["product name" shown in properties dialog for the exe file]

動態相片轉存工具

[/CODE]
4th November 2017, 10:48 AM |#10  
OP Member
Flag Boston, MA
Thanks Meter: 22
 
More
I'm sorry I'm being slow on this. My work has been especially busy lately. This thread isn't forgotten -- I'll make the translated app once I'm over this hump in workload.
8th November 2017, 08:06 PM |#11  
Junior Member
Taipei, Taiwan
Thanks Meter: 0
 
More
Quote:
Originally Posted by Chupi383

I'm sorry I'm being slow on this. My work has been especially busy lately. This thread isn't forgotten -- I'll make the translated app once I'm over this hump in workload.

That is very nice of you to do this!
Take your time and I am willing to help!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes