problem with add subtitles to video

Issues involving a Windows version of FFmpeg. Do not post general usage questions here.

problem with add subtitles to video

Postby noe132 » Tue Dec 18, 2012 5:39 pm

I'm using winxp and I did this
ffmpeg -i "1.mp4" -y -qmax 10 -qmin 2 -s 480x270 -f avi -g 120 -vf "ass=1.ass" 1.avi

It says

[Parsed_ass_0 @ 026a6f40] Could not create a libass track when reading file '1.ass'
[AVFilterGraph @ 02638840] Error initializing filter 'ass' with args '1.ass'
Error opening filters!

when i use -vf "subtitles=1.srt"

[AVFilterGraph @ 02638840] No such filter: 'subtitles'
Error opening filters!


how can i do?
noe132
 
Posts: 2
Joined: Tue Dec 18, 2012 5:35 pm

Re: problem with add subtitles to video

Postby rogerdpack » Tue Dec 18, 2012 7:16 pm

http://ffmpeg.org/trac/ffmpeg/wiki/How% ... he%20video may be helpful (it has a link to another windows post near the bottom...)
rogerdpack
 
Posts: 1419
Joined: Fri Aug 05, 2011 9:56 pm

Re: problem with add subtitles to video

Postby noe132 » Wed Dec 19, 2012 5:31 am

command
ffmpeg -i "D:\Backup\The Avengers (2012)\The.Avengers.2012.720p.BluRay.x264.YIFY.mp4" -y -qmax 10 -qmin 2 -s 480x270 -f avi -g 120 -vf "ass=1.ass" 1.avi

ffmpeg version N-47062-g26c531c Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 25 2012 12:21:26 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runt
ime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass -
-enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enab
le-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libo
pus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheo
ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --ena
ble-zlib
libavutil 52. 9.100 / 52. 9.100
libavcodec 54. 77.100 / 54. 77.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.102 / 3. 23.102
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Backup\The Avengers (2012)\Th
e.Avengers.2012.720p.BluRay.x264.YIFY.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2012-08-21 03:05:37
Duration: 02:22:54.98, start: 0.000000, bitrate: 1001 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720
[SAR 1:1 DAR 16:9], 901 kb/s, 23.98 fps, 23.98 tbr, 96k tbn, 47.95 tbc
Metadata:
creation_time : 2012-08-21 03:05:37
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 95
kb/s
Metadata:
creation_time : 2012-08-21 03:07:11
handler_name : GPAC ISO Audio Handler
[Parsed_ass_0 @ 02894e80] Could not create a libass track when reading file '1.a
ss'
[AVFilterGraph @ 026a6f40] Error initializing filter 'ass' with args '1.ass'
Error opening filters!
noe132
 
Posts: 2
Joined: Tue Dec 18, 2012 5:35 pm

Re: problem with add subtitles to video

Postby rogerdpack » Wed Dec 19, 2012 7:24 pm

noe132 wrote: creation_time : 2012-08-21 03:07:11
handler_name : GPAC ISO Audio Handler
[Parsed_ass_0 @ 02894e80] Could not create a libass track when reading file '1.a
ss'
[AVFilterGraph @ 026a6f40] Error initializing filter 'ass' with args '1.ass'
Error opening filters!


ass can be tricky to get going with windows builds, see http://ffmpeg.org/trac/ffmpeg/wiki/Windows_Tips for a link that may help you...
rogerdpack
 
Posts: 1419
Joined: Fri Aug 05, 2011 9:56 pm

Re: problem with add subtitles to video

Postby Nologic » Fri Dec 21, 2012 12:04 pm

You probably need pathing added...not simply the name of the subtitle file.

You likely need to trade back slashes with forward slashes, and escape colons with back slashes.

Here is a copy paste of a post I did for adding watermarks on a different forum.

A note about handling pathing on windows for the image file.

The path must first be enclosed in single quotes.
All back slashes must be converted to forward slashes. (as noted in tutorial)
Colons must be escaped with back slashes.

Example:
Code: Select all
-vf “movie=’C\:/test/WaterMark.png’, scale=iw/2:ih/2[watermark];[in][watermark]overlay=10:10[out]”


Okay the scale isn’t needed, but thought it would be a nice touch to add. :)


So lets say your ASS file is in the root of C:\ it would look like this:
-vf "ass=C\:/1.ass"

Now if there are spaces in the folder names leading to the file...then the pathing would need to be enclosed in single quotes:
-vf "ass='C\:/Somewhere Over There/1.ass'"

Anyways hope that helps.
Nologic
 
Posts: 82
Joined: Mon Aug 15, 2011 4:47 am

Re: problem with add subtitles to video

Postby vuikhim » Tue Jan 08, 2013 4:24 am

noe132 wrote:I'm using winxp and I did this
ffmpeg -i "1.mp4" -y -qmax 10 -qmin 2 -s 480x270 -f avi -g 120 -vf "ass=1.ass" 1.avi

It says

[Parsed_ass_0 @ 026a6f40] Could not create a libass track when reading file '1.ass'
[AVFilterGraph @ 02638840] Error initializing filter 'ass' with args '1.ass'
Error opening filters!

when i use -vf "subtitles=1.srt"

[AVFilterGraph @ 02638840] No such filter: 'subtitles'
Error opening filters!


how can i do?


Solution:
1. Right click "1.srt" and Open With "Notepad".
2. File > Save as... :
-File name: 1.srt
-Save as type: All Files
-Encoding: UTF-8
> Save.

Now try try render subtitle again. You can do this to .ass as well. Cheers! :D
vuikhim
 
Posts: 1
Joined: Tue Jan 08, 2013 4:13 am


Return to Usage Issues

Who is online

Users browsing this forum: No registered users and 2 guests