Re: [FFmpeg-user] mpegts metadata not set
Hello, Am 28.06.2018 um 00:54 schrieb Carl Eugen Hoyos: 2018-06-27 16:28 GMT+02:00, Christian Knoefel | Ilm-Provider : ffmpeg -re -i rtmp://live.net/rtmp/live -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -metadata "service_provider=Some Provider" -metadata "service_name=Some Channel Name" -f rtp_mpegts rtp://127.0.0.1:5000?pkt_size=1316 Complete, uncut console output missing. o.k. Here it is: Call: c:\ffmpeg\ffmpeg-istuff -re -i rtmp://rtmp.cdn.fem-net.de/rtmp/istuff_live -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -f rtp_mpegts -metadata service_provider="Some provider" -metadata service_name="Some Channel" rtp://192.168.1.244:5000?pkt_size=1316 (now i have set metadata after "rtp-mpegts") c:\ffmpeg>ffmpeg -re -i rtmp://rtmp.cdn.fem-net.de/rtmp/istuff_live -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -f rtp_mpegts -metadata service_provider="Some provider" -metadata service_name="Some Channel" rtp://127.0.0.1:5000?pkt_size=1316 ffmpeg version N-91330-ga990184007 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --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-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 18.102 / 56. 18.102 libavcodec 58. 20.103 / 58. 20.103 libavformat 58. 17.100 / 58. 17.100 libavdevice 58. 4.101 / 58. 4.101 libavfilter 7. 25.100 / 7. 25.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0, flv, from 'rtmp://rtmp.cdn.fem-net.de/rtmp/istuff_live': Duration: N/A, start: 0.00, bitrate: N/A Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 1k tbn, 100 tbc [udp @ 01230fc0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) [udp @ 01eeedd20e80] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native)) Stream #0:0 -> #0:1 (aac (native) -> mp2 (native)) Press [q] to stop, [?] for help Output #0, rtp_mpegts, to 'rtp://127.0.0.1:5000?pkt_size=1316': Metadata: service_provider: Some provider service_name : Some Channel encoder : Lavf58.17.100 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 5000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.20.103 mpeg2video Side data: cpb: bitrate max/min/avg: 500/500/500 buffer size: 350 vbv_delay: -1 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s Metadata: encoder : Lavc58.20.103 mp2 frame= 1583 fps= 25 q=2.0 size= 43825kB time=00:01:03.38 bitrate=5663.8kbits/s dup=0 drop=1579 speed=0.999x it brings: c:\ffmpeg>ffprobe rtp://127.0.0.1:5000 ffprobe version N-91330-ga990184007 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --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-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
Re: [FFmpeg-user] mpegts metadata not set
I am experiencing similar issues once I want to name tracks and set language code. Regards. Dragan R. On Mon, Jul 2, 2018 at 11:24 AM, Moritz Barsnick wrote: > On Wed, Jun 27, 2018 at 16:28:26 +0200, Christian Knoefel | Ilm-Provider > wrote: > > Hello, > > Hi Christian, > thanks for providing the info. > > As Carl Eugen mentioned, it's a bug/shortcoming of the rtp_mpegts > muxer. It's not passing the metadata on to the underlying mpegts muxer. > I have created trac ticket #7293 for you[*]. > > A fix for rtpenc_mpegts.c would look *something* like this: > > mpegts_ctx->oformat = mpegts_format; > mpegts_ctx->max_delay = s->max_delay; > +mpegts_ctx->metadata = s->metadata; > for (i = 0; i < s->nb_streams; i++) { > AVStream* st = avformat_new_stream(mpegts_ctx, NULL); > if (!st) > > Note that this fix is probably not fully correct!!! It's just a proof > of concept. I tested it (just with one of your two metadatas), and it > "worked for me" (bug segfaults on exit). > > Moritz > > [*] https://trac.ffmpeg.org/ticket/7293 > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] mpegts metadata not set
On Mon, Jul 02, 2018 at 11:24:18 +0200, Moritz Barsnick wrote: > +mpegts_ctx->metadata = s->metadata; > > Note that this fix is probably not fully correct!!! At a quick glance, av_dict_copy() is probably the way to go, but that's beyond the scope of my current investigations. ;-) Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] mpegts metadata not set
On Wed, Jun 27, 2018 at 16:28:26 +0200, Christian Knoefel | Ilm-Provider wrote: > Hello, Hi Christian, thanks for providing the info. As Carl Eugen mentioned, it's a bug/shortcoming of the rtp_mpegts muxer. It's not passing the metadata on to the underlying mpegts muxer. I have created trac ticket #7293 for you[*]. A fix for rtpenc_mpegts.c would look *something* like this: mpegts_ctx->oformat = mpegts_format; mpegts_ctx->max_delay = s->max_delay; +mpegts_ctx->metadata = s->metadata; for (i = 0; i < s->nb_streams; i++) { AVStream* st = avformat_new_stream(mpegts_ctx, NULL); if (!st) Note that this fix is probably not fully correct!!! It's just a proof of concept. I tested it (just with one of your two metadatas), and it "worked for me" (bug segfaults on exit). Moritz [*] https://trac.ffmpeg.org/ticket/7293 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] mpegts metadata not set
Hello, >/ffmpeg -re -i rtmp://live.net/rtmp/live -vcodec mpeg2video -s 720x576 -r />/25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M />/-maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -metadata />/"service_provider=Some Provider" -metadata "service_name=Some Channel />/Name" -f rtp_mpegts rtp://127.0.0.1:5000?pkt_size=1316 / Complete, uncut console output missing. o.k. here is the complete output: c:\ffmpeg>ffmpeg -re -i rtmp://rtmp.cdn.fem-net.de/rtmp/istuff_live -vcodec mpeg 2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minra te:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -f rtp_mpegts -metadata service_provider="Some provider" -metadata service_name="Some Channel" rtp://127.0.0.1:5000?pkt_size=1316 ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --e nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libblur ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enab le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-li bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable- libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enabl e-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enabl e-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enab le-dxva2 --enable-avisynth libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat58. 12.100 / 58. 12.100 libavdevice58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc55. 1.100 / 55. 1.100 Input #0, flv, from 'rtmp://rtmp.cdn.fem-net.de/rtmp/istuff_live': Duration: N/A, start: 0.00, bitrate: N/A Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x 720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 1k tbn, 100 tbc [udp @ 021e0080] 'circular_buffer_size' option was set but it is not sup ported on this build (pthread support is required) [udp @ 021e0180] 'circular_buffer_size' option was set but it is not sup ported on this build (pthread support is required) Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native)) Stream #0:0 -> #0:1 (aac (native) -> mp2 (native)) Press [q] to stop, [?] for help Output #0, rtp_mpegts, to 'rtp://127.0.0.1:5000?pkt_size=1316': Metadata: service_provider: Some provider service_name: Some Channel encoder : Lavf58.12.100 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9] , q=2-31, 5000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.18.100 mpeg2video Side data: cpb: bitrate max/min/avg: 500/500/500 buffer size: 350 vbv _delay: -1 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s Metadata: encoder : Lavc58.18.100 mp2 frame=8 fps=0.0 q=2.0 size= 94kB time=00:00:00.52 bitrate=1456.9kbits/s frame= 21 fps= 20 q=2.0 size= 450kB time=00:00:01.02 bitrate=3577.5kbits/s frame= 34 fps= 22 q=2.0 size= 797kB time=00:00:01.53 bitrate=4257.0kbits/s frame= 46 fps= 22 q=2.0 size=1130kB time=00:00:02.06 bitrate=4489.4kbits/s frame= 59 fps= 23 q=2.0 size=1491kB time=00:00:02.58 bitrate=4715.1kbits/s frame= 72 fps= 23 q=2.0 size=1854kB time=00:00:03.09 bitrate=4907.9kbits/s frame= 85 fps= 24 q=2.0 size=2213kB time=00:00:03.62 bitrate=5005.8kbits/s frame= 98 fps= 24 q=1.6 size=2600kB time=00:00:04.12 bitrate=5161.3kbits/s frame= 111 fps= 24 q=2.0 size=2948kB time=00:00:04.62 bitrate=5216.0kbits/s frame= 124 fps= 24 q=2.0 size=3296kB time=00:00:05.15 bitrate=5235.5kbits/s frame= 127 fps= 22 q=2.0 size=3380kB time=00:00:05.30 bitrate=5222.3kbits/s frame= 149 fps= 24 q=2.0 size=3989kB time=00:00:06.16 bitrate=5299.6kbits/s frame= 162 fps= 24 q=2.0 size=4353kB time=00:00:06.71 bitrate=5308.1kbits/s frame= 175 fps= 24 q=2.0 size=4713kB time=00:00:07.22 bitrate=5345.5kbits/s frame= 188 fps= 24 q=2.0 size=5072kB time=00:00:07.72 bitrate=5378.1kbits/s frame= 201 fps= 24 q=2.0 size=5435kB time=00:00:08.25 bitrate=5394.3kbits/s frame= 204 fps= 24 q=2.0 Lsize=5552kB time=00:00:08.37 bitrate=5431.3kbits/ returns into: c:\ffmpeg>ffprobe.exe rtp://127.0.0.1:5000 ffprobe version N-91378-g3f953379e1 Copyright (c) 2007-2018 the FFmpeg developer s built with gcc 7.3.0 (GCC) configuration: --enable-gpl --enable-version3
Re: [FFmpeg-user] mpegts metadata not set
2018-06-27 16:28 GMT+02:00, Christian Knoefel | Ilm-Provider : > ffmpeg -re -i rtmp://live.net/rtmp/live -vcodec mpeg2video -s 720x576 -r > 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M > -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -metadata > "service_provider=Some Provider" -metadata "service_name=Some Channel > Name" -f rtp_mpegts rtp://127.0.0.1:5000?pkt_size=1316 Complete, uncut console output missing. This seems to be a limitation / bug in the rtp_mpegts muxer. I don't think there is more than one way to put title and provider into mpegts. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] mpegts metadata not set
On 2018-06-27 at 10:28 AM EDT, Christian Knoefel | Ilm-Provider wrote: Hello, i will remux an ts: ffmpeg -re -i rtmp://live.net/rtmp/live -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -metadata "service_provider=Some Provider" -metadata "service_name=Some Channel Name" -f rtp_mpegts rtp://127.0.0.1:5000?pkt_size=1316 Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native)) Stream #0:0 -> #0:1 (aac (native) -> mp2 (native)) Press [q] to stop, [?] for help Output #0, rtp_mpegts, to 'rtp://127.0.0.1:5000?pkt_size=1316': Metadata: service_provider: Some Provider service_name : Some Channel Name encoder : Lavf58.17.100 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 5000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.20.103 mpeg2video Side data: cpb: bitrate max/min/avg: 500/500/500 buffer size: 350 vbv_delay: -1 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s Metadata: encoder : Lavc58.20.103 mp2 wit ffplay looks like this: Input #0, rtp, from 'rtp://127.0.0.1:5000': 0KB sq= 0B f=0/0 Duration: N/A, start: 91.443144, bitrate: 5192 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:1: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 720x576 [SAR 64:45 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:0: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s Why metadate are not set? it is the newest 64bit windows build... thanks for your suggestion... Christian Hello Christian, I suspect the root problem is this: 1. When FFmpeg (the first call, for transcoding/remuxing), when FFmpeg creates the MPEG TS, where is it putting the "metadata"? The MPEG transport stream protocol is SUPER old, I would be surprised if there were less than a dozen ways to store metadata. 2. When FFplay tries to play back the MPEG TS stream, where is it reading the metadata? Quite likely not the same place. I have no idea. Here are some suggestions: 1. Consider what application you actually want to use for playback, because they will support different types of metadata. VLC, for example, supports VERY LITTLE metadata, which annoys me at times. Even if VLC reads the format for the metadata, it will never show you certain keys, it only shows you a few of the keys. For instance, "Get Info" on VLC usually shows a key "Year" for streaming video, but I know the video has "original air date" (year, month, and day), "copyright date", and possibly other things. And then "Year" is "2018", and that's just not right. That was the encoding year, probably. FFprobe can actually be helpful determining what is going on with things like this if you have no idea (because I have no idea how metadata is stored in MPEG transport streams). 2. MAYBE try putting the -metadata arguments after the "-f rtp_mpegts" argument. Sometimes (often) the order of arguments matters in FFmpeg. I have no idea if that is the case here. Maybe it "processed" -metadata early, when it thought you were going to use a MKV file as the output, and it got that metadata all ready for a MKV file. Then it saw "-f rtp_mpegts" and it threw away the things that go in MKV but not in MPEG TS, and then re-generated some metadata for MPEG TS. This is a wild guess, I would try it. The order of arguments mostly matters when the arguments apply to specific streams (like audio versus video versus the audio commentary). You can specify streams with (colon)(digit), such as -c:v:2, but some arguments do not support that syntax (as far as I know), so you need to put the argument in the group with that whole stream, and the location tells it to go with "2". 3. Before somebody else asks, you might want to include the whole uncut console output, including the "banner" printed by FFmpeg and FFplay that says the configuration options when it was compiled, and so on. I suspect it is not going to be hugely relevant, but you never know. You did say it is the latest Windows build, but these Mailman archives will be around for a long time, and what if you think you are using the latest build because you installed it, but at the hour of typing the command, your PATH variable decided to use an older version of FFmpeg that was lying around somewhere on your hard drive? (There is a nice xkcd comic about having tons of versions of the Python interpreter on one machine, because computers get messy.) Good luck, Zak ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email
[FFmpeg-user] mpegts metadata not set
Hello, i will remux an ts: ffmpeg -re -i rtmp://live.net/rtmp/live -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 10 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 3.5M -acodec mp2 -ac 2 -b:a 192k -metadata "service_provider=Some Provider" -metadata "service_name=Some Channel Name" -f rtp_mpegts rtp://127.0.0.1:5000?pkt_size=1316 Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mpeg2video (native)) Stream #0:0 -> #0:1 (aac (native) -> mp2 (native)) Press [q] to stop, [?] for help Output #0, rtp_mpegts, to 'rtp://127.0.0.1:5000?pkt_size=1316': Metadata: service_provider: Some Provider service_name : Some Channel Name encoder : Lavf58.17.100 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 5000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc58.20.103 mpeg2video Side data: cpb: bitrate max/min/avg: 500/500/500 buffer size: 350 vbv_delay: -1 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s Metadata: encoder : Lavc58.20.103 mp2 wit ffplay looks like this: Input #0, rtp, from 'rtp://127.0.0.1:5000': 0KB sq= 0B f=0/0 Duration: N/A, start: 91.443144, bitrate: 5192 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:1: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 720x576 [SAR 64:45 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:0: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s Why metadate are not set? it is the newest 64bit windows build... thanks for your suggestion... Christian ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".