I imported a mkv video using torrent upload today, everything went well but then I realized that my subtitles disappeared. Of course, because they weren't burned-in, they were in their own stream.
For video formats that support soft subs, it would be great if Peertube could seek for subtitle tracks and propose to import them somehow.
I made some basic research:
We can use ffprobe to list available subtitle tracks in a video file: ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 test.mkv
result:
2,eng
3,spa
4,por
We can then use the previous result to extract subs from the file using ffmpeg. For exemple, to extract the english track : ffmpeg -i test.mkv -map 0:2 eng.srt This will automatically convert the subtitle track to srt, but we could try to get the sub format from the ffprobe command and then use it in this ffmpeg command.
I don't know how hard it would be to implement this, but it would help a lot, especially when you import files using torrents. In this case, the only solution I see is to download the video file (what i wanted to avoid using torrent import) and extract the subtitle track manually.
something of this? I just uploaded a MKV video with its subtitles inside the video, and peertube does not recognize the subtitle, you have to download it from somewhere
I imported a mkv video using torrent upload today, everything went well but then I realized that my subtitles disappeared. Of course, because they weren't burned-in, they were in their own stream.
For video formats that support soft subs, it would be great if Peertube could seek for subtitle tracks and propose to import them somehow.
I made some basic research:
ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 test.mkv
result:
ffmpeg -i test.mkv -map 0:2 eng.srt
This will automatically convert the subtitle track to srt, but we could try to get the sub format from the ffprobe command and then use it in this ffmpeg command.I don't know how hard it would be to implement this, but it would help a lot, especially when you import files using torrents. In this case, the only solution I see is to download the video file (what i wanted to avoid using torrent import) and extract the subtitle track manually.