[FFmpeg-devel] Adding Webvtt in hls muxer

Anshul anshul.ffmpeg at gmail.com
Thu Feb 26 12:26:57 CET 2015


On 02/25/2015 10:04 PM, Deron wrote:
> On 2/21/15 8:05 AM, Deron wrote:
>> On 2/15/15 5:44 AM, Anshul wrote:
>>>
>>> attached another cleaned patch.
>>>
>>> -Anshul
>>
>> Not sure if I should be posting here, privately, or do the user list 
>> since it is an unaccepted patch... This patch applies cleanly to 
>> ffmpeg git of that day, and with minor adjustment to current git, but 
>> either crashes the same for me right away. Here is the back trace 
>> from gdb:
>>
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> __GI___libc_realloc (oldmem=0x70, bytes=8) at malloc.c:2977
>> 2977    malloc.c: No such file or directory.
>> (gdb) bt
>> #0  __GI___libc_realloc (oldmem=0x70, bytes=8) at malloc.c:2977
>> #1  0x00007ffff7609b99 in avformat_new_stream (s=s at entry=0xe2dbc0, 
>> c=c at entry=0x0) at libavformat/utils.c:3655
>> #2  0x00007ffff75451c4 in hls_mux_init (s=0x6787c0) at 
>> libavformat/hlsenc.c:194
>> #3  hls_write_header (s=0x6787c0) at libavformat/hlsenc.c:490
>> #4  0x00007ffff75999ec in avformat_write_header (s=s at entry=0x6787c0, 
>> options=0x6a9948) at libavformat/mux.c:406
>> #5  0x0000000000424c00 in transcode_init () at ffmpeg.c:3096
>> #6  0x0000000000407581 in transcode () at ffmpeg.c:3815
>> #7  main (argc=13, argv=0x7fffffffe5a8) at ffmpeg.c:4022
>>
>>
>> The command (I've tried all sorts of combinations. If I don't provide 
>> a subtitle stream, it does not crash. Otherwise it does. Unpatched 
>> can generate a webvtt from the subtitle stream without crashing.)
>>
>> ffmpeg -loglevel debug -f lavfi -i movie=out.ts\[out0+subcc\] -f hls 
>> -hls_segment_filename /var/www/html/stream/kota/v.low.%d.ts 
>> -hls_subtitle_path /var/www/html/stream/kota/ -y 
>> /var/www/html/stream/kota/v.low.m3u8
>>
>
> I did find the problem. The patch does not properly initialize 
> hls->vtt_oformat (etc) if you provide the "-hls_segment_filename" 
> parameter as I have done.
>
> Deron
>
I have attached new patch with correctly initializing the webvtt, can 
you please check this patch again.

-Anshul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adding-WebVtt-implementation-in-hls.patch
Type: text/x-patch
Size: 15112 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150226/b13be883/attachment.bin>


More information about the ffmpeg-devel mailing list