[Cin] Test rendering whit x265

Andrew Randrianasulu randrianasulu at gmail.com
Tue Aug 3 15:25:11 CEST 2021


On Tuesday, August 3, 2021, Andrew Randrianasulu <randrianasulu at gmail.com>
wrote:

>
>
> On Tuesday, August 3, 2021, Andrea paz <gamberucci.andrea at gmail.com>
> wrote:
>
>> The difference between appimage and build is that the former uses
>> ffmpeg-4.3 and the latter ffmpeg-4.4. There is a small difference
>> between the 2 renders, see mediainfo test-1.txt (appimage) and
>> test-2.txt (build). It seems that ffmpeg-4.3 is more accurate. The
>> real video source has 7500 frame (5min 0sec at 25 fps)!
>
>
>
> yeah, it seems last or 1 or 2 sec of stream is lost (
>
> bad...
>
> i'll look into ffmpeg's mail list and other projects to see if there
> anything easy enough to fix.
>


I tried to slightly alter condition in FFStream::encode_frame

now it does not display flush errors at the end of encoding... if encode
was much faster than timeline fps (still with 4.4)

problem is, for me encoded avi/mov actually have correct number of frames,
i checked with mediainfo and internal cingg info window.. but i am on
32-bit arm machine...





>
> for now it seems upgrade to 4.4 still not good idea...
>
>
>
>> (Note: as usual, I can't install ydiff, sorry!
>> [paz at arch-paz cinelerra-5.1]$ make ydiff
>> make: ***  No rules for generating the "ydiff" target.  Arrest.)
>>
>> PS: I think most users don't look at the messages on the terminal:
>> appimage you have to specify it if you want to run from shell. If you
>> compile from terminal, having multiple messages should not be a
>> problem. In my opinion we can leave the messages without hiding them.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210803/b05908c2/attachment.htm>
-------------- next part --------------
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index b51fe5f7..d1eb4da2 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -14,7 +14,7 @@
 #ifndef INT64_MAX
 #define INT64_MAX 9223372036854775807LL
 #endif
-#define MAX_RETRY 1000
+#define MAX_RETRY 4000
 // max pts/curr_pos drift allowed before correction (in seconds)
 #define AUDIO_PTS_TOLERANCE 0.04
 
@@ -608,7 +608,8 @@ int FFStream::encode_frame(AVFrame *frame)
 		if( ret < 0 && ret != AVERROR(EAGAIN) ) break;
 		FFPacket opkt;
 		ret = avcodec_receive_packet(avctx, opkt);
-		if( !frame && ret == AVERROR_EOF ) return pkts;
+		if( !frame && (ret == AVERROR_EOF) || (ret == AVERROR(EAGAIN)))
+		return pkts;
 		if( ret < 0 ) break;
 		ret = write_packet(opkt);
 		if( ret < 0 ) break;
@@ -627,7 +628,7 @@ int FFStream::flush()
 {
 	if( writing < 0 )
 		return -1;
-	int ret = encode_frame(0);
+	int ret = encode_frame(NULL);
 	if( ret >= 0 && stats_fp ) {
 		ret = write_stats_file();
 		close_stats_file();


More information about the Cin mailing list