Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5825 closed defect (fixed)

Vobsub subtitles won't overlay with some MKV

Reported by: edumj Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dvdsub regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Vobsub subtitles won't overlay with some MKV

Summary of the bug: Some MKVs with vobsub subtitles won't show when I try to overlay them. It Works with this file http://samples.mplayerhq.hu/sub/largeres_vobsub.mkv, but doesn't with this one https://mega.nz/#!2JVTjZga

The only difference I see in MediaInfo is that the one that doesn't show, doesn't have a Muxing Mode (zlib in the one that works).

I've tried with scaling both video and subs to the same size, then overlay:

 "%~dps0\ffmpeg"	-analyzeduration 15000000	-ss 10	-i %1	   -filter_complex "[0:v]scale=720:576[video],[0:s:0]scale=720:576[subs],[video][subs]overlay[out]" -map "[out]" -map 0:a:0 		-f avi -vcodec mpeg4 -b:v 3000k -vtag XVID -c:a libmp3lame -b:a 128k 			 - | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -

I've tried changing color palette of subs (also all with "ffffff"):

 "%~dps0\ffmpeg"	-analyzeduration 15000000	-ss 10	-palette "ffffff,ffffff,ffffff,ffffff,000000,000000,000000,000000,000000,000000,000000,000000,ffffff,ffffff,ffffff,ffffff"	-i %1	   -filter_complex "[0:v]scale=720:576[video],[0:s:0]scale=720:576[subs],[video][subs]overlay[out]" -map "[out]" -map 0:a:0 		-f avi -vcodec mpeg4 -b:v 3000k -vtag XVID -c:a libmp3lame -b:a 128k 			 - | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -

And also a black (or gey) .png for the background:

 "%~dps0\ffmpeg"	-analyzeduration 15000000	-loop 1 	-i "%~dps0\720x576_gris.png"		-ss 30	-i %1	   -filter_complex "[0:v]scale=720:576[video],[1:s:0]scale=720:576[subs],[video][subs]overlay[out]" -map "[out]" 		-f avi -vcodec mpeg4 -b:v 3000k -vtag XVID  			 - | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -

But none work.

How to reproduce:

ffmpeg versión 20160825-01aee81
built on 24-8-2016

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

Francis en la Marina (1955)_cut.mkv (2.4 MB ) - added by Carl Eugen Hoyos 8 years ago.

Change History (28)

comment:1 by Carl Eugen Hoyos, 8 years ago

Please provide the actual command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:2 by edumj, 8 years ago

Those are my actual command lines, well I'm in Windows and I use batch files.

This is one line:

"%~dps0\ffmpeg" -analyzeduration 15000000 -i %1 -filter_complex "[0:v][0:s:0]overlay[out]" -map "[out]" -map 0:a:0 -f avi -vcodec mpeg4 -b:v 3000k -vtag XVID -c:a libmp3lame -b:a 128k "video.avi" -f null nul 2> "LOG.txt"

And this is the output:

ffmpeg version N-81452-g01aee81 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 29.100 / 55. 29.100
libavcodec 57. 54.100 / 57. 54.100
libavformat 57. 48.100 / 57. 48.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 54.100 / 6. 54.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100

Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955) DVDRip DUAL SE by El enmascarado del Barça (copy).mkv':

Metadata:

ENCODER : Lavf56.40.101

Duration: 00:03:02.97, start: 0.000000, bitrate: 1386 kb/s

Chapter #0:0: start 0.000000, end 84.897000
Metadata:

title : Chapter 1

Chapter #0:1: start 84.897000, end 180.000000
Metadata:

title : Chapter 2

Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576

[avi @ 04efc020] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

Last message repeated 1 times

[null @ 04dc0460] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

Last message repeated 1 times

Output #0, avi, to 'video.avi':

Metadata:

ISFT : Lavf57.48.100
Chapter #0:0: start 0.000000, end 84.897000
Metadata:

title : Chapter 1

Chapter #0:1: start 84.897000, end 180.000000
Metadata:

title : Chapter 2

Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 3000 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:

encoder : Lavc57.54.100 mpeg4

Side data:

cpb: bitrate max/min/avg: 0/0/3000000 buffer size: 0 vbv_delay: -1

