ソニーのPlayMemories Camera Apps「サウンドフォト」アプリで撮影されたJPEGファイルから音声データ(WAVE/RIFF形式)を抽出するツールです。
./playmemories-sound-photo-extractor.sh /path/to/DSC00001.JPGpython3 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 3
- 使用ライブラリ: 標準ライブラリのみ(追加インストール不要)
本ツールはサウンドフォトアプリで撮影されたJPEGファイルを解析した結果を元に製作しています。
データ解析に関する内容は、Linuxユーザグループ「小江戸らぐ」の第284回活動報告会にて発表しました。
https://speakerdeck.com/rsato/recover-audio-data-embedded-in-photographs
This tool extracts audio data (WAVE/RIFF format) from JPEG files captured using the Sony PlayMemories Camera Apps "Sound Photo" application.
./playmemories-sound-photo-extractor.sh /path/to/DSC00001.JPGpython3 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 foundis 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.
- Required:
sh,grep,tail,head,dd,od,xxd - Optional:
file(used to check the extracted file format)
- Required: Python 3
- Uses only the Python standard library (no additional packages required)
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
