[FFmpeg-devel] Stream with Closed caption does not set appropriate flag

anshul anshul.ffmpeg at gmail.com
Mon Mar 10 07:41:49 CET 2014


On 03/09/2014 09:14 PM, Michael Niedermayer wrote:
> On Sun, Mar 09, 2014 at 08:17:00PM +0530, Anshul wrote:
>>
>> Kieran Kunhya <kierank at obe.tv> wrote:
>>>> but if I am able to parse more info, then we can add some flag at
>>> AvStream  structure.
>>>> showing that there is closed_caption inside that video stream.
>>>>
>>>>
>>>> My question is that, do we have any problem if we increase number of
>>> packets read at time av_find_ stream info?
>>>
>>> Closed captions (at least in broadcast) have to be CBR so the
>>> structure has to be present (but may contain NULL data). Why can you
>>> not just detect this yourself.
>>> _______________________________________________
>> I am able to detect them using libav,but to detect using ffprobe I have to change some functionality of our apis used by ffprobe.
> how can this issue be reproduced ?
>
> [...]

I have uploaded a test video where closed_caption is interlaced inside 
mpeg-2 video  at link
<http://docs.google.com/uc?export=download&id=0B4sMK9Wz9oX3cDRHdko1eldTczQ>
I have also attached the code how i extract raw cc data.

Output of ffprobe
[anshul at daku_daddy cc_ext]$ ffprobe test_5sec.ts
ffprobe version N-61086-g9477512 Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Mar  5 2014 12:53:35 with gcc 4.7 (SUSE Linux)
   configuration: --enable-libfaac --enable-libx264 
--enable-memory-poisoning --enable-memalign-hack --enable-nonfree 
--enable-gpl --enable-libfreetype --disable-optimizations
   libavutil      52. 66.101 / 52. 66.101
   libavcodec     55. 52.102 / 55. 52.102
   libavformat    55. 33.101 / 55. 33.101
   libavdevice    55. 11.100 / 55. 11.100
   libavfilter     4.  2.100 /  4.  2.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'test_5sec.ts':
   Duration: 00:00:06.49, start: 1.433367, bitrate: 9544 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), 1920x1080 [SAR 1:1 DAR 16:9], max. 80000 kb/s, 
29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc

Code that i have attached dump the cc data in a file.

Thanks
Anshul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cc_ext.cpp
Type: text/x-c++src
Size: 2428 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140310/a4694e5a/attachment.bin>


More information about the ffmpeg-devel mailing list