[FFmpeg-user] Removing a metadata tag from a specfic stream
Thibeau
vercruyssen.thibeau at gmail.com
Sun Feb 7 13:03:38 EET 2021
First ffprobe shows before executing ffmpeg command . I installed the git
version for ffmpeg to make sure it was the same as yours. It seems you're
infact corrrect and it allows for you to set the tag to another and value
and will default to Other. Thx for the help of explaining it. Didn't find
the docs on my own so thx for giving a link to them.
Don't know alot about ffmpeg either but adding -vsync 2 to your command
would seem like a good idea no? Than the error in the command (see second
command [2]) would go away. Unless I'm mistaken and it's intent to be not
use vsync 2 method.
-------------------------- [1]
ffprobe '29 My Girl.flac'
ffprobe version N-100998-g134193a2ff Copyright (c) 2007-2021 the FFmpeg
developers
built with gcc 9.3.0 (Gentoo 9.3.0-r2 p4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/share/doc/ffmpeg-9999/html --mandir=/usr/share/man
--enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
--ar=x86_64-pc-linux-gnu-ar --nm=x86_64-pc-linux-gnu-nm
--ranlib=x86_64-pc-linux-gnu-ranlib
--pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-march=native -O3
-pipe -flto=5 -fgraphite-identity -floop-nest-optimize -ftree-vectorize
-fsched-pressure -fipa-pta -fno-semantic-interposition -fuse-linker-plugin
-fno-common -fdevirtualize-at-ltrans -falign-functions=32
--param=l1-cache-size=32 --param=l1-cache-line-size=64
--param=l2-cache-size=6144' --disable-static --enable-avfilter
--enable-avresample --disable-stripping --disable-optimizations
--disable-libcelt --enable-nonfree --disable-indev=v4l2
--disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack
--disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect
--disable-debug --disable-gcrypt --enable-gnutls --disable-gmp --enable-gpl
--disable-hardcoded-tables --enable-iconv --disable-libtls
--disable-libxml2 --disable-lzma --disable-network --disable-opencl
--enable-openssl --enable-postproc --disable-libsmbclient --disable-ffplay
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-vulkan
--enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes
--enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394
--enable-libcaca --disable-openal --disable-opengl --disable-libv4l2
--disable-libpulse --enable-libdrm --disable-libjack
--disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2
--enable-libdav1d --disable-libfdk-aac --disable-libopenjpeg
--enable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24
--disable-mmal --disable-libmodplug --enable-libopus --disable-libilbc
--disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt
--enable-librsvg --disable-ffnvcodec --enable-libvorbis --disable-libvpx
--disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint
--disable-cuda-llvm --disable-libflite
--disable-frei0r --disable-libfribidi --enable-fontconfig --disable-ladspa
--disable-libass --disable-libtesseract --disable-lv2 --enable-libfreetype
--disable-libvidstab --disable-librubberband --disable-libzmq
--disable-libzimg --disable-libsoxr --enable-pthreads
--disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar
--disable-libaom --disable-libopenh264 --disable-librav1e
--disable-libsnappy --disable-libtheora --disable-libtwolame
--disable-libwebp --disable-libx264 --disable-libx265 --disable-libxvid
--disable-gnutls --disable-armv5te --disable-armv6 --disable-armv6t2
--disable-neon --disable-vfp --disable-vfpv3 --disable-armv8
--disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec
--disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext
--disable-fma4 --disable-xop --cpu=host --enable-lto --disable-doc
--disable-htmlpages --enable-manpages
libavutil 56. 64.100 / 56. 64.100
libavcodec 58.121.100 / 58.121.100
libavformat 58. 67.100 / 58. 67.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7.102.100 / 7.102.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, flac, from '29 My Girl.flac':
Metadata:
ALBUM : Prodigal Son: Season 1 (Original Television
Soundtrack)
ARTIST : Nathaniel Blume
DATE : 2020
TITLE : My Girl
track : 29
Duration: 00:02:55.60, start: 0.000000, bitrate: 1424 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)
Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc,
bt470bg/unknown/unknown), 640x640 [SAR 118:118 DAR 1:1], 90k tbr, 90k tbn,
90k tbc (attached pic)
Metadata:
comment : Other
---------------------------------------- [1]
--------------------------------- [2]
brandon at NKWTMEID /tmp/x $ ffmpeg -i '29 My Girl.flac' -c:v png
-disposition:v:1 attached_pic -metadata:s:v:0 comment="Cover (front)"
out.flac
ffmpeg version N-100998-g134193a2ff Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 9.3.0 (Gentoo 9.3.0-r2 p4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/share/doc/ffmpeg-9999/html
--mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc
--cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar
--nm=x86_64-pc-linux-gnu-nm --ranlib=x86_64-pc-linux-gnu-ranlib
--pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-march=native -O3
-pipe -flto=5 -fgraphite-identity -floop-nest-optimize -ftree-vectorize
-fsched-pressure -fipa-pta -fno-semantic-interposition -fuse-linker-plugin
-fno-common -fdevirtualize-at-ltrans -falign-functions=32
--param=l1-cache-size=32 --param=l1-cache-line-size=64
--param=l2-cache-size=6144' --disable-static
--enable-avfilter --enable-avresample --disable-stripping
--disable-optimizations --disable-libcelt --enable-nonfree
--disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss
--disable-indev=jack --disable-outdev=oss --enable-bzlib
--disable-runtime-cpudetect --disable-debug --disable-gcrypt
--enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables
--enable-iconv --disable-libtls --disable-libxml2 --disable-lzma
--disable-network --disable-opencl --enable-openssl --enable-postproc
--disable-libsmbclient --disable-ffplay --disable-sdl2 --disable-vaapi
--disable-vdpau --disable-vulkan --enable-xlib --enable-libxcb
--enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio
--disable-libiec61883 --disable-libdc1394 --enable-libcaca --disable-openal
--disable-opengl --disable-libv4l2 --disable-libpulse --enable-libdrm
--disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb
--disable-libcodec2 --enable-libdav1d --disable-libfdk-aac
--disable-libopenjpeg --enable-libbluray --disable-libgme --disable-libgsm
--disable-libaribb24 --disable-mmal --disable-libmodplug --enable-libopus
--disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex
--disable-libsrt --enable-librsvg --disable-ffnvcodec --enable-libvorbis
--disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b
--disable-chromaprint --disable-cuda-llvm --disable-libflite
--disable-frei0r --disable-libfribidi --enable-fontconfig --disable-ladspa
--disable-libass --disable-libtesseract --disable-lv2 --enable-libfreetype
--disable-libvidstab --disable-librubberband --disable-libzmq
--disable-libzimg --disable-libsoxr --enable-pthreads
--disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar
--disable-libaom --disable-libopenh264 --disable-librav1e
--disable-libsnappy --disable-libtheora --disable-libtwolame
--disable-libwebp --disable-libx264 --disable-libx265 --disable-libxvid
--disable-gnutls --disable-armv5te --disable-armv6 --disable-armv6t2
--disable-neon --disable-vfp --disable-vfpv3 --disable-armv8
--disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec
--disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext
--disable-fma4 --disable-xop --cpu=host --enable-lto --disable-doc
--disable-htmlpages --enable-manpages
libavutil 56. 64.100 / 56. 64.100
libavcodec 58.121.100 / 58.121.100
libavformat 58. 67.100 / 58. 67.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7.102.100 / 7.102.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, flac, from '29 My Girl.flac':
Metadata:
ALBUM : Prodigal Son: Season 1 (Original Television
Soundtrack)
ARTIST : Nathaniel Blume
DATE : 2020
TITLE : My Girl
track : 29
Duration: 00:02:55.60, start: 0.000000, bitrate: 1424 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)
Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc,
bt470bg/unknown/unknown), 640x640 [SAR 118:118 DAR 1:1], 90k
tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Other
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> png (native))
Stream #0:0 -> #0:1 (flac (native) -> flac (native))
Press [q] to stop, [?] for help
[swscaler @ 0x5555a8fd5d00] deprecated pixel format used, make sure you did
set range correctly
[flac @ 0x5555a8f532c0] Frame rate very high for a muxer not efficiently
supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
Output #0, flac, to 'out.flac':
Metadata:
ALBUM : Prodigal Son: Season 1 (Original Television
Soundtrack)
ARTIST : Nathaniel Blume
DATE : 2020
TITLE : My Girl
track : 29
encoder : Lavf58.67.100
Stream #0:0: Video: png, rgb24(pc, bt470bg/unknown/unknown, progressive),
640x640 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 90k fps, 90k tbn (attached pic)
Metadata:
comment : Cover (front)
encoder : Lavc58.121.100 png
Stream #0:1: Audio: flac, 44100 Hz, stereo, s32 (24 bit), 128 kb/s
Metadata:
encoder : Lavc58.121.100 flac
frame= 1 fps=0.0 q=-0.0 Lsize= 31013kB time=00:02:55.60
bitrate=1446.8kbits/s speed= 359x
video:565kB audio:30440kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.026684%
--------------------- [1]
On Sun, 7 Feb 2021 at 10:35, Paul B Mahol <onemda at gmail.com> wrote:
> On Sun, Feb 7, 2021 at 11:19 AM Paul B Mahol <onemda at gmail.com> wrote:
>
> >
> >
> > On Sun, Feb 7, 2021 at 12:59 AM MediaMouth <communque at gmail.com> wrote:
> >
> >> On Feb 6, 2021, at 3:32 PM, Paul B Mahol <onemda at gmail.com> wrote:
> >> >
> >> > Can you share file?
> >> Yes. The O.P. made it available here: https://ufile.io/bgunj34e <
> >> https://ufile.io/bgunj34e>
> >>
> >> >
> >> > ffmpeg -i INPUT.png -i AUDIO.flac -map:v 0 -metadata comment=Other
> >> > -disposition:v:0 attached_pic -map:a 1 -metadata album=test FINAL.flac
> >> >
> >> > Note that metadata order is important. The command above adds comment
> >> > metadata to video stream.
> >>
> >> Thanks for posting. Clear and helpful. Unfortunately, I got an error
> >> Here are the steps I did...
> >>
> >
> > Your steps are all invalid. Why you put first audio then video?
> > My command only works with first video stream and after that audio
> stream.
> > In ffmpeg every item position matters.
> >
>
> Also you can not remove description of attached picture at all. "Other" is
> just default value if no other valid values are set.
> You can change value to "Cover (front)" if you like, please read 4.14
> section of https://id3.org/id3v2.4.0-frames
>
> So command to change Other to Cover is:
> ffmpeg -i INPUT.flac -c:v png -disposition:v:1 attached_pic -metadata:s:v:0
> comment="Cover (front)" OUTPUT.flac
>
>
>
> >
> >
> >> ffmpeg -i '29 My Girl.flac' -an -vcodec copy '29 My Girl.png'; #Extract
> >> the album art to an external file.
> >> ffmpeg -i '29 My Girl.flac' -map 0 -map -0:v:0 -c copy '29 My
> >> Girl-NoArt.flac'; #Remove the album art, save results to a new .flac
> file.
> >> ffmpeg -i '29 My Girl-NoArt.flac' -i '29 My Girl.png' -map:v 0 -metadata
> >> comment=SomethingOtherThanOther -disposition:v:0 attached_pic -map:a 1
> >> -metadata comment= '29 My Girl-ReArt.flac'; #Add the album art back
> using
> >> the metadata commands as you suggest, and store to yet another .flac
> file.
> >> Error received: [swscaler @ 0x7f9648038000] deprecated pixel format
> >> used, make sure you did set range correctly
> >>
> >>
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> >
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list