Stream #0:1(spa): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, delay 1105, padding 0, 128 kb/s (default)
Metadata:

LANGUAGE : spa
encoder : Lavc57.54.100 libmp3lame

Output #1, null, to 'nul':

Metadata:

encoder : Lavf57.48.100
Chapter #1:0: start 0.000000, end 84.897000
Metadata:

title : Chapter 1

Chapter #1:1: start 84.897000, end 180.000000
Metadata:

title : Chapter 2

Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:

LANGUAGE : eng
encoder : Lavc57.54.100 wrapped_avframe

Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:

LANGUAGE : spa
encoder : Lavc57.54.100 pcm_s16le

Stream mapping:

Stream #0:0 (h264) -> overlay:main (graph 0)
Stream #0:3 (dvdsub) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (mpeg4)
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))

Press [q] to stop, ? for help
[null @ 04dc0460] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
frame= 159 fps=0.0 q=2.0 q=-0.0 size= 1336kB time=00:00:06.65 bitrate=1644.9kbits/s speed=13.3x
frame= 320 fps=319 q=2.0 q=-0.0 size= 2721kB time=00:00:13.09 bitrate=1701.8kbits/s speed=13.1x
frame= 477 fps=317 q=2.0 q=-0.0 size= 5033kB time=00:00:19.39 bitrate=2126.4kbits/s speed=12.9x
frame= 631 fps=315 q=2.0 q=-0.0 size= 7621kB time=00:00:25.53 bitrate=2444.8kbits/s speed=12.7x
frame= 786 fps=314 q=2.0 q=-0.0 size= 10022kB time=00:00:31.72 bitrate=2588.0kbits/s speed=12.7x
frame= 942 fps=313 q=2.0 q=-0.0 size= 12189kB time=00:00:37.97 bitrate=2629.6kbits/s speed=12.6x
frame= 1100 fps=313 q=2.0 q=-0.0 size= 14196kB time=00:00:44.30 bitrate=2624.7kbits/s speed=12.6x
frame= 1258 fps=314 q=2.0 q=-0.0 size= 15922kB time=00:00:50.58 bitrate=2578.7kbits/s speed=12.6x
frame= 1416 fps=314 q=2.0 q=-0.0 size= 17695kB time=00:00:56.93 bitrate=2545.8kbits/s speed=12.6x
frame= 1572 fps=314 q=2.0 q=-0.0 size= 20115kB time=00:01:03.16 bitrate=2608.6kbits/s speed=12.6x
frame= 1727 fps=313 q=2.0 q=-0.0 size= 22927kB time=00:01:09.37 bitrate=2707.3kbits/s speed=12.6x
frame= 1883 fps=313 q=2.0 q=-0.0 size= 25105kB time=00:01:15.62 bitrate=2719.5kbits/s speed=12.6x
frame= 2041 fps=313 q=1.6 q=-0.0 size= 26989kB time=00:01:21.91 bitrate=2698.9kbits/s speed=12.6x
frame= 2203 fps=314 q=2.0 q=-0.0 size= 28389kB time=00:01:28.40 bitrate=2630.6kbits/s speed=12.6x
frame= 2356 fps=313 q=2.0 q=-0.0 size= 30167kB time=00:01:34.52 bitrate=2614.4kbits/s speed=12.6x
frame= 2508 fps=313 q=2.0 q=-0.0 size= 31745kB time=00:01:40.60 bitrate=2584.8kbits/s speed=12.5x
frame= 2661 fps=312 q=2.0 q=-0.0 size= 34222kB time=00:01:46.75 bitrate=2626.2kbits/s speed=12.5x
frame= 2817 fps=312 q=2.0 q=-0.0 size= 35675kB time=00:01:52.95 bitrate=2587.2kbits/s speed=12.5x
frame= 2966 fps=312 q=2.0 q=-0.0 size= 37894kB time=00:01:58.91 bitrate=2610.6kbits/s speed=12.5x
frame= 3116 fps=311 q=2.0 q=-0.0 size= 40229kB time=00:02:04.92 bitrate=2637.9kbits/s speed=12.5x
frame= 3267 fps=310 q=2.0 q=-0.0 size= 42253kB time=00:02:10.96 bitrate=2643.0kbits/s speed=12.4x
frame= 3420 fps=310 q=2.0 q=-0.0 size= 44659kB time=00:02:17.08 bitrate=2668.7kbits/s speed=12.4x
frame= 3578 fps=310 q=2.0 q=-0.0 size= 46641kB time=00:02:23.40 bitrate=2664.4kbits/s speed=12.4x
frame= 3731 fps=310 q=2.0 q=-0.0 size= 48505kB time=00:02:29.52 bitrate=2657.4kbits/s speed=12.4x
frame= 3890 fps=311 q=2.0 q=-0.0 size= 50288kB time=00:02:35.88 bitrate=2642.7kbits/s speed=12.4x
frame= 4048 fps=311 q=1.6 q=-0.0 size= 52504kB time=00:02:42.21 bitrate=2651.4kbits/s speed=12.5x
frame= 4209 fps=311 q=2.0 q=-0.0 size= 54403kB time=00:02:48.63 bitrate=2642.7kbits/s speed=12.5x
frame= 4366 fps=311 q=2.0 q=-0.0 size= 56221kB time=00:02:54.93 bitrate=2632.8kbits/s speed=12.5x
frame= 4503 fps=311 q=2.0 Lq=-0.0 size= 58309kB time=00:03:00.12 bitrate=2651.9kbits/s speed=12.5x
video:56892kB audio:36561kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

