[FFmpeg-user] KLV in ffmpeg

Mar Andrés López mar.andres.l at gmv.com
Mon Oct 5 18:56:09 EEST 2020


Dear Devin,


The video I was using was somehow corrupted, I was not allowed to send you the original one.

So I tried with the first command I have sent to you and a valid video and I was able to see the klv in my klv player.


The output from that corrupted video was:


[cid:3e12ad63-5d00-4907-84ab-2806ccaba44c]


As you see the KLV is present in Stream 0:1. But when I put it into the klv video player the metadata was not appearing. I was able to discover that this is probably a timestamps problem. And by using the options

-fflags +genpts -r 60

mentioned here:


https://superuser.com/questions/1159056/ffmpeg-recreate-timestamps-without-reencoding/1358974


I was able to reproduce the klv but it still was doing strange things, not reproducing it accordingly to the video and stopping at a certain time.


But from the moment I can "survive" with the valid klv video that was given recently to me. On the other hand with the corrupted video I was able to see the klv before processing it with ffmpeg  and after processing it, not. This is the doubt I am still having.


A lot of thanks.

________________________________
De: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> en nombre de Devin Heitmueller <devin.heitmueller at ltnglobal.com>
Enviado: jueves, 24 de septiembre de 2020 15:56:55
Para: FFmpeg user questions
Asunto: Re: [FFmpeg-user] KLV in ffmpeg

Hello Mar,

I took a look at the sample you sent me privately, and it looks like
the KLV data is present in the output file (using the command line you
specified in your original email).

Could you run the following and provide the output:

ffprobe -show_packets out.mpg |grep stream_index=1|wc

(where out.mpg is the transcoded file you generated with your original
command).  That will tell us whether there are any KLV packets at all
in the output stream.

I am testing with the current ffmpeg master.  Have you tried building
the latest version of ffmpeg from source?  What version of ffmpeg are
you using?

Is the KLV data present in the output if you don't specify the -ss
argument?  For example:

ffmpeg -i video.mpg -map 0 -c copy -f mpegts out.mpg

Devin

On Wed, Sep 23, 2020 at 7:49 AM Mar Andrés López <mar.andres.l at gmv.com> wrote:
>
> Dear all,
>
> I guess I found the problem why it was not working. My KLV stream is the stream 1
> See the log,
> [mpegts @ 0000026b6a21c380] start time for stream 1 is not set in estimate_timings_from_pts
>
> How can I set the start time just for the stream 1??
>
> >>ffmpeg -i testklv.mpg
> ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
>   built with gcc 9.3.1 (GCC) 20200621
>   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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> [mpegts @ 0000026b6a21c380] start time for stream 1 is not set in estimate_timings_from_pts
> Input #0, mpegts, from 'testklv.mpg':
>   Duration: 00:00:04.00, start: 1.960000, bitrate: 4574 kb/s
>   Program 1
>     Metadata:
>       service_name    : Service01
>       service_provider: FFmpeg
>     Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1024x768 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 1130496 vbv_delay: N/A
>     Stream #0:1[0x101]: Data: klv (KLVA / 0x41564C4B)
>
>
> ________________________________
> De: Mar Andrés López
> Enviado: miércoles, 23 de septiembre de 2020 11:11:24
> Para: ffmpeg-user at ffmpeg.org
> Asunto: KLV in ffmpeg
>
>
> Dear all,
>
>
> I am having so many issues trying to clip a video with KLV. When I edit a video with KLV I lose the KLV.
>
>
> I have read about -map 0 option, from my understading it copies all the streams of a video from the input 0.
>
>
> The command I have tried and it is not working is the following:
>
>
> ffmpeg -ss 00:01:00.000 -t 00:04:00.000 -re -i video.mpg -map 0 -c copy -f mpegts out.mpg
>
>
> When I use a video player that displays KLV the KLV is not displayed for out.mpg,
>
>
> ¿Do you have any help please?
>
>
> A lot of thanks.
>
>
>
>
> P Please consider the environment before printing this e-mail.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ffmpeg.org_mailman_listinfo_ffmpeg-2Duser&d=DwIGaQ&c=CIoxZ4z5BqFvKvSGFOTo726QZIiNTc_M9CmngT-Pla4&r=6hC3rvTBWUFDzy12mBL-ibcRFc1EHXzwjcFCetQx-fY&m=O2_lPeE8OSCruQqlFr-N5Xgudin72bTbZTANv8ijfYM&s=nefatY5olNJn6YDOGu92lMCdRFTR8LhYAN0c5Ldn8Yk&e=
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



--
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://urldefense.proofpoint.com/v2/url?u=https-3A__ltnglobal.com&d=DwIGaQ&c=CIoxZ4z5BqFvKvSGFOTo726QZIiNTc_M9CmngT-Pla4&r=6hC3rvTBWUFDzy12mBL-ibcRFc1EHXzwjcFCetQx-fY&m=O2_lPeE8OSCruQqlFr-N5Xgudin72bTbZTANv8ijfYM&s=TCZuQD4P7lDGauLX_xHsJszClhYmko_1fVSPY4UzYK0&e=   e: devin.heitmueller at ltnglobal.com
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__ffmpeg.org_mailman_listinfo_ffmpeg-2Duser&d=DwIGaQ&c=CIoxZ4z5BqFvKvSGFOTo726QZIiNTc_M9CmngT-Pla4&r=6hC3rvTBWUFDzy12mBL-ibcRFc1EHXzwjcFCetQx-fY&m=O2_lPeE8OSCruQqlFr-N5Xgudin72bTbZTANv8ijfYM&s=nefatY5olNJn6YDOGu92lMCdRFTR8LhYAN0c5Ldn8Yk&e=

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

P Please consider the environment before printing this e-mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 303619 bytes
Desc: pastedImage.png
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20201005/0a456bca/attachment.png>


More information about the ffmpeg-user mailing list