Shotcut making recorded videos lag?

Lately, when I upload my footage to edit in Shotcut, there’s definite lag roughly every 30 seconds or so, that lasts about 2 seconds.

Yet when I open this unedited footage in other video players, I can’t see any lag… And annoyingly, this lag is appearing in the exported video.

This wasn’t happening until very recently, and I’ve worked out it’s not a fault of my recording software, so… and it’s only happening in Shotcut, so… I don’t know what exactly is causing this or how to fix this.

Not hugely tech-savy so not sure what other specific details is needed, or if this is occurring to anyone else.

  1. Open one of your clips that exhibits the problem.
  2. Open the Properties panel
  3. Take a screenshot and share it here.
  4. Click on the audio tab
  5. Take a screenshot and share it here.

Also, provide your Shotcut version.

Version 23.11.29, but I only updated today, I noticed this in the previous version also about a week or two ago, but I hadn’t narrowed it down to being a Shotcut issue at the time.

Looks like pretty standard stuff. A couple more things to try:

  • Click the hamburger menu in the properties panel and choose “More Information…”. Paste the output here for us to view.

  • As a test: Click on “Convert…” in the Properties panel and pick any format. Let the conversion complete. Does the converted file still have the problem?

ffprobe output

[streams.stream.0]

index=0

codec_name=h264

codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

profile=High

codec_type=video

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

width=1920

height=1080

coded_width=1920

coded_height=1080

closed_captions=0

film_grain=0

has_b_frames=1

sample_aspect_ratio=1:1

display_aspect_ratio=16:9

pix_fmt=yuv420p

level=42

color_range=tv

color_space=bt709

color_transfer=bt709

color_primaries=bt709

chroma_location=left

field_order=progressive

refs=1

is_avc=true

nal_length_size=4

id=N/A

r_frame_rate=60/1

avg_frame_rate=60/1

time_base=1/1000

start_pts=0

start_time=0:00:00.000000

duration_ts=N/A

duration=N/A

bit_rate=N/A

max_bit_rate=N/A

bits_per_raw_sample=8

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

extradata_size=61

[streams.stream.0.disposition]

default=0

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.0.tags]

DURATION=01:26:16.817000000

[streams.stream.1]

index=1

codec_name=aac

codec_long_name=AAC (Advanced Audio Coding)

profile=LC

codec_type=audio

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

sample_fmt=fltp

sample_rate=48 KHz

channels=2

channel_layout=stereo

bits_per_sample=0

initial_padding=0

id=N/A

r_frame_rate=0/0

avg_frame_rate=0/0

time_base=1/1000

start_pts=0

start_time=0:00:00.000000

duration_ts=N/A

duration=N/A

bit_rate=N/A

max_bit_rate=N/A

bits_per_raw_sample=N/A

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

extradata_size=5

[streams.stream.1.disposition]

default=0

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.1.tags]

title=simple_aac_recording0

DURATION=01:26:16.789000000

[format]

filename=C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Raw Footage/Wet, Session 3+4/2023-11-26 19-52-12.mkv

nb_streams=2

nb_programs=0

format_name=matroska,webm

format_long_name=Matroska / WebM

start_time=0:00:00.000000

duration=1:26:16.817000

size=11.457179 Gibyte

bit_rate=19.010991 Mbit/s

probe_score=100

[format.tags]

ENCODER=Lavf60.3.100

Completed successfully in 00:00:00

Conversion failed. Exit code 28?

