diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C
index b05a455d..7bad7cd3 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.C
+++ b/cinelerra-5.1/cinelerra/ffmpeg.C
@@ -1304,10 +1304,19 @@ int FFVideoStream::video_seek(int64_t pos)
 	if( pos == curr_pos-1 && !seeked ) return 0;
 // if close enough, just read up to current
 	int gop = avctx->gop_size;
-	if( gop < 4 ) gop = 4;
+	if( gop < 4 && gop != 0) gop = 4;
 	if( gop > 64 ) gop = 64;
+	if( gop == 0 ) gop = 1;
+	//fprintf(stderr, "GOP: %i \n", gop);
 	int read_limit = curr_pos + 3*gop;
 	if( pos >= curr_pos && pos <= read_limit ) return 0;
+	// fixup for I-only codecs, not sure why it needed with ffmpeg 4.2
+	if (st->codecpar->codec_id == AV_CODEC_ID_DVVIDEO || st->codecpar->codec_id == AV_CODEC_ID_MJPEG || 
+	st->codecpar->codec_id == AV_CODEC_ID_FFVHUFF || st->codecpar->codec_id == AV_CODEC_ID_DNXHD ||
+	st->codecpar->codec_id ==AV_CODEC_ID_HUFFYUV || st->codecpar->codec_id == AV_CODEC_ID_PRORES) {
+	gop = 1;
+	if( seek(pos - 2*gop, frame_rate) < 0 ) return -1;
+	}
 // guarentee preload more than 2*gop frames
 	if( seek(pos - 3*gop, frame_rate) < 0 ) return -1;
 	return 1;
@@ -1755,12 +1764,20 @@ int FFVideoConvert::convert_pixfmt(VFrame *frame, AVFrame *op)
 	if( !convert_vframe_picture(frame, op) ) return 1;
 	// use indirect transfer
 	int cmodel = frame->get_color_model();
+	//printf("cmodel from convert_pixfmts %i \n", cmodel);
 	int max_bits = BC_CModels::calculate_pixelsize(cmodel) * 8;
+	//printf("max_bits 1: %i \n", max_bits);
+	//printf("BC_components: %i \n", BC_CModels::components(cmodel));
+	if(BC_CModels::components(cmodel))
 	max_bits /= BC_CModels::components(cmodel);
+	//printf("max_bits %i \n", max_bits);
 	AVPixelFormat ofmt = (AVPixelFormat)op->format;
 	int imodel = pix_fmt_to_color_model(ofmt);
+	//printf("imodel: %i \n", imodel);
 	int imodel_is_yuv = BC_CModels::is_yuv(imodel);
+	//printf("imodel_is_yuv: %i \n", imodel_is_yuv);
 	int cmodel_is_yuv = BC_CModels::is_yuv(cmodel);
+	//printf("cmodel_is_yuv %i \n", cmodel_is_yuv);
 	if( imodel < 0 || imodel_is_yuv != cmodel_is_yuv ) {
 		imodel = cmodel_is_yuv ?
 		    (BC_CModels::has_alpha(cmodel) ?
@@ -1771,7 +1788,28 @@ int FFVideoConvert::convert_pixfmt(VFrame *frame, AVFrame *op)
 			(max_bits > 8 ? BC_RGB161616 : BC_RGB888)) ;
 	}
 	VFrame vframe(frame->get_w(), frame->get_h(), imodel);
-	vframe.transfer_from(frame);
+	
+	if(cmodel == BC_COMPRESSED) {
+	printf("Compressed - no decoding yet! \n");
+	VFrame output_frame(frame->get_w(), frame->get_h(), BC_YUV422P);
+	
+	mjpeg = mjpeg_new(frame->get_w(),frame->get_h(), 1);
+
+	mjpeg_decompress(mjpeg,
+	frame->get_data(),
+	frame->get_compressed_size(),
+	frame->get_field2_offset(),
+	output_frame.get_rows(),
+	output_frame.get_y(),
+	output_frame.get_u(),
+	output_frame.get_v(),
+	output_frame.get_color_model(),
+	1);
+	
+	output_frame.transfer_from(&output_frame);
+	} else {
+	
+	vframe.transfer_from(frame);}
 	if( !convert_vframe_picture(&vframe, op) ) return 1;
 	return -1;
 }
@@ -2717,6 +2755,7 @@ int FFMPEG::init_encoder(const char *filename)
 	ret = get_file_format();
 	if( ret > 0 ) {
 		eprintf(_("bad file format: %s\n"), filename);
+		eprintf( "ret, %i \n", ret);
 		return 1;
 	}
 	if( ret < 0 ) {
diff --git a/cinelerra-5.1/cinelerra/ffmpeg.h b/cinelerra-5.1/cinelerra/ffmpeg.h
index 4f1624ce..53df96f1 100644
--- a/cinelerra-5.1/cinelerra/ffmpeg.h
+++ b/cinelerra-5.1/cinelerra/ffmpeg.h
@@ -15,6 +15,7 @@
 #include "cstrdup.h"
 #include "edl.inc"
 #include "linklist.h"
+#include "libmjpeg.h"
 #include "ffmpeg.inc"
 #include "filebase.inc"
 #include "fileffmpeg.inc"
@@ -235,6 +236,9 @@ public:
 	int convert_vframe_picture(VFrame *frame, AVFrame *op, AVFrame *opic);
 	int convert_pixfmt(VFrame *frame, AVFrame *op);
 	int transfer_pixfmt(VFrame *frame, AVFrame *ofp);
+	
+private:
+	mjpeg_t *mjpeg;
 };
 
 class FFVideoStream : public FFStream, public FFVideoConvert {
@@ -479,6 +483,8 @@ public:
 	const char *ff_hw_dev();
 	Preferences *ff_prefs();
 	void dump_context(AVCodecContext *ctx);
+	
+
 };
 
 #endif /* FFMPEG_H */
