Skip to content

rsato/playmemories-sound-photo-extractor

Repository files navigation

playmemories-sound-photo-extractor

概要

ソニーのPlayMemories Camera Apps「サウンドフォト」アプリで撮影されたJPEGファイルから音声データ(WAVE/RIFF形式)を抽出するツールです。


使い方

シェルスクリプト版

./playmemories-sound-photo-extractor.sh /path/to/DSC00001.JPG

Python版

python3 playmemories-sound-photo-extractor.py /path/to/DSC00001.JPG
  • 出力ファイル名は <元のファイル名>.<拡張子>.wav(例: DSC00001.JPG.wav)になります。
  • 出力ファイルは、入力ファイルの場所ではなく、コマンドを実行したカレントディレクトリに保存されます。
  • SD_HEAD / SD_FOOT not found が出る場合は、対象のJPEGファイルがサウンドフォトで撮影されたものでないか、編集等で音声データが欠損している可能性があります。

依存コマンド

シェルスクリプト版

  • 必須: sh, grep, tail, head, dd, od, xxd
  • 任意: file(抽出後の形式確認に使用)

Python版

  • 必須: Python 3
  • 使用ライブラリ: 標準ライブラリのみ(追加インストール不要)

データ解析について

本ツールはサウンドフォトアプリで撮影されたJPEGファイルを解析した結果を元に製作しています。

データ解析に関する内容は、Linuxユーザグループ「小江戸らぐ」の第284回活動報告会にて発表しました。

写真に埋め込まれた音声データを救出せよ

https://speakerdeck.com/rsato/recover-audio-data-embedded-in-photographs


Overview

This tool extracts audio data (WAVE/RIFF format) from JPEG files captured using the Sony PlayMemories Camera Apps "Sound Photo" application.

Usage

Shell Script Version

./playmemories-sound-photo-extractor.sh /path/to/DSC00001.JPG

Python Version

python3 playmemories-sound-photo-extractor.py /path/to/DSC00001.JPG
  • The output filename will be <original filename>.<extension>.wav (e.g. DSC00001.JPG.wav).
  • The output file is written to the current working directory, not to the directory containing the input file.
  • If SD_HEAD / SD_FOOT not found is shown, the JPEG file may not have been captured using the Sound Photo application, or the embedded audio data may have been lost due to editing or other processing.

Dependencies

Shell Script Version

  • Required: sh, grep, tail, head, dd, od, xxd
  • Optional: file (used to check the extracted file format)

Python Version

  • Required: Python 3
  • Uses only the Python standard library (no additional packages required)

About Data Analysis

This tool is based on the results of analyzing the structure of JPEG files captured by the Sound Photo application.

Details of the data analysis were presented at the 284th regular meeting of the "Koedo LUG (Linux Users Group)."

Presentation: https://speakerdeck.com/rsato/recover-audio-data-embedded-in-photographs

Happy https://digitalfreedoms.org/en/document-freedom-day!

About

Extract WAVE audio data from Sony PlayMemories Camera Apps "Sound Photo" images.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors