1

Here is my current script

#!/bin/bash


while true
do
for f in *.mkv; 

do
/home5/user/ffmpeg_folder/./ffmpeg-git-20181101-64bit-static/ffmpeg \
 -i "$f" -c:v h264 -maxrate 12M -crf 16 -c:a copy -vf subtitles="$f" -pix_fmt yuv420p \
  "${f%.mkv}".mp4; 
  done
  sleep 15m
done

and I just keep getting this error:

      NUMBER_OF_BYTES-eng: 30679
      _STATISTICS_WRITING_APP: no_variable_data
      _STATISTICS_WRITING_APP-eng: no_variable_data
      _STATISTICS_WRITING_DATE_UTC: 1970-01-01 00:00:00
      _STATISTICS_WRITING_DATE_UTC-eng: 1970-01-01 00:00:00
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3: Attachment: ttf
    Metadata:
      filename        : OpenSans-Semibold.ttf
      mimetype        : application/x-truetype-font
File '[HorribleSubs] Seishun Buta Yarou wa Bunny Girl Senpai no Yume wo Minai - 07 [1080p].mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_subtitles_0 @ 0x5dfe3c0] No filename provided!
[AVFilterGraph @ 0x6da2c00] Error initializing filter 'subtitles' with args ''
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

Everything would work if the -vf subtitles="$f" wasn't in there. Is there any way to fix this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.