[Libav-user] libavcodec usage inside Cinelerra-GG [LONG]
Andrew Randrianasulu
randrianasulu at gmail.com
Sun Nov 3 12:53:12 EET 2019
В сообщении от Sunday 03 November 2019 13:56:09 Carl Eugen Hoyos написал(а):
> Am So., 3. Nov. 2019 um 11:53 Uhr schrieb Andrew Randrianasulu
> <randrianasulu at gmail.com>:
>
> > For what exactly I should look?
>
> You claim that AVStream->time_base is changing (which sounds strange to me
> but who know) on seeking, you could look (with printf's) how ffmpeg.c
> deals with this.
> I cannot know...
https://www.cinelerra-gg.org/bugtracker/view.php?id=330
after such mod:
int FFStream::seek(int64_t no, double rate)
{
// default ffmpeg native seek
int npkts = 1;
int64_t pos = no, pkt_pos = -1;
IndexMarks index_markers = get_markers();
if( index_markers && index_markers->size() > 1 ) {
IndexMarks &marks = index_markers;
int i = marks.find(pos);
int64_t n = i < 0 ? (i=0) : marks[i].no;
// if indexed seek point not too far away (<30 secs), use index
if( no-n < 30rate ) {
if( n < 0 ) n = 0;
pos = n;
if( i < marks.size() ) pkt_pos = marks[i].pos;
npkts = MAX_RETRY;
}
}
if( pos == curr_pos ) return 0;
double secs = pos < 0 ? 0. : pos / rate;
AVRational time_base = st->time_base;
AVRational time_base2 = av_inv_q(avctx->framerate);
fprintf(stderr, "Timebase from stream: %i,%i \n", time_base.num, time_base.den);
fprintf(stderr, "Timebase from codec: %i,%i \n", time_base2.num, time_base2.den);
int64_t tstmp = time_base.num > 0 ? secs time_base.den/time_base.num : 0;
int64_t tstmp2 = av_rescale_q(tstmp, time_base, AV_TIME_BASE_Q);
if (time_base.den != time_base2.den) {
//fprintf (stderr, "timebases for stream and code differ!\n");
//fprintf (stderr, "Timestamps tstmp, tstmp2: %jd,%jd \n", tstmp, tstmp2);
//fprintf (stderr, "using default 25 fps ones!\n");
//tstmp = secs * 25;
}
I see this output:
LANG=ru_RU.utf8 /dev/shm/tmp/cinelerra-goodguy-20191029/cinelerra-5.1/bin/cin
Cinelerra Infinity - built: Oct 29 2019 11:57:50
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams
(c) 2007-2019 cin5 derivative by W.P. Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
Device type none is not supported.
Available device types: vdpau cuda vaapi opencl
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
Device type none is not supported.
Available device types: vdpau cuda vaapi opencl
Timebase from stream: 1,25
Timebase from codec: 1,0
Timebase from stream: 1,25
Timebase from codec: 1,0
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
Device type none is not supported.
Available device types: vdpau cuda vaapi opencl
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
Timebase from stream: 1,25
Timebase from codec: 1,25
Timebase from stream: 1,25
Timebase from codec: 1,25
FFMPEG::open_decoder: some stream times estimated: /home/guest/botva/Downloads/from_Vladimir/Leningrad dolphinarium 16 09 2009/LD_160909_2.avi
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Timebase from stream: 1,30000
Timebase from codec: 1,0
Session time: 0:00:47
You can try to build whole thing too :} (120Mb for git copy with -depth 1)
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
More information about the Libav-user
mailing list