ffmpeg version n6.0.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev9, Built by MSYS2 project)
configuration: --prefix=/d/a/shotcut/shotcut/build/Shotcut --disable-static --disable-doc --enable-gpl --enable-version3 --enable-shared --enable-runtime-cpudetect --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libopus --enable-libvpl --enable-libdav1d --enable-libaom --disable-decoder=libaom_av1 --enable-libwebp --disable-vulkan --disable-vaapi --enable-libzimg --enable-libvmaf --disable-w32threads
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[h264 @ 0000026a2419ea00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0000026a2419ea00] Increasing reorder buffer to 1
Input #0, matroska,webm, from ‘C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Raw Footage/Wet, Session 3+4/2023-11-26 19-52-12.mkv’:
Metadata:
ENCODER : Lavf60.3.100
Duration: 01:26:16.82, start: 0.000000, bitrate: 19010 kb/s
Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn
Metadata:
DURATION : 01:26:16.817000000
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
Metadata:
title : simple_aac_recording0
DURATION : 01:26:16.789000000
Stream mapping:
Stream #0:0#0:0 (h264 (native) → dnxhd (native))
Stream #0:1#0:1 (aac (native) → pcm_f32le (native))
Press [q] to stop, [?] for help
[h264 @ 0000026a2600ebc0] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0000026a25fc8b00] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[format_out_0_1 @ 0000026a26123bc0] auto-inserting filter ‘auto_aresample_0’ between the filter ‘Parsed_anull_0’ and the filter ‘format_out_0_1’
[auto_aresample_0 @ 0000026a26123e80] ch:2 chl:stereo fmt:fltp r:48000Hz → ch:2 chl:stereo fmt:flt r:48000Hz
[Parsed_scale_0 @ 0000026a26206440] w:iw h:ih flags:‘accurate_rnd+full_chroma_inp+full_chroma_int’ interl:0
[graph 0 input from stream 0:0 @ 0000026a261c06c0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000 fr:60/1 sar:1/1
[Parsed_scale_0 @ 0000026a26206440] w:1920 h:1080 fmt:yuv420p sar:1/1 → w:1920 h:1080 fmt:yuv422p sar:1/1 flags:0x00046000
Output #0, mov, to ‘C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Edited or Finished/2023-11-26 19-52-12 - Converted.mov’:
Metadata:
encoder : Lavf60.3.100
Stream #0:0: Video: dnxhd (DNXHR HQ), 1 reference frame (AVdh / 0x68645641), yuv422p(tv, bt709, progressive, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 15360 tbn
Metadata:
DURATION : 01:26:16.817000000
encoder : Lavc60.3.100 dnxhd
Stream #0:1: Audio: pcm_f32le (fl32 / 0x32336C66), 48000 Hz, stereo, flt, 3072 kb/s
Metadata:
title : simple_aac_recording0
DURATION : 01:26:16.789000000
encoder : Lavc60.3.100 pcm_f32le
av_interleaved_write_frame(): No space left on device
[out#0/mov @ 0000026a241977c0] Error muxing a packet
[out#0/mov @ 0000026a241977c0] Terminating muxer thread
No more output streams to write to, finishing.
[out#0/mov @ 0000026a241977c0] Error writing trailer: No space left on device
video:178222464kB audio:1243368kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Raw Footage/Wet, Session 3+4/2023-11-26 19-52-12.mkv):
Input stream #0:0 (video): 198943 packets read (7779690235 bytes); 198928 frames decoded;
Input stream #0:1 (audio): 155423 packets read (81627765 bytes); 155423 frames decoded (159153152 samples);
Total: 354366 packets (7861318000 bytes) demuxed
Output file #0 (C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Edited or Finished/2023-11-26 19-52-12 - Converted.mov):
Output stream #0:0 (video): 198926 frames encoded; 198909 packets muxed (182499803136 bytes);
Output stream #0:1 (audio): 155423 frames encoded (159153152 samples); 155421 packets muxed (1273208832 bytes);
Total: 354330 packets (183773011968 bytes) muxed
[AVIOContext @ 0000026a2600e280] Statistics: 183772119076 bytes written, 24 seeks, 701065 writeouts
Terminating demuxer thread 0
[AVIOContext @ 0000026a2595c040] Statistics: 7864130585 bytes read, 0 seeks
Conversion failed!
Failed with exit code -28

av_interleaved_write_frame(): No space left on device

Your device is out of space. I failed to mention that the converted file will be pretty big. Since this is a test, you can choose the “good” quality format to keep the size down (if you did not do this already). Otherwise, use a shorter file to test with or free up some space on your storage device.

I’ve cut a clip where I know the lag occured. In the cut clip, the lag has moved to a different part of the clip (By that I mean, in the moment where there was lag in the big clip, it’s completely smooth, but further along, the lag returns)

I’m converting this clip now. Here’s the properties for the unconverting/converting clip.

ffprobe output

[streams.stream.0]

index=0

codec_name=h264

codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

profile=High

codec_type=video

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

width=1920

height=1080

coded_width=1920

coded_height=1080

closed_captions=0

film_grain=0

has_b_frames=1

sample_aspect_ratio=1:1

display_aspect_ratio=16:9

pix_fmt=yuv420p

level=42

color_range=tv

color_space=bt709

color_transfer=bt709

color_primaries=bt709

chroma_location=left

field_order=progressive

refs=1

is_avc=true

nal_length_size=4

id=N/A

r_frame_rate=60/1

avg_frame_rate=60/1

time_base=1/1000

start_pts=0

start_time=0:00:00.000000

duration_ts=N/A

duration=N/A

bit_rate=N/A

max_bit_rate=N/A

bits_per_raw_sample=8

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

extradata_size=61

[streams.stream.0.disposition]

default=0

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.0.tags]

DURATION=01:26:16.817000000

[streams.stream.1]

index=1

codec_name=aac

codec_long_name=AAC (Advanced Audio Coding)

profile=LC

codec_type=audio

codec_tag_string=[0][0][0][0]

codec_tag=0x0000

sample_fmt=fltp

sample_rate=48 KHz

channels=2

channel_layout=stereo

bits_per_sample=0

initial_padding=0

id=N/A

r_frame_rate=0/0

avg_frame_rate=0/0

time_base=1/1000

start_pts=0

start_time=0:00:00.000000

duration_ts=N/A

duration=N/A

bit_rate=N/A

max_bit_rate=N/A

bits_per_raw_sample=N/A

nb_frames=N/A

nb_read_frames=N/A

nb_read_packets=N/A

extradata_size=5

[streams.stream.1.disposition]

default=0

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.1.tags]

title=simple_aac_recording0

DURATION=01:26:16.789000000

[format]

filename=C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Raw Footage/Wet, Session 3+4/2023-11-26 19-52-12.mkv

nb_streams=2

nb_programs=0

format_name=matroska,webm

format_long_name=Matroska / WebM

start_time=0:00:00.000000

duration=1:26:16.817000

size=11.457179 Gibyte

bit_rate=19.010991 Mbit/s

probe_score=100

[format.tags]

ENCODER=Lavf60.3.100

Completed successfully in 00:00:00

I just noticed that your clip is 90 minutes. You will definitely want to test with a shorter clip.

I also wonder if you could share the configuration settings of your recording device/software. In particular, I would want to know the GOP size. Maybe that is shown in a configuration screen somewhere. We have some other people on this forum that have experience with video recording/capture. Maybe they could give you some advice on the best setting to use.

This is a shorter clip, and hopefully the right one. This was also the converted file, and still has lag.

ffprobe output

[streams.stream.0]

index=0

codec_name=h264

codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

profile=High

codec_type=video

codec_tag_string=avc1

codec_tag=0x31637661

width=1920

height=1080

coded_width=1920

coded_height=1080

closed_captions=0

film_grain=0

has_b_frames=0

sample_aspect_ratio=1:1

display_aspect_ratio=16:9

pix_fmt=yuv420p

level=42

color_range=tv

color_space=bt709

color_transfer=bt709

color_primaries=bt709

chroma_location=left

field_order=progressive

refs=1

is_avc=true

nal_length_size=4

id=0x1

r_frame_rate=60/1

avg_frame_rate=60/1

time_base=1/15360

start_pts=0

start_time=0:00:00.000000

duration_ts=4659712

duration=0:05:03.366667

bit_rate=51.949407 Mbit/s

max_bit_rate=N/A

bits_per_raw_sample=8

nb_frames=18202

nb_read_frames=N/A

nb_read_packets=N/A

extradata_size=48

[streams.stream.0.disposition]

default=1

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.0.tags]