comment:3 by Carl Eugen Hoyos, 8 years ago

 ENCODER : Lavf56.40.101

How was the input file created?

comment:4 by edumj, 8 years ago

I don't know, I didn't made it. I just made a 3 min sample with ffmmpeg and "copy", but Mediainfo reports this for the full file:

Aplicación de codifición : HandBrake 0.9.8
Librería de codificación : libmkv 0.6.5

So, HandBrake.

comment:5 by edumj, 8 years ago

Last edited 8 years ago by edumj (previous) (diff)

in reply to:  3 comment:6 by edumj, 8 years ago

Last edited 8 years ago by edumj (previous) (diff)

comment:7 by Carl Eugen Hoyos, 8 years ago

Please provide the full file (or cut it with dd).

comment:8 by edumj, 8 years ago

It's 700 MB! and the result is the same. You can see the subs shown with VLC but doesn't appear overlaying with ffmpeg.

What is dd?

comment:9 by Carl Eugen Hoyos, 8 years ago

If you cannot upload 700MB cut the original file with a tool of your choice, dd is just a suggestion.

comment:10 by edumj, 8 years ago

Ok, but I don't know what is DD... Searching in Google it seems a Unix/Linux program, but I'm in Windows...

comment:11 by edumj, 8 years ago

Well, at last I could upload the whole file:

https://mega.nz/#!PMlBHIQB!Sw9PMg6JHFsfkBd1iVcACx5gzyWp0I2hboY06zNA6j4

But, you'll see it has exactly the same issue with subs.

Last edited 8 years ago by edumj (previous) (diff)

comment:12 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavcodec
Keywords: dvdsub regression added; MKV vobsub removed
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

by Carl Eugen Hoyos, 8 years ago

comment:13 by Elon Musk, 8 years ago

Resolution: fixed
Status: openclosed

comment:14 by edumj, 8 years ago

There's still something wrong with overlaying and colors.

If I try to overlay subs, I get "[matroska,webm @ 0318c660] Read error"

ffmpeg:

ffmpeg -palette "ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff" -i "%~1" -filter_complex "[0:v][0:s:0]overlay[out]" -map "[out]" -map 0:a:1 -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "%~n1 overlay.avi"

