Opened 23 months ago

#6444 new defect

libavformat segment format

Reported by: sante85 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -f rtsp -i rtsp://localhost:1935/live/d2000 -f segment -segment_format webm -strftime 1 -segment_time 60 -force_key_frames "expr:gte(t,n_forced*60)" -segment_start_number 36 -segment_time_delta 0.01 -reset_timestamps 1 -c:v copy -c:a copy /usr/local/d2000_rec_%s%3S_%1d.webm

ffmpeg release 3.3

i want format segment name with double format (timestamp + counter)
I expect that generated name are: /usr/local/d2000_rec_1496763553013_36.webm

we remove '} else if {'

Best Regards


static int set_segment_filename(AVFormatContext *s)
......

if (seg->use_strftime) {

time_t now0;
struct tm *tm, tmpbuf;
time(&now0);
tm = localtime_r(&now0, &tmpbuf);
if (!strftime(oc->filename, sizeof(oc->filename), s->filename, tm)) {

av_log(oc, AV_LOG_ERROR, "Could not get segment filename with strftime\n");
return AVERROR(EINVAL);

}

} else if (av_get_frame_filename(oc->filename, sizeof(oc->filename),

s->filename, seg->segment_idx) < 0) {

av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", s->filename);
return AVERROR(EINVAL);

}

.....

Change History (0)

Note: See TracTickets for help on using tickets.