Can I play a playlist of rear and front dashcam videos in MPV?
0
votes
2
answers
452
views
I'm trying to play both front and rear footage from my dashcam at the same time as a playlist in
2nd overlay, plays rear view from the 1st one:
For now I'm using a script that runs
mpv
.
Front and rear video files are in F
and R
directories. I can easily add all files from e.g. F
directory to the playlist:
mpv F/*
I can also run a picture-in-picture overlay for a single pair of front/rear footage:
mpv $front_video --external-file=$rear_video --lavfi-complex='[vid2] scale=640x360 [small]; [vid1] [small] overlay [vo]'
I'm having trouble combining both, i.e. I want a playlist of picture-in-picture overlays. The issue is I always get the rear view from the first video:
mpv \
REC_200607-175943F.MOV --external-file=../R/REC_200607-175943R.MOV --lavfi-complex='[vid2] scale=640x360 [small]; [vid1] [small] overlay [vo]' \
GSR_200607-180444F.MOV --external-file=../R/GSR_200607-180444R.MOV --lavfi-complex='[vid2] scale=640x360 [small]; [vid1] [small] overlay [vo]' \
GSR_200607-180943F.MOV --external-file=../R/GSR_200607-180943R.MOV --lavfi-complex='[vid2] scale=640x360 [small]; [vid1] [small] overlay [vo]'
1st overlay, all fine:


mpv
for the next pair of videos as soon as the first one quits so I can watch all of them from start to finish but I miss the features like jumping to previous/next video, checking where in the playlist I am, setting a playback speed, volume, contrast, etc. Also, it's cumbersome to stop in the middle of playback because quitting one mpv
instance runs the next one:
#!/bin/sh
for front in $(ls -tr); do
rear=../R/${front/F./R.}
mpv $front --external-file=$rear --lavfi-complex='[vid2] scale=640x360 [small]; [vid1] [small] overlay [vo]'
done
Any suggestions?
Asked by cprn
(1035 rep)
Jun 8, 2020, 09:07 PM
Last activity: Feb 3, 2024, 04:50 PM
Last activity: Feb 3, 2024, 04:50 PM