Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artefacts in rendering #8

Open
1 task done
Pairan opened this issue Mar 12, 2023 · 1 comment
Open
1 task done

Artefacts in rendering #8

Pairan opened this issue Mar 12, 2023 · 1 comment
Labels
bug Something isn't working corrupt file Issue is caused by a corrupt input file

Comments

@Pairan
Copy link

Pairan commented Mar 12, 2023

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Software version

v0.1.0-beta1

What operating system are you using?

MacOs Ventura 13.2

What GPU are you using?

Apple

What problem did you encounter?

The rendering sometimes have artefacts like

image

Link to screenshots

No response

Link to video, OSD and font files

No response

Log output

-03-11T07:19:35.238674Z  INFO walksnail_osd_tool: App started (version: v0.1.0-beta1-3f661bf, compiled with: rustc 1.68.0 (2c8cc3432 2023-03-06), target: aarch64-apple-darwin)
2023-03-11T07:19:35.261641Z  INFO ffmpeg_available: walksnail_osd_tool::ffmpeg::dependencies: return=true ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg"
2023-03-11T07:19:35.261706Z  INFO ffmpeg_available: walksnail_osd_tool::ffmpeg::dependencies: close time.busy=22.7ms time.idle=2.67µs ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg"
2023-03-11T07:19:35.281551Z  INFO ffprobe_available: walksnail_osd_tool::ffmpeg::dependencies: return=true ffprobe_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffprobe"
2023-03-11T07:19:35.281583Z  INFO ffprobe_available: walksnail_osd_tool::ffmpeg::dependencies: close time.busy=19.8ms time.idle=1.62µs ffprobe_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffprobe"
2023-03-11T07:19:35.418404Z  INFO get_available_encoders: walksnail_osd_tool::ffmpeg::encoders: return=[Encoder { name: "libx264", codec: H264, hardware: false }, Encoder { name: "libx265", codec: H265, hardware: false }, Encoder { name: "h264_videotoolbox", codec: H264, hardware: true }] ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg"
2023-03-11T07:19:35.418420Z  INFO get_available_encoders: walksnail_osd_tool::ffmpeg::encoders: close time.busy=137ms time.idle=916ns ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg"
2023-03-11T07:19:35.418708Z  INFO walksnail_osd_tool: Starting GUI
2023-03-11T07:21:17.117216Z  INFO walksnail_osd_tool::ui::app: Opened files ["/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4", "/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.osd"]
2023-03-11T07:21:17.161727Z  INFO get: walksnail_osd_tool::ffmpeg::video_info: return=Ok(VideoInfo { width: 1920, height: 1080, frame_rate: 60.001663, bitrate: 28323973, duration_seconds: 600, total_frames: 36000 }) file_path="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4" ffprobe_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffprobe"
2023-03-11T07:21:17.161744Z  INFO get: walksnail_osd_tool::ffmpeg::video_info: close time.busy=44.5ms time.idle=1.88µs file_path="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4" ffprobe_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffprobe"
2023-03-11T07:21:17.179371Z  INFO open: walksnail_osd_tool::osd::osd_file: return=OsdFile { file_path: "/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.osd", fc_firmware: Inav, frame_count: 4031 } path="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.osd"
2023-03-11T07:21:17.179388Z  INFO open: walksnail_osd_tool::osd::osd_file: close time.busy=17.6ms time.idle=875ns path="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.osd"
2023-03-11T07:23:18.518480Z  INFO walksnail_osd_tool::ui::app: Opened files ["/Volumes/Extreme SSD/Flying footage/2023/INAV_36.png"]
2023-03-11T07:23:18.533401Z  INFO open: walksnail_osd_tool::font::font_file: return=FontFile { file_path: "/Volumes/Extreme SSD/Flying footage/2023/INAV_36.png", character_count: 768, character_size: Large } path="/Volumes/Extreme SSD/Flying footage/2023/INAV_36.png"
2023-03-11T07:23:18.533419Z  INFO open: walksnail_osd_tool::font::font_file: close time.busy=14.9ms time.idle=1.58µs path="/Volumes/Extreme SSD/Flying footage/2023/INAV_36.png"
2023-03-11T07:23:18.535085Z  INFO osd_preview: walksnail_osd_tool::osd::preview: close time.busy=1.66ms time.idle=542ns width=1920 height=1080 horizontal_offset=0 vertical_offset=0
2023-03-11T07:23:26.618736Z  INFO osd_preview: walksnail_osd_tool::osd::preview: close time.busy=4.94ms time.idle=10.8µs width=1920 height=1080 horizontal_offset=20 vertical_offset=0
2023-03-11T07:23:26.896258Z  INFO osd_preview: walksnail_osd_tool::osd::preview: close time.busy=4.61ms time.idle=5.71µs width=1920 height=1080 horizontal_offset=25 vertical_offset=0
2023-03-11T07:23:27.425301Z  INFO osd_preview: walksnail_osd_tool::osd::preview: close time.busy=2.01ms time.idle=5.12µs width=1920 height=1080 horizontal_offset=30 vertical_offset=0
2023-03-11T07:23:28.984403Z  INFO osd_preview: walksnail_osd_tool::osd::preview: close time.busy=4.31ms time.idle=9.75µs width=1920 height=1080 horizontal_offset=35 vertical_offset=0
2023-03-11T07:23:37.794432Z  INFO walksnail_osd_tool::ui::app: Start render button clicked
2023-03-11T07:23:37.801541Z  INFO process_video: walksnail_osd_tool::video::process: Spawned ffmpeg decoder instance ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg" input_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4" output_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015_with_osd.mp4" video_info=VideoInfo { width: 1920, height: 1080, frame_rate: 60.001663, bitrate: 28323973, duration_seconds: 600, total_frames: 36000 } render_settings=Settings { encoder: Encoder { name: "h264_videotoolbox", codec: H264, hardware: true }, bitrate_mbps: 40 } horizontal_offset=35 vertical_offset=0
2023-03-11T07:23:37.801988Z  INFO process_video: walksnail_osd_tool::video::process: Spawned ffmpeg encoder instance ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg" input_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4" output_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015_with_osd.mp4" video_info=VideoInfo { width: 1920, height: 1080, frame_rate: 60.001663, bitrate: 28323973, duration_seconds: 600, total_frames: 36000 } render_settings=Settings { encoder: Encoder { name: "h264_videotoolbox", codec: H264, hardware: true }, bitrate_mbps: 40 } horizontal_offset=35 vertical_offset=0
2023-03-11T07:23:37.875137Z  INFO process_video: walksnail_osd_tool::video::process: close time.busy=76.2ms time.idle=2.42µs ffmpeg_path="/private/var/folders/4c/v14vysm93v19rljt13dn1f0r0000gn/T/AppTranslocation/9AE3E2E0-849A-4C1B-957C-0CD6FFBA05CB/d/Walksnail OSD Tool-2.app/Contents/MacOS/ffmpeg" input_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015.mp4" output_video="/Volumes/Extreme SSD/Flying footage/2023/2023-01-21 Harrier Walksnail/Harrier fog/AvatarG0015_with_osd.mp4" video_info=VideoInfo { width: 1920, height: 1080, frame_rate: 60.001663, bitrate: 28323973, duration_seconds: 600, total_frames: 36000 } render_settings=Settings { encoder: Encoder { name: "h264_videotoolbox", codec: H264, hardware: true }, bitrate_mbps: 40 } horizontal_offset=35 vertical_offset=0
@Pairan Pairan added the bug Something isn't working label Mar 12, 2023
@avsaase
Copy link
Owner

avsaase commented Mar 30, 2023

OP and I already discussed this issue in DMs so I'll leave some notes here in case someone encounters this problem.

This issue is caused by a corrupt video file. If this is the case the log will show ffmpeg errors that frames cannot be decoded, etc. The reason the artifacts are pink probably has to do with the color space conversion inside ffmpeg. I haven't had the time to check if this happens when decoding the input video or when encoding the overlayed frames. It may be possible to improve the handling a corrupt video file but a corrupt video will always produce some sort of problems with the output file.

I'll leave this issue open for visibility and because of the potential improvements that can be made.

@avsaase avsaase added the corrupt file Issue is caused by a corrupt input file label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working corrupt file Issue is caused by a corrupt input file
Projects
None yet
Development

No branches or pull requests

2 participants