-
Notifications
You must be signed in to change notification settings - Fork 80
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
SUGGESTED FEATURE - Map tile #190
Comments
Great idea! |
I also think it sounds like a good idea. For what it's worth, I added an option to prepend a map of the event location at the start of the video here, #154, which is now available after some fixups of my mistakes by @ehendrix23. I don't know enough about ffmpeg to figure out how to add it in one of the empty tiles though, unfortunately. |
This is actually a very good step, thanks. If you can generate already the one-frame video, looking at the code it should not be impossible to add it to one of the unused frames. |
Hi there, is this mod working on linux? |
@MarcFinns , it should be --title_screen_map. I think it maybe changed since the first version of the pull request. |
I got an even bigger error, The entire video is the map. |
Can you open another issue for this and then run it with DEBUG log level and provide that together with full command (including parameters)? |
I ran a little test and figured out how to add a map tile in the top left corner with a manual
The important bit is to turn on "repeat" and set "repeatlast=1" or it'll just flash the image briefly and go black. You also need to add a new input with the map image (most of the code is already there from the title screen option). I'm not familiar enough with the script to turn this into a full PR, esp. when you want to support multiple layouts and such, but it might be a good starting point. My full command looks something like this: cmd = ['ffmpeg',
'-loglevel',
'info',
'-i',
'test_data/2023-05-26_14-04-18/2023-05-26_14-03-15-front.mp4',
'-i',
'test_data/2023-05-26_14-04-18/2023-05-26_14-03-15-back.mp4',
'-i',
'test_data/2023-05-26_14-04-18/2023-05-26_14-03-15-left_repeater.mp4',
'-i',
'test_data/2023-05-26_14-04-18/2023-05-26_14-03-15-right_repeater.mp4',
'-i',
'test_data/map.png',
'-filter_complex',
'color=duration=59.85:s=1920x960:c=black, fps=24 [base];'
'[0:v] setpts=PTS-STARTPTS, scale=640x480 [front];'
'[1:v] setpts=PTS-STARTPTS, scale=640x480 , hflip [rear];'
'[2:v] setpts=PTS-STARTPTS, scale=640x480 , hflip [left];'
'[3:v] setpts=PTS-STARTPTS, scale=640x480 , hflip [right];'
'[4]null[map];'
'[base][front] overlay=eof_action=pass:repeatlast=0:x=640:y=0 [front1];'
'[front1][rear] overlay=eof_action=pass:repeatlast=0:x=640:y=480 [rear1];'
'[rear1][left] overlay=eof_action=pass:repeatlast=0:x=0:y=480 [left1];'
'[left1][right] overlay=eof_action=pass:repeatlast=0:x=1280:y=480 [right1];'
'[right1][map] overlay=eof_action=repeat:repeatlast=1:x=0:y=0 [map1];'
"[map1] drawtext=fontfile=/usr/share/fonts/opentype/freefont/FreeSans.otf:fontcolor=white:fontsize=24:borderw=2:[email protected]:x=(w/2-text_w/2):y=(h-(text_h)-10):text='%{pts\\:localtime\\:1685075595\\:%x "
"%X}' [tmp0]",
'-map',
'[tmp0]',
'-preset',
'medium',
'-crf',
'28',
'-c:v',
'libx264',
'-metadata',
'creation_time=2023-05-26T04:33:15.000000Z',
'-metadata',
'description=Created by tesla_dashcam v0.1.21b2',
'-metadata',
'title=SENTRY: 05/26/23 14:03:19',
'-y',
'test_data/output/2023-05-26T14-03-15.mp4'] |
Hello, this is an idea to make use of the empty tiles in the output videos.
Anyone interested?
The text was updated successfully, but these errors were encountered: