can't remove metadata

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

can't remove metadata

Alexander Machev
I'm trying to disable copying of the "service_provider", "service_name" and
"service_type" metadata entries and prevent ffmpeg to set its default
values for them (Service01, FFmpeg, digital television) while remuxing to a
new MPEG-TS container.
 ts_sample_with_metadata.ts
<https://drive.google.com/file/d/17FRtCjP15bDEwKJ7H7Mm4ClEz2EzgOJI/view?usp=drive_web>

According to the docs using -metadata with empty values should do the
trick, however it won't work

Any ideas what's' wrong ?


>> ffmpeg -y -i "E:\ts_sample_with_metadata.ts" -c:v copy -c:a copy
-metadata service_provider="" -metadata service_name="" -metadata
service_type=""  "E:\ts_sample_without_metadata.ts"

ffmpeg version git-2020-02-09-5ad1c1a Copyright (c) 2000-2020 the FFmpeg
developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 75.100 /  7. 75.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mpegts, from 'E:\ts_sample_with_metadata.ts':
  Duration: 00:00:52.82, start: 43663.998044, bitrate: 11790 kb/s
  Program 1156
    Metadata:
      service_name    : BNT 2 HD
      service_provider: ss
    Stream #0:0[0x619]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn,
50 tbc
    Stream #0:1[0x61a](bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 256 kb/s
Output #0, mpegts, to 'E:\ts_sample_without_metadata.ts':
  Metadata:
    encoder         : Lavf58.38.100
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k
tbc
    Stream #0:1(bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
fltp, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1321 fps=1222 q=-1.0 Lsize=   75759kB time=00:00:52.80
bitrate=11754.0kbits/s speed=48.8x
video:72063kB audio:1651kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 2.774872%
_______________________________________________
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: can't remove metadata

kumowoon1025
Hi,

> According to the docs using -metadata with empty values should do the
> trick, however it won't work
>
> Any ideas what's' wrong ?
>
>
>> ffmpeg -y -i "E:\ts_sample_with_metadata.ts" -c:v copy -c:a copy
>> -metadata service_provider="" -metadata service_name="" -metadata
>> service_type=""  "E:\ts_sample_without_metadata.ts”
...

> Input #0, mpegts, from 'E:\ts_sample_with_metadata.ts':
>  Duration: 00:00:52.82, start: 43663.998044, bitrate: 11790 kb/s
>  Program 1156
>    Metadata:
>      service_name    : BNT 2 HD
>      service_provider: ss
>    Stream #0:0[0x619]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn,
> 50 tbc
>    Stream #0:1[0x61a](bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo, fltp, 256 kb/s
> Output #0, mpegts, to 'E:\ts_sample_without_metadata.ts':
>  Metadata:
>    encoder         : Lavf58.38.100
>    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
> first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k
> tbc
>    Stream #0:1(bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
> fltp, 256 kb/s

It looks like it worked to me? Is the metadata still there when you inspect the new file?

Regards,
Ted Park

_______________________________________________
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: can't remove metadata

Alexander Machev
Hi,

It's replaced by the ffmpeg's default values and that's what I'm trying to
avoid. I want to completely get rid of these things:
https://prnt.sc/rfhi5k

On Thu, Mar 12, 2020 at 8:43 PM Ted Park <[hidden email]> wrote:

> Hi,
>
> > According to the docs using -metadata with empty values should do the
> > trick, however it won't work
> >
> > Any ideas what's' wrong ?
> >
> >
> >> ffmpeg -y -i "E:\ts_sample_with_metadata.ts" -c:v copy -c:a copy
> >> -metadata service_provider="" -metadata service_name="" -metadata
> >> service_type=""  "E:\ts_sample_without_metadata.ts”
> ...
> > Input #0, mpegts, from 'E:\ts_sample_with_metadata.ts':
> >  Duration: 00:00:52.82, start: 43663.998044, bitrate: 11790 kb/s
> >  Program 1156
> >    Metadata:
> >      service_name    : BNT 2 HD
> >      service_provider: ss
> >    Stream #0:0[0x619]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> > yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k
> tbn,
> > 50 tbc
> >    Stream #0:1[0x61a](bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> > stereo, fltp, 256 kb/s
> > Output #0, mpegts, to 'E:\ts_sample_without_metadata.ts':
> >  Metadata:
> >    encoder         : Lavf58.38.100
> >    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
> > first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn,
> 90k
> > tbc
> >    Stream #0:1(bul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo,
> > fltp, 256 kb/s
>
> It looks like it worked to me? Is the metadata still there when you
> inspect the new file?
>
> Regards,
> Ted Park
>
> _______________________________________________
> 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: can't remove metadata

kumowoon1025
Hi,

> It's replaced by the ffmpeg's default values and that's what I'm trying to
> avoid. I want to completely get rid of these things:
> https://prnt.sc/rfhi5k

I wonder if it’s impossible… As you say, if you leave it blank, it gets filled with the default values, but you can fake it by typing a space in the field. The tag will still show up with no value.
% ffmpeg -y -i "E:\ts_sample_with_metadata.ts" -c copy -program program_num=0x1111:st=0:st=1 -metadata:p:0 service_name=" " -metadata:p:0 service_provider=" "  "E:\ts_sample_without_metadata.ts"

Regards,
Ted Park

_______________________________________________
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: can't remove metadata

Carl Eugen Hoyos-2
In reply to this post by Alexander Machev
Am Do., 12. März 2020 um 19:40 Uhr schrieb Alexander Machev
<[hidden email]>:

> I'm trying to disable copying of the "service_provider", "service_name" and
> "service_type" metadata entries and prevent ffmpeg to set its default
> values for them (Service01, FFmpeg, digital television) while remuxing to a
> new MPEG-TS container.

I suspect a valid mpeg transport stream needs a provider and service name.

Carl Eugen
_______________________________________________
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".