Audio and video not synchronized on TV

Maybe someone could help me to understand and solve this strange problem.
I’m on Mac OSX capitan and I created and exported a project with Shotcut.
Reading this file on the computer with Quicktime or VLC is no problem, the audio and video are perfectly synchronized.
On the other hand, if I copy this file on a USB key and read it on my Samsung TV, the sound and the image are shifted as I play. After 5 minutes, I have almost 1 second of lag.

Here are the different data of the project.
All source clips are from my Canon camera with this format:
clip%20source

The project was created using this personal profile preset

width=960
height=540
sample_aspect_num=1
sample_aspect_den=1
display_aspect_num=16
display_aspect_den=9
progressive=1
colorspace=709
frame_rate_num=30000
frame_rate_den=1001

The project was exported using this personal export preset

f=mp4
acodec=aac
ar=44100
ab=128k
vcodec=libx264
vb=3,5M
g=150
bf=3
width=960
height=540
aspect=1,77778
progressive=1
top_field_first=0
frame_rate_num=30000
frame_rate_den=1001
threads=0
vpre=medium
preset=medium
movflags=+faststart

I did not well understand in other threads the subtlety between all these parameters
29.97 - 29.970030 - frame_rate_num = 30000 - frame_rate_den = 1001
No doubt that I use in these presets something that the decoder of my TV does not like.

Thanks for your help.

In your preset, you use frame_rate_num and frame_rate_den. These are not read correctly from preset in versions prior to 19.07.07. In any case, that will not matter because it matches your video mode, and Export Frames/sec defaults from the video mode. In the 19.07.07 beta, enter 29.97 into Frames/sec in either the Custom Video Mode dialog or Export > Video, and see what happens. It tells you that 29.97 is very close to the common, standard 30000/1001, which Shotcut shows as 29.970030. Shotcut also needs the field to show 29.970030 to really use 30000/1001. There are some things making 29.97 and not 30000/1001. If people make a 29.97 project from that (using Automatic video mode), I do not want to put Shotcut export into its special frame rate conversion mode unannounced, which increases risk.

As for your problem, I do not have a specific recommendation. Check if the source clip is really 30000/1001. Unfortunately, Shotcut Properties Frame Rate does not show enough digits like elsewhere in the app. I need to change that. You can look in Properties > menu > More Info…
If your file is really 30000/1001, I am not sure what is wrong. You can try exporting from Shotcut as in some intermediate or lossless preset and then use a converter such as Handbrake.

Thanks,Here is the complete info from source

ffprobe output

[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Constrained Baseline
codec_type=video
codec_time_base=1001/60000
codec_tag_string=avc1
codec_tag=0x31637661
width=1280
height=720
coded_width=1280
coded_height=720
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj420p
level=41
color_range=pc
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30000/1001
avg_frame_rate=30000/1001
time_base=1/30000
start_pts=0
start_time=0:00:00.000000
duration_ts=600600
duration=0:00:20.020000
bit_rate=23.583459 Mbit/s
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=600
nb_read_frames=N/A
nb_read_packets=N/A

[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

[streams.stream.0.tags]
creation_time=2018-06-02T09:24:00.000000Z
language=eng

[streams.stream.1]
index=1
codec_name=pcm_s16le
codec_long_name=PCM signed 16-bit little-endian
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=sowt
codec_tag=0x74776f73
sample_fmt=s16
sample_rate=48 KHz
channels=2
channel_layout=stereo
bits_per_sample=16
id=N/A
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=960960
duration=0:00:20.020000
bit_rate=1.536000 Mbit/s
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=960960
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

[streams.stream.1.tags]
creation_time=2018-06-02T09:24:00.000000Z
language=eng

[format]
filename=/Volumes/iMac SSD Stockage/Originaux (Photos et Vidéos)/Originaux NON Traités/Test Shotcut/MVI_2126.MOV
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:00:20.020000
size=60.043106 Mibyte
bit_rate=25.158745 Mbit/s
probe_score=100

[format.tags]
major_brand=qt
minor_version=537331968
compatible_brands=qt CAEP
com.apple.quicktime.make=Canon
com.apple.quicktime.model=Canon PowerShot G15
com.apple.quicktime.rating.user=0.000000
com.apple.quicktime.copyright=
com.apple.quicktime.author=
creation_time=2018-06-02T09:24:00.000000Z
Completed successfully in 00:00:00

Are my video preset correct ?
Perhaps audio ? source 48000, export 44100 ?

What are frame_rate_num and frame_rate_den?

The complete information of one of the source file (with Shotcut Properties > menu > More Info…) are in my last message. (All the source files are made with the same camera with the same presets)

The complete information of the export file (with Shotcut Properties > menu > More Info…) are below

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_time_base=1001/60000
codec_tag_string=avc1
codec_tag=0x31637661
width=960
height=540
coded_width=960
coded_height=544
has_b_frames=2
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p
level=31
color_range=tv
color_space=bt709
color_transfer=bt709
color_primaries=unknown
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30000/1001
avg_frame_rate=30000/1001
time_base=1/30000
start_pts=0
start_time=0:00:00.000000
duration_ts=16865849
duration=0:09:22.194967
bit_rate=1.652654 Mbit/s
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=16849
nb_read_frames=N/A
nb_read_packets=N/A

[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

[streams.stream.0.tags]
language=und
handler_name=VideoHandler

[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/44100
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44.100000 KHz
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0:00:00.000000
duration_ts=24793064
duration=0:09:22.200998
bit_rate=127.496000 Kbit/s
max_bit_rate=128 Kbit/s
bits_per_raw_sample=N/A
nb_frames=24213
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

[streams.stream.1.tags]
language=und
handler_name=SoundHandler

[format]
filename=/Volumes/Stockage/Photothèque Perso/2019-06 Barcelone/Barcelone_1.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:09:22.225000
size=119.883162 Mibyte
bit_rate=1.788701 Mbit/s
probe_score=100

[format.tags]
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41
encoder=Lavf58.20.100
Completed successfully in 00:00:00

It is worth trying 48000. (That is Shotcut’s default.)

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