shellixyz / hd_fpv_video_tool

A software tool to manipulate video files and OSD files recoded with the DJI and Walksnail Avatar FPV systems
GNU General Public License v2.0
15 stars 4 forks source link

WTFOS/MSP-OSD has switched to PNG fonts.... #13

Open benlumley opened 3 months ago

benlumley commented 3 months ago

Just letting you know; as it affects your docs!

shellixyz commented 3 months ago

Thanks. I will probably add support for loading the fonts in PNG format at some point when I am less busy

ooZberg commented 2 months ago

I believe that this issue is what is stopping me from using this tool today with fpv-wtf msp-osd 0.12.2.

I get this error when I try to transcode, I believe that the new version 2 is for PNG fonts.

thread 'main' panicked at /Users/username/hd_fpv_video_tool/src/osd/dji/file.rs:170:63:
called `Result::unwrap()` on an `Err` value: UnsupportedFileFormatVersion(2)

I assume that it is not possible to work around this until someone add PNG support?

shellixyz commented 2 months ago

I don't think that has anything to do with the PNG fonts. Looks like the OSD file format version has been increased. Could you send the OSD file you have trouble with ? You can send it to me privately by e-mail if you don't want to share it publicly on Github

ooZberg commented 2 months ago

I have sent you the files in an email.

I have also tried to bypass the version check in your tool,

const SUPPORTED_FORMAT_VERSIONS: RangeInclusive<u16> = 1..=2;
$ RUST_BACKTRACE=1 cargo run -- transcode-video --osd /files/DJIG0030.mp4        
    Finished dev [unoptimized + debuginfo] target(s) in 0.75s
     Running `target/debug/hd_fpv_video_tool transcode-video --osd '/files/DJIG0030.mp4'`
INFO  > looking for OSD file associated to video file: /files/DJIG0030.mp4
INFO  > found: /files/DJIG0030.osd
INFO  > transcoding video: /files/DJIG0030.mp4 -> /files/DJIG0030_with_osd.mp4
INFO  > detected OSD file with DJI_FakeHD tile layout
ERROR > OSD file read error: failed to fill whole buffer

Note that I sent you two DVR files in the email, one DJIG0030 works with fpv.wtf OSD tool, the other one DJIG0032 crashes after a while. (Separate bug report here https://github.com/fpv-wtf/wtfos-configurator/issues/426)

shellixyz commented 2 months ago

Ok, I will have a look.

ERROR > OSD file read error: failed to fill whole buffer

This error means that the file has been truncated and the last OSD frame is partial. But it could be related to this format version issue. This conversation belongs to a different issue really so I'm going to open another one.