Beesource Beekeeping Forums banner

21 - 25 of 25 Posts

·
Registered
Joined
·
648 Posts
I don't think you can use subtitles with -vcodec copy. I use subtitles on all of my home movies but write them to a .ass (lol, yes someone thought that was a good idea) file. This is the file I use to crunch a lot of home movies into subtitled x265 format. Maybe it would help you?

Code:
#!/bin/sh

for file in [email protected] ; do
name=`echo $file | sed -e "s/\....$//g"`

ffmpeg -i "$file" -c:v libx265 -threads 0 -s 1280x720 -vf kerndeint=thresh=10:map=0:order=0:sharp=1:twoway=0 -vf hqdn3d  -sws_flags lanczos -aspect 16:9 -crf 24 -c:a aac -b:a 96k -strict -2 -filter:v subtitles="$file"\.ass  "$file"\.265.mp4 -y

done
 

·
Registered
Joined
·
1,281 Posts
Are .ass files for soft subtitles? Or are they burned into the video?

ffmpeg supposedly also supports .srt files, but I haven't tried that yet, and I think subtitles for a live stream might be different than for an existing file. But I haven't had time to play with any of this just yet.
 

·
Registered
Joined
·
1,281 Posts
I did something very similar with time and weather from openweathermap.org:

Code:
#!/bin/bash

while [[ 1 == 1 ]]; do
        curl -s 'api.openweathermap.org/data/2.5/weather?id=5388601&APPID=MyOpenWeatherMapAPIKey&units=imperial' | jq '.name,", ",.main.temp," F"' > /tmp/temp1.txt
        tr -d '"' < /tmp/temp1.txt > /tmp/temp2.txt
        tr -d '\n' < /tmp/temp2.txt > /tmp/weather.txt
        sleep 600
done
I don't want to burn in subtitles, because I don't have the CPU power in the Pi to rasterize, overlay, and re-encode. So I want to find a way to do soft subtitles.
 

·
Registered
Joined
·
648 Posts
I dug around some more. I wish I had more time to actually help. I understand ffmpeg more than the other coding.

From, https://forum.videohelp.com/threads/377210-Soft-subbing-video-with-ffmpeg, it looks like you can stream map the .ass file into your video without burning it.

If true, I would build a cron to run every 15 or 20 minutes to grab the temp and output to the .ass file then have ffmpeg merge them.

*I may even try this with my home stuff instead of burning it.
 
21 - 25 of 25 Posts
Top