language=und

handler_name=VideoHandler

vendor_id=[0][0][0][0]

encoder=Lavc60.3.100 libx264

[streams.stream.1]

index=1

codec_name=ac3

codec_long_name=ATSC A/52A (AC-3)

profile=unknown

codec_type=audio

codec_tag_string=ac-3

codec_tag=0x332d6361

sample_fmt=fltp

sample_rate=48 KHz

channels=2

channel_layout=stereo

bits_per_sample=0

initial_padding=0

id=0x2

r_frame_rate=0/0

avg_frame_rate=0/0

time_base=1/48000

start_pts=0

start_time=0:00:00.000000

duration_ts=14571792

duration=0:05:03.579000

bit_rate=512 Kbit/s

max_bit_rate=N/A

bits_per_raw_sample=N/A

nb_frames=9487

nb_read_frames=N/A

nb_read_packets=N/A

[streams.stream.1.disposition]

default=1

dub=0

original=0

comment=0

lyrics=0

karaoke=0

forced=0

hearing_impaired=0

visual_impaired=0

clean_effects=0

attached_pic=0

timed_thumbnails=0

captions=0

descriptions=0

metadata=0

dependent=0

still_image=0

[streams.stream.1.tags]

language=und

handler_name=SoundHandler

vendor_id=[0][0][0][0]

[streams.stream.1.side_data_list.side_data.0]

side_data_type=Audio Service Type

service_type=0

[format]

filename=C:/Users/tbbsp/OneDrive/Documents/TBBS Plays/Footage/Edited or Finished/2023-11-26 19-52-12 - Converted - Converted.mp4

nb_streams=2

nb_programs=0

format_name=mov,mp4,m4a,3gp,3g2,mj2

format_long_name=QuickTime / MOV

start_time=0:00:00.000000

duration=0:05:03.579000

size=1.852995 Gibyte

bit_rate=52.431512 Mbit/s

probe_score=100

[format.tags]

major_brand=isom

minor_version=512

compatible_brands=isomdby1iso2avc1mp41

encoder=Lavf60.3.100

Completed successfully in 00:00:00

I’m not massively tech-savy, I’ve pretty much stuck with default settings as far as I know. I use OBS to record. I’m not even sure what the GOP is or where I could find it?

I don’t see a GOP setting. In the Video settings, there is an option to choose the Video Encoder. You could try to make a test with the different encoders and see if any of them work better.

We have some other OBS users on this forum. Hopefully some of them chime in with tips about what works best for them.

I’ve honestly been bouncing around whether it’s an OBS issue or a Shotcut issue… I’ve been on the OBS discord and they can’t seem to find any fault in my logs. The fact that I’ve watched where the lag occurred change when I cut the large clip down into a smaller one just makes me think it’s more likely to be a Shotcut issue, but… I honestly don’t know.

I’ll await input from any other users and suggestions but thanks for your assistance thus far :slight_smile:

I have always left this at 0.

I have always recorded to an internal SSD. Never to OneDrive.
There is Remuxer tool within OBS to convert MKV files to MP4.
2023-12-02_14-20-51

This topic was automatically closed after 90 days. New replies are no longer allowed.