CroatianMeteorNetwork / RMS

RPi Meteor Station
https://globalmeteornetwork.org/
GNU General Public License v3.0
169 stars 47 forks source link

FRbinViewer - append meteor image to the end of video and add meteor shower information #256

Closed aitov closed 4 months ago

aitov commented 5 months ago

Hi, As I can see my everyday usage of FRbinViewer it is generating meteor mp4 video for bin files with options:

Usually bright and cool meteors shared with friends or social media and it requires additional action - append final image of meteor to the end of video for 1 or 2 seconds by some video editor.

In this pull request I added two additional options:

Probably these options will be helpful for someone.

Tested on Mac and RPi.

markmac99 commented 5 months ago

I also noticed that the videos that this process creates won't play on my Pi4. The same video works with VLC on my Windows PC, but not on VLC on the Pi4, I'd be interested to hear if you could get the videos to play on a Mac. On the Pi, VLC opens, the video screen flickers black and then VLC displays its traffic-cone icon. The video never runs, I dont think this work has introduced the problem but maybe we can fix it. I thought it was yuv444 vs yuv420 but that bug got fixed already. Hmm.

markmac99 commented 5 months ago

As a concrete example of the issue with meteor# and lookup of associations, in my sample dataset from the Geminids, FRbinViewer incorrectly labelled several meteors as Geminids instead of COM or DSV because it picked the first event in the FF file.

aitov commented 5 months ago

Hi @markmac99 , thank you for code review and comments.

I also noticed that the videos that this process creates won't play on my Pi4. The same video works with VLC on my Windows PC, but not on VLC on the Pi4, I'd be interested to hear if you could get the videos to play on a Mac. On the Pi, VLC opens, the video screen flickers black and then VLC displays its traffic-cone icon. The video never runs, I dont think this work has introduced the problem but maybe we can fix it. I thought it was yuv444 vs yuv420 but that bug got fixed already. Hmm.

Yes, it was fixed by -pix_fmt yuv420p. I tested on my RPi 4 and it works for me - generated on RPi 4 mp4 could be played by VLC on RPi and on my Mac, same generated video on Mac could be played on RPi4. Probably you could share your file I will check.

When looking up an ff_file in associations{} the 2nd element is the meteor number if there's more than one meteor in the FF file. This can be read from the FTPdetect file and is not always 1.0. as especially during busy showers there may be two or three meteors in an FF file. I tihnk the code therefore needs to load the meteor number from the ftp file before doing these lookups.

As a concrete example of the issue with meteor# and lookup of associations, in my sample dataset from the Geminids, FRbinViewer incorrectly labelled several meteors as Geminids instead of COM or DSV because it picked the first event in the FF file.

So possible case when we have more than 1 meteor on FF file which used for background for FR bin.

The question: how to identify record in FTPdetect for target FR file?

Other comments fixed.

Thanks

markmac99 commented 5 months ago

Updates look good. I tested on Windows 10, Ubuntu (WSL) and Pi4 32bit, in various combinations, no problems. I think the pull request can be merged.

The videos still won't play on any of my Pi4s though. I tried creating them on both Windows and Pi . In both cases the videos play ok on Windows but won't play on the Pi4. I tried on UK0006, UK000F, UK001L and UK002F as well as on my spare Pi4. VLC version is 3.0.20 Vetinari on both the Pis and on Windows so i think this is more likely a codec issue.

markmac99 commented 5 months ago

ps would be interested to see if the videos play for you, though i think they will

https://github.com/CroatianMeteorNetwork/RMS/assets/25826525/2ab773a5-75c1-4161-a260-1fb93f792a25

aitov commented 5 months ago

Hi,

ps would be interested to see if the videos play for you, though i think they will

pi-version-FR_UK001L_20231214_020505_502_0855808_line_00.mp4_shwr_ff.mp4

I tested on my RPi4 - video played without any issues, so probably codec issue, not sure how to compare installed libs, but I used standard Buster image for RMS

The question: how to identify record in FTPdetect for target FR file?

I can fix this part as well, but I need help with solution, otherwise sometimes it will print wrong shower name

markmac99 commented 5 months ago

All my pis are also Buster but were built from the image from 2018, though i keep them updated every month. I'll see if the internet has any codec/driver suggestions or ways to get debug info from VLC. I think i have a solution for the problem of identifying the correct meteor in an FF file, I'll do some tests and let you know my ideas. ps Thanks for this pull request, i think its a useful addition to the toolset!

aitov commented 4 months ago

Hi @markmac99 , @dvida As I can see this PR was merged to dev branch. Seems like I have solution to close last item :

So possible case when we have more than 1 meteor on FF file which used for background for FR bin.

and ready create new PR with this fix, please let me know if it should be created for dev or master branch

dvida commented 4 months ago

Thanks! Please make it for the dev branch. I'm planning to merge it soon.

Denis