output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955)_cut.mkv':
  Metadata:
    encoder         : libmkv 0.6.5
  Duration: 01:16:58.18, start: 0.000000, bitrate: 4 kb/s
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576
[avi @ 04f6ba40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[null @ 048eca20] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'E:\MISDOC~1\CONVER~1\_PACON~1\MEDIAI~1\FFD8CF~1\DVDAXS~1\CONFFM~1\\Francis en la Marina (1955)_cut overlay.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 1500 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Chapter #1:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #1:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #1:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #1:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #1:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #1:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #1:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:3 (dvdsub) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (libxvid)
  Stream #0:2 -> #0:1 (aac (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[null @ 048eca20] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
frame=  135 fps=0.0 q=3.0 q=-0.0 size=     980kB time=00:00:05.75 bitrate=1393.2kbits/s speed=11.5x    
frame=  262 fps=262 q=2.0 q=-0.0 size=    1991kB time=00:00:10.83 bitrate=1505.1kbits/s speed=10.8x    
frame=  384 fps=256 q=3.0 q=-0.0 size=    3083kB time=00:00:15.72 bitrate=1606.4kbits/s speed=10.5x    
[matroska,webm @ 0318c660] Read error
frame=  469 fps=254 q=4.0 Lq=-0.0 size=    3977kB time=00:00:18.76 bitrate=1735.7kbits/s speed=10.2x    
video:3820kB audio:3805kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

And if I convert it to XSUB, now they show, but transparecy of colors seems inverted, text is transparent and background is opaque (with any palette color combination).
It says "Color index 0 is not transparent. Transparency will be messed up."

ffmpeg:

ffmpeg -palette "ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff,ffffff" -i "%~1" -map 0:v -map 0:a:1 -map 0:s:0 -scodec xsub -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "%~n1 xsub.avi"

output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955)_cut.mkv':
  Metadata:
    encoder         : libmkv 0.6.5
  Duration: 01:16:58.18, start: 0.000000, bitrate: 4 kb/s
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576
[avi @ 050cc800] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 2 times
[null @ 02f902a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'E:\MISDOC~1\CONVER~1\_PACON~1\MEDIAI~1\FFD8CF~1\DVDAXS~1\CONFFM~1\\Francis en la Marina (1955)_cut xsub.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0(eng): Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 1500 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
    Stream #0:2(spa): Subtitle: xsub (DXSB / 0x42535844), 720x576
    Metadata:
      encoder         : Lavc57.57.100 xsub
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Chapter #1:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #1:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #1:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #1:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #1:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #1:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #1:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (libxvid))
  Stream #0:2 -> #0:1 (aac (native) -> mp3 (libmp3lame))
  Stream #0:3 -> #0:2 (dvd_subtitle (dvdsub) -> xsub (native))
  Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[null @ 02f902a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
frame=  191 fps=0.0 q=3.0 q=-0.0 size=      14kB time=00:00:07.99 bitrate=  14.3kbits/s speed=  16x    
frame=  359 fps=359 q=2.0 q=-0.0 size=     781kB time=00:00:14.69 bitrate= 435.5kbits/s speed=14.7x    
[xsub @ 02fa7b00] Color index 0 is not transparent. Transparency will be messed up.
[matroska,webm @ 003ac5c0] Read error
frame=  469 fps=348 q=4.0 Lq=-0.0 size=    3982kB time=00:00:18.76 bitrate=1738.3kbits/s speed=13.9x    
video:3820kB audio:3805kB subtitle:2kB other streams:0kB global headers:0kB muxing overhead: unknown

And is my Stream Mapping right? It says "Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))" but I didn't map that audio, and the others are repeated when I do xsubs.

comment:15 by Elon Musk, 8 years ago

For burning subtitle you first need to scale subtitle stream to size of video stream, see scale2ref filter.

xsub issue is probably related to #3247.

comment:16 by edumj, 8 years ago

Is not the same as canvas_size? I've tried canvas_size and didn't work with DVD subs, I think only worked with DVB subs.

Thanks, I'll try scale2ref.

comment:17 by edumj, 8 years ago

Sorry, but I can't figure out how to use scale2ref.

This example from here:

• Scale a subtitle stream to match the main video in size before overlaying 
'scale2ref[b][a];[a][b]overlay'

doesn't work.

I don't understand how to do something like this with scale2ref:

-filter_complex "[0:v][0:s:0]overlay[out]" -map "[out]"	

The closest I've done is this:

-filter_complex "[subteees]scale2ref[0:s:0][0:v];[0:v][0:s:0]overlay[out]" -map "[out]"

But I don't know why it works with some names like "sub", "subs", "subteees", etc, but not with "ein" for example. But video is very pixelated, and runs at 1000 fps!!

or with one example I found like this:

-filter_complex "[0:s:0][0:v]scale2ref[subs][0:v];[0:v][subs]overlay[out]" -map "[out]"

But doesn't even work.

comment:18 by Elon Musk, 8 years ago

Last command works here, make sure you use latest ffmpeg.

comment:19 by edumj, 8 years ago

Works (yes, it's latest), but subtitles don't show (only one subtitle at second 17). And with same "[matroska,webm @ 02f883e0] Read error".

output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955)_cut.mkv':
  Metadata:
    encoder         : libmkv 0.6.5
  Duration: 01:16:58.18, start: 0.000000, bitrate: 4 kb/s
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576
[Parsed_scale2ref_0 @ 03017720] circular filter chain detected
[avi @ 02f8bd40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[null @ 0304ee40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'E:\MISDOC~1\CONVER~1\_PACON~1\MEDIAI~1\FFD8CF~1\DVDAXS~1\CONFFM~1\\Francis en la Marina (1955)_cut overlay+scale2ref.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 1500 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Chapter #1:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #1:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #1:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #1:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #1:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #1:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #1:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:3 (dvdsub) -> scale2ref:default (graph 0)
  overlay (graph 0) -> Stream #0:0 (libxvid)
  Stream #0:2 -> #0:1 (aac (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[null @ 0304ee40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
frame=  133 fps=0.0 q=2.0 q=-0.0 size=     970kB time=00:00:05.67 bitrate=1400.4kbits/s speed=11.3x    
frame=  252 fps=252 q=2.0 q=-0.0 size=    1980kB time=00:00:10.45 bitrate=1552.0kbits/s speed=10.4x    
frame=  374 fps=249 q=3.0 q=-0.0 size=    2996kB time=00:00:15.33 bitrate=1599.9kbits/s speed=10.2x    
[matroska,webm @ 02f883e0] Read error
frame=  469 fps=247 q=4.0 Lq=-0.0 size=    3977kB time=00:00:18.76 bitrate=1735.7kbits/s speed=9.87x    
video:3820kB audio:3805kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Last edited 8 years ago by edumj (previous) (diff)

comment:20 by Elon Musk, 8 years ago

Why you are using _cut file? Its only ~18.seconds long.

comment:21 by Elon Musk, 8 years ago

Correct command is

 -lavfi [0:s:0][0:v]scale2ref[subs][video];[video][subs]overlay

in reply to:  20 comment:22 by edumj, 8 years ago

Replying to richardpl:

Why you are using _cut file? Its only ~18.seconds long.

Well, it's the sample someone (cehoyos?) cutted from the file I uploaded.

in reply to:  21 comment:23 by edumj, 8 years ago

Replying to richardpl:

Correct command is

 -lavfi [0:s:0][0:v]scale2ref[subs][video];[video][subs]overlay

Thanks! I'll try.

in reply to:  21 comment:24 by edumj, 8 years ago

Replying to richardpl:

Correct command is

 -lavfi [0:s:0][0:v]scale2ref[subs][video];[video][subs]overlay

Well, it's seems the same as with -filter_complez, same "Read error". Also video keeps very pixelated, and runs at 1000 fps (unless I especify -r 25, but I don't know why).

Instead, with -canvas_size it's seems to work better:

-canvas_size 720x384  -i "%~1" -filter_complex "[0:v][0:s:0]overlay[out]" -map "[out]"

Although I get a "Changing frame properties on the fly is not supported by all filters " all the time, and canvas_size must be final video size for sutitles to show.

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955)_cut.mkv':
  Metadata:
    encoder         : libmkv 0.6.5
  Duration: 01:16:58.18, start: 0.000000, bitrate: 4 kb/s
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576
[avi @ 0301b200] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[null @ 0300d120] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'E:\MISDOC~1\CONVER~1\_PACON~1\MEDIAI~1\FFD8CF~1\DVDAXS~1\CONFFM~1\\Francis en la Marina (1955)_cut canvas_size.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 1500 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Chapter #1:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #1:1: start 84.897000, end 1048.977000
    Metadata:
      title           : Chapter 2
    Chapter #1:2: start 1048.977000, end 1812.817000
    Metadata:
      title           : Chapter 3
    Chapter #1:3: start 1812.817000, end 2423.737000
    Metadata:
      title           : Chapter 4
    Chapter #1:4: start 2423.737000, end 3226.097000
    Metadata:
      title           : Chapter 5
    Chapter #1:5: start 3226.097000, end 3864.937000
    Metadata:
      title           : Chapter 6
    Chapter #1:6: start 3864.937000, end 4618.177000
    Metadata:
      title           : Chapter 7
    Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:3 (dvdsub) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (libxvid)
  Stream #0:2 -> #0:1 (aac (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:3 @ 03017980] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 3 times
[null @ 0300d120] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
[graph 0 input from stream 0:3 @ 03017980] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame=  133 fps=0.0 q=2.0 q=-0.0 size=     970kB time=00:00:05.67 bitrate=1400.4kbits/s speed=11.3x    
[graph 0 input from stream 0:3 @ 03017980] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame=  254 fps=253 q=2.0 q=-0.0 size=    1985kB time=00:00:10.51 bitrate=1546.0kbits/s speed=10.5x    
[graph 0 input from stream 0:3 @ 03017980] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  376 fps=250 q=3.0 q=-0.0 size=    3009kB time=00:00:15.40 bitrate=1600.5kbits/s speed=10.2x    
[graph 0 input from stream 0:3 @ 03017980] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 7 times
[matroska,webm @ 003fc460] Read error
frame=  469 fps=248 q=4.0 Lq=-0.0 size=    3998kB time=00:00:18.76 bitrate=1744.9kbits/s speed=9.92x    
video:3841kB audio:3805kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

comment:25 by Elon Musk, 8 years ago

You get read error because you use _cut file which is truncated.
You haven't pasted full command line you tried.
Using command I showed I don't get Changing frame properties on the fly is not supported by all filters.
And please use complete, untruncated file.

Last edited 8 years ago by Elon Musk (previous) (diff)

comment:26 by edumj, 8 years ago

Ok, no error with full file!

But the 1000 fps thing...

I used this full command:

"ffmpeg" -i "%~1" -lavfi [0:s:0][0:v]scale2ref[subs][video];[video][subs]overlay -map 0:a:1 -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "overlay+scale2ref -lavfi.avi"

And the resulting video is 1000 fps and very "pixelated" (low bitrate), but if I add "-r 25" as output, it's Ok. Do I have to always especify framerate for lavfi to work?

comment:27 by edumj, 8 years ago

Any way, I found another bug with VobSubs in this same file.

Subtitles dissapear again if I use crop filter, even with no cropping:

"ffmpeg" -canvas_size 720x384 -i "%~1" -filter_complex "[0:v]crop=720:384:0:0[video];[0:s:0]crop=720:384:0:0[subs];[video][subs]overlay[out]" -map "[out]" -map 0:a -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "%~n1 crop vobsubs.avi"

and the output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'C:\Users\Edumj\Videos\Pa Probar\DVDRip (MKV) con VobSub's\Francis en la Marina (1955) DVDRip DUAL SE by El enmascarado del Barça (copy).mkv':
  Metadata:
    ENCODER         : Lavf56.40.101
  Duration: 00:03:02.97, start: 0.000000, bitrate: 1386 kb/s
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 180.000000
    Metadata:
      title           : Chapter 2
    Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m/smpte170m/bt709), 720x384 [SAR 16:15 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1(spa): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:3(spa): Subtitle: dvd_subtitle, 720x576
[avi @ 0480bc00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 2 times
[null @ 04eaa1c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'E:\MISDOC~1\CONVER~1\_PACON~1\MEDIAI~1\FFD8CF~1\DVDAXS~1\CONFFM~1\\Francis en la Marina (1955) DVDRip DUAL SE by El enmascarado del Barça (copy) crop vobsubs.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Chapter #0:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 84.897000, end 180.000000
    Metadata:
      title           : Chapter 2
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 1500 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1(spa): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      LANGUAGE        : spa
      encoder         : Lavc57.57.100 libmp3lame
    Stream #0:2(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      LANGUAGE        : eng
      encoder         : Lavc57.57.100 libmp3lame
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Chapter #1:0: start 0.000000, end 84.897000
    Metadata:
      title           : Chapter 1
    Chapter #1:1: start 84.897000, end 180.000000
    Metadata:
      title           : Chapter 2
    Stream #1:0(eng): Video: wrapped_avframe, yuv420p, 720x384 [SAR 16:15 DAR 2:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      LANGUAGE        : eng
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1(spa): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      LANGUAGE        : spa
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 (h264) -> crop (graph 0)
  Stream #0:3 (dvdsub) -> crop (graph 0)
  overlay (graph 0) -> Stream #0:0 (libxvid)
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
  Stream #0:2 -> #0:2 (aac (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 3 times
[null @ 04eaa1c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 23
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame=  108 fps=0.0 q=3.0 q=-0.0 size=     771kB time=00:00:04.62 bitrate=1365.2kbits/s speed=9.25x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  204 fps=204 q=2.0 q=-0.0 size=    1740kB time=00:00:08.44 bitrate=1687.5kbits/s speed=8.43x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame=  309 fps=206 q=3.0 q=-0.0 size=    2543kB time=00:00:12.65 bitrate=1646.6kbits/s speed=8.42x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame=  404 fps=201 q=3.0 q=-0.0 size=    3551kB time=00:00:16.44 bitrate=1768.6kbits/s speed= 8.2x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame=  503 fps=201 q=4.0 q=-0.0 size=    4585kB time=00:00:20.41 bitrate=1839.8kbits/s speed=8.14x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  602 fps=200 q=4.0 q=-0.0 size=    5460kB time=00:00:24.38 bitrate=1834.3kbits/s speed=8.11x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  702 fps=200 q=4.0 q=-0.0 size=    6304kB time=00:00:28.37 bitrate=1820.2kbits/s speed=8.08x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  802 fps=200 q=5.0 q=-0.0 size=    7150kB time=00:00:32.36 bitrate=1809.9kbits/s speed=8.07x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame=  901 fps=200 q=4.0 q=-0.0 size=    7991kB time=00:00:36.33 bitrate=1801.9kbits/s speed=8.05x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1002 fps=200 q=4.0 q=-0.0 size=    8833kB time=00:00:40.38 bitrate=1791.9kbits/s speed=8.05x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1096 fps=199 q=4.0 q=-0.0 size=    9603kB time=00:00:44.11 bitrate=1783.1kbits/s speed=   8x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1195 fps=199 q=3.0 q=-0.0 size=   10410kB time=00:00:48.06 bitrate=1774.4kbits/s speed=7.99x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 1290 fps=198 q=3.0 q=-0.0 size=   11183kB time=00:00:51.88 bitrate=1765.8kbits/s speed=7.96x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1389 fps=198 q=3.0 q=-0.0 size=   12061kB time=00:00:55.87 bitrate=1768.4kbits/s speed=7.96x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1487 fps=198 q=4.0 q=-0.0 size=   13009kB time=00:00:59.79 bitrate=1782.3kbits/s speed=7.96x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 1574 fps=196 q=5.0 q=-0.0 size=   13810kB time=00:01:03.25 bitrate=1788.6kbits/s speed=7.89x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1670 fps=196 q=5.0 q=-0.0 size=   14691kB time=00:01:07.09 bitrate=1793.8kbits/s speed=7.88x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 1768 fps=196 q=4.0 q=-0.0 size=   15537kB time=00:01:11.01 bitrate=1792.2kbits/s speed=7.87x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 1862 fps=196 q=4.0 q=-0.0 size=   16257kB time=00:01:14.75 bitrate=1781.6kbits/s speed=7.85x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 1956 fps=195 q=3.0 q=-0.0 size=   16993kB time=00:01:18.54 bitrate=1772.3kbits/s speed=7.84x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 2052 fps=195 q=3.0 q=-0.0 size=   17816kB time=00:01:22.38 bitrate=1771.5kbits/s speed=7.83x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 2153 fps=195 q=2.0 q=-0.0 size=   18425kB time=00:01:26.39 bitrate=1747.0kbits/s speed=7.84x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 2244 fps=195 q=2.0 q=-0.0 size=   19298kB time=00:01:30.04 bitrate=1755.6kbits/s speed=7.82x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 2334 fps=194 q=3.0 q=-0.0 size=   20194kB time=00:01:33.67 bitrate=1766.0kbits/s speed=7.79x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 2416 fps=193 q=3.0 q=-0.0 size=   20897kB time=00:01:36.93 bitrate=1766.0kbits/s speed=7.74x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 2502 fps=192 q=3.0 q=-0.0 size=   21624kB time=00:01:40.37 bitrate=1764.8kbits/s speed=7.71x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame= 2591 fps=192 q=4.0 q=-0.0 size=   22499kB time=00:01:43.93 bitrate=1773.3kbits/s speed=7.68x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 2680 fps=191 q=3.0 q=-0.0 size=   23278kB time=00:01:47.49 bitrate=1773.9kbits/s speed=7.66x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 2769 fps=191 q=2.0 q=-0.0 size=   23925kB time=00:01:51.03 bitrate=1765.1kbits/s speed=7.64x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 2848 fps=189 q=4.0 q=-0.0 size=   24617kB time=00:01:54.21 bitrate=1765.6kbits/s speed= 7.6x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame= 2932 fps=189 q=3.0 q=-0.0 size=   25426kB time=00:01:57.56 bitrate=1771.7kbits/s speed=7.57x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 3023 fps=189 q=4.0 q=-0.0 size=   26209kB time=00:02:01.21 bitrate=1771.3kbits/s speed=7.56x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 3115 fps=188 q=4.0 q=-0.0 size=   27046kB time=00:02:04.86 bitrate=1774.4kbits/s speed=7.55x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 12 times
frame= 3208 fps=188 q=3.0 q=-0.0 size=   27780kB time=00:02:08.61 bitrate=1769.4kbits/s speed=7.55x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 3292 fps=188 q=4.0 q=-0.0 size=   28543kB time=00:02:11.96 bitrate=1771.8kbits/s speed=7.53x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 3381 fps=187 q=4.0 q=-0.0 size=   29282kB time=00:02:15.53 bitrate=1769.9kbits/s speed=7.51x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 7 times
frame= 3460 fps=187 q=3.0 q=-0.0 size=   29943kB time=00:02:18.68 bitrate=1768.7kbits/s speed=7.48x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 3547 fps=186 q=4.0 q=-0.0 size=   30711kB time=00:02:22.16 bitrate=1769.7kbits/s speed=7.47x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 3631 fps=186 q=4.0 q=-0.0 size=   31404kB time=00:02:25.53 bitrate=1767.7kbits/s speed=7.45x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 3725 fps=186 q=3.0 q=-0.0 size=   32210kB time=00:02:29.29 bitrate=1767.4kbits/s speed=7.45x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 3819 fps=186 q=4.0 q=-0.0 size=   33024kB time=00:02:33.04 bitrate=1767.7kbits/s speed=7.45x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame= 3897 fps=185 q=4.0 q=-0.0 size=   33656kB time=00:02:36.15 bitrate=1765.6kbits/s speed=7.42x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 8 times
frame= 3982 fps=185 q=3.0 q=-0.0 size=   34449kB time=00:02:39.57 bitrate=1768.5kbits/s speed= 7.4x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 11 times
frame= 4070 fps=185 q=4.0 q=-0.0 size=   35214kB time=00:02:43.09 bitrate=1768.7kbits/s speed= 7.4x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 4162 fps=185 q=4.0 q=-0.0 size=   35991kB time=00:02:46.76 bitrate=1768.0kbits/s speed=7.39x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 4247 fps=184 q=3.0 q=-0.0 size=   36692kB time=00:02:50.17 bitrate=1766.3kbits/s speed=7.38x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 4324 fps=184 q=3.0 q=-0.0 size=   37355kB time=00:02:53.24 bitrate=1766.3kbits/s speed=7.35x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 10 times
frame= 4402 fps=183 q=4.0 q=-0.0 size=   38079kB time=00:02:56.36 bitrate=1768.7kbits/s speed=7.33x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 9 times
frame= 4487 fps=183 q=3.0 q=-0.0 size=   38794kB time=00:02:59.79 bitrate=1767.5kbits/s speed=7.32x    
[graph 0 input from stream 0:3 @ 04875880] Changing frame properties on the fly is not supported by all filters.
    Last message repeated 1 times
frame= 4504 fps=183 q=3.0 Lq=-0.0 size=   39250kB time=00:03:03.00 bitrate=1757.0kbits/s speed=7.43x    
video:34838kB audio:39374kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

I use canvas_size to resize subs to video resoulution, although I think canvas_size shouldn't resize subs. Should I open another trac for this?

Last edited 8 years ago by edumj (previous) (diff)
Note: See TracTickets for help on using tickets.