set metadata in a jpg image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

set metadata in a jpg image

Michael Koch
Hello,

I want to set two exif tags in a *.jpg image, so that this image is
recognized by Facebook as a spherical 360 image. This can be done with
exiftool:

exiftool -overwrite_original -make="Ricoh" -model="Ricoh THETA S" test.jpg

Is it also possible to do the same thing with FFmpeg? This would
simplify things, because the image is anyway created by FFmpeg and
perhaps it can all be done in one command line.
I did try this command, but the metadata isn't written to the file:

ffmpeg -i test.jpg -metadata make="Ricoh" -y test2.jpg

The console output is below.

Thanks,
Michael


C:\Users\astro\Desktop\moon>ffmpeg -i test.jpg -metadata make="Ricoh" -y
test2.jpg
ffmpeg version 2021-02-13-git-d5d6751a55-essentials_build-www.gyan.dev
Copyright (c) 2000-2021 the FFmpeg developers
   built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-lzma --enable-zlib --enable-libsrt --enable-libssh
--enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom
--enable-libopenjpeg --enable-libvpx --enable-libass
--enable-libfreetype --enable-libfribidi --enable-libvidstab
--enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
--enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc
--enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme
--enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
--enable-libtheora --enable-libvo-amrwbenc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex
--enable-libvorbis --enable-librubberband
   libavutil      56. 65.100 / 56. 65.100
   libavcodec     58.123.100 / 58.123.100
   libavformat    58. 67.100 / 58. 67.100
   libavdevice    58. 11.103 / 58. 11.103
   libavfilter     7.106.100 /  7.106.100
   libswscale      5.  8.100 /  5.  8.100
   libswresample   3.  8.100 /  3.  8.100
   libpostproc    55.  8.100 / 55.  8.100
Input #0, image2, from 'test.jpg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 103504 kb/s
   Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc,
bt470bg/unknown/unknown), 6000x3000 [SAR 1:1 DAR 2:1], 25 fps, 25 tbr,
25 tbn, 25 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'test2.jpg':
   Metadata:
     make            : Ricoh
     encoder         : Lavf58.67.100
   Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown,
progressive), 6000x3000 [SAR 1:1 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn
     Metadata:
       encoder         : Lavc58.123.100 mjpeg
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=    1 fps=0.0 q=8.6 Lsize=N/A time=00:00:00.04 bitrate=N/A
speed=0.267x
video:505kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: set metadata in a jpg image

Paul B Mahol
On Tue, Feb 23, 2021 at 10:59 AM Michael Koch <[hidden email]>
wrote:

> Hello,
>
> I want to set two exif tags in a *.jpg image, so that this image is
> recognized by Facebook as a spherical 360 image. This can be done with
> exiftool:
>
> exiftool -overwrite_original -make="Ricoh" -model="Ricoh THETA S" test.jpg
>
> Is it also possible to do the same thing with FFmpeg? This would
> simplify things, because the image is anyway created by FFmpeg and
> perhaps it can all be done in one command line.
> I did try this command, but the metadata isn't written to the file:
>

Nope, There is no exif encoding support.


>
> ffmpeg -i test.jpg -metadata make="Ricoh" -y test2.jpg
>

That is for container metadata, while you want to write frame metadata.



>
> The console output is below.
>
> Thanks,
> Michael
>
>
> C:\Users\astro\Desktop\moon>ffmpeg -i test.jpg -metadata make="Ricoh" -y
> test2.jpg
> ffmpeg version 2021-02-13-git-d5d6751a55-essentials_build-www.gyan.dev
> Copyright (c) 2000-2021 the FFmpeg developers
>    built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
>    configuration: --enable-gpl --enable-version3 --enable-static
> --disable-w32threads --disable-autodetect --enable-fontconfig
> --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
> --enable-lzma --enable-zlib --enable-libsrt --enable-libssh
> --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp
> --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom
> --enable-libopenjpeg --enable-libvpx --enable-libass
> --enable-libfreetype --enable-libfribidi --enable-libvidstab
> --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
> --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc
> --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme
> --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
> --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm
> --enable-libopencore-amrnb --enable-libopus --enable-libspeex
> --enable-libvorbis --enable-librubberband
>    libavutil      56. 65.100 / 56. 65.100
>    libavcodec     58.123.100 / 58.123.100
>    libavformat    58. 67.100 / 58. 67.100
>    libavdevice    58. 11.103 / 58. 11.103
>    libavfilter     7.106.100 /  7.106.100
>    libswscale      5.  8.100 /  5.  8.100
>    libswresample   3.  8.100 /  3.  8.100
>    libpostproc    55.  8.100 / 55.  8.100
> Input #0, image2, from 'test.jpg':
>    Duration: 00:00:00.04, start: 0.000000, bitrate: 103504 kb/s
>    Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc,
> bt470bg/unknown/unknown), 6000x3000 [SAR 1:1 DAR 2:1], 25 fps, 25 tbr,
> 25 tbn, 25 tbc
> Stream mapping:
>    Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
> Press [q] to stop, [?] for help
> Output #0, image2, to 'test2.jpg':
>    Metadata:
>      make            : Ricoh
>      encoder         : Lavf58.67.100
>    Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown,
> progressive), 6000x3000 [SAR 1:1 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn
>      Metadata:
>        encoder         : Lavc58.123.100 mjpeg
>      Side data:
>        cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
> frame=    1 fps=0.0 q=8.6 Lsize=N/A time=00:00:00.04 bitrate=N/A
> speed=0.267x
> video:505kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: unknown
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: set metadata in a jpg image

Michael Koch
Am 23.02.2021 um 12:04 schrieb Paul B Mahol:

> On Tue, Feb 23, 2021 at 10:59 AM Michael Koch <[hidden email]>
> wrote:
>
>> Hello,
>>
>> I want to set two exif tags in a *.jpg image, so that this image is
>> recognized by Facebook as a spherical 360 image. This can be done with
>> exiftool:
>>
>> exiftool -overwrite_original -make="Ricoh" -model="Ricoh THETA S" test.jpg
>>
>> Is it also possible to do the same thing with FFmpeg? This would
>> simplify things, because the image is anyway created by FFmpeg and
>> perhaps it can all be done in one command line.
>> I did try this command, but the metadata isn't written to the file:
>>
> Nope, There is no exif encoding support.

Thanks for your answer. Then it seems exiftool is already the simplest
solution in this case.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".