正在上传图片(0/1)

AIR3 4K60 LRF文件丢失最后一帧

 0
手机看帖 1 63
型号 MAVIC AIR3  
固件 01.00.1300
今天拷贝素材后新建一个Proxy文件夹并放入对应lrf文件,并重命名成.mp4后,导入Davinci Resolve Studio成功自动关联了代理文件。但是我发现有一般文件无法被关联。尝试手动关联后提示 "please select a proxy clip with a matching framerate and overlapping timecode"。
经检查,代理文件和源文件帧率匹配,但是时长不匹配:源文件比代理文件市场长一点。
利用命令 `ffprobe -show_frames ..\DJI_20240627170706_0061_D.MP4  > original.txt` 分别导出代理文件和源文件的时间戳后发现所有时间戳都能对应,唯一的区别是源文件的最后一帧没有出现在代理文件中。比如
代理文件的最后一帧:
```
[FRAME]
media_type=video
stream_index=0
key_frame=0
pts=3218215
pts_time=53.636917
pkt_dts=3218215
pkt_dts_time=53.636917
best_effort_timestamp=3218215
best_effort_timestamp_time=53.636917
pkt_duration=1001
pkt_duration_time=0.016683
duration=1001
duration_time=0.016683
pkt_pos=115632174
pkt_size=33904
width=1280
height=720
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=3215
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]
```
而源文件的最后两帧是
```
[FRAME]
media_type=video
stream_index=0
key_frame=0
pts=3218215
pts_time=53.636917
pkt_dts=3218215
pkt_dts_time=53.636917
best_effort_timestamp=3218215
best_effort_timestamp_time=53.636917
pkt_duration=1001
pkt_duration_time=0.016683
duration=1001
duration_time=0.016683
pkt_pos=904465291
pkt_size=234112
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pts=3219216
pts_time=53.653600
pkt_dts=3219216
pkt_dts_time=53.653600
best_effort_timestamp=3219216
best_effort_timestamp_time=53.653600
pkt_duration=1001
pkt_duration_time=0.016683
duration=1001
duration_time=0.016683
pkt_pos=904709589
pkt_size=234264
width=3840
height=2160
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p10le
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]
```
可以看出源文件的最后一帧的时间戳是在代理文件中不存在的,导致Davinci Resolve不支持本文件的导入。而代理文件如果在这里无法使用就很大程度上失去它的功能。希望DJI技术定位一下本问题。如果需要提供视频源文件、代理LRF文件或其他数据请联系我。
谢谢。
----------------------------------------------------------------------------
如果有朋友有一样的问题,可以先把lrf文件拷贝到Proxy子目录后重命名为.mp4(保证源文件和代理文件名字一样),然后运行这个bat脚本来删掉最后一帧,方法是把*源文件* 作为脚本参数放入执行。
例如 `C:\Users\wuyua\Desktop\dji_trim_last_frame.bat D:\AIR3\山尖顶\DJI_20240627170706_0061_D.MP4` 运行后源文件会被重命名为源文件名_original.mp4
```
@echo on
REM Step 1: Read the first argument as the path to a mp4 file.
set "input_file=%~1"
set "filename=%~n1"
set "extension=%~x1"
set "proxy_file=Proxy\%filename%%extension%"

REM Step 2: Use ffprobe to retrieve the timestamp of the proxy file.
for /f "delims=" %%a in ('ffprobe -v error -show_entries format^=duration -of default^=noprint_wrappers^=1:nokey^=1 "%proxy_file%"') do set "duration=%%a"

REM Output the retrieved duration to the
echo Duration of the proxy file is: %duration% seconds

REM Check if the duration is retrieved successfully
if not defined duration (
    echo Error: Could not retrieve duration from "%proxy_file%"
    exit /b 1
)

REM Step 3: Rename the original file by appending the suffix _original.
ren "%input_file%" "%filename%_original%extension%"

REM Step 4: Run ffmpeg to create a new file with the same name as the original.
ffmpeg -i "%filename%_original%extension%" -t %duration% -c copy "%input_file%"

echo Completed successfully.
```
评论
上传
你需要登录之后才能回帖    登录 | 注册
楼主  DJI Avata 2 畅飞套装认证用户 6-28 03:21 2#
如果有朋友有一样的问题,可以先把lrf文件拷贝到Proxy子目录后重命名为.mp4(保证源文件和代理文件名字一样),然后运行这个bat脚本来删掉最后一帧,方法是把*源文件* 作为脚本参数放入执行。 例如 `C:\Users\wuyua\Desktop\dji_trim_last_frame.bat D:\AIR3\山尖顶\DJI_20240627170706_0061_D.MP4`
```
@echo on
REM Step 1: Read the first argument as the path to a mp4 file.
set "input_file=%~1"
set "filename=%~n1"
set "extension=%~x1"
set "proxy_file=Proxy\%filename%%extension%"

REM Step 2: Use ffprobe to retrieve the timestamp of the proxy file.
for /f "delims=" %%a in ('ffprobe -v error -show_entries format^=duration -of default^=noprint_wrappers^=1:nokey^=1 "%proxy_file%"') do set "duration=%%a"

REM Output the retrieved duration to the
echo Duration of the proxy file is: %duration% seconds

REM Check if the duration is retrieved successfully
if not defined duration (
    echo Error: Could not retrieve duration from "%proxy_file%"
    exit /b 1
)

REM Step 3: Rename the original file by appending the suffix _original.
ren "%input_file%" "%filename%_original%extension%"

REM Step 4: Run ffmpeg to create a new file with the same name as the original.
ffmpeg -i "%filename%_original%extension%" -t %duration% -c copy "%input_file%"

echo Completed successfully.
```
皖北茹北北  Osmo Mobile 3认证用户 8 小时前 3#
收藏 点赞 评论
分享至:
回复:
上传
取消 评论
快速回复 返回顶部 返回列表