Opened 4 years ago

Last modified 4 years ago

#2846 new defect

Two-pass libx264 -preset veryslow crashes on some MPEG-type inputs

Reported by: francois.visagie@gmail.com Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: crash libx264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

What you were trying to accomplish

I was trying to encode DVD VOBs to H.264 AAC MP4.

The problem you encountered (e.g., "ffmpeg crashed, see the gdb and valgrind output below" or "The output video was all green")

At the end of the 2nd pass, ffmpeg crashed. See below information and attached log files. The output file is not playable, probably due to missing atom etc. information.
Important:

This happens for '-c:v libx264 -preset veryslow'. When that is replaced with '-c:v libx264 -preset ultrafast', encoding completes correctly.
When input is frameserved from Avisynth 2.6.0 Alpha 4, encoding completes correctly, even with '-c:v libx264 -preset veryslow'.

The exact command line you were using (e.g., "ffmpeg -i input.mov -an -vcodec foo output.avi")

For this bug report I only encoded a single VOB file that is sufficient to induce this behaviour:
ffmpeg -y -i VTS_01_4.VOB -an -c:v libx264 -preset veryslow -fastfirstpass 1 -f rawvideo -b:v 1000000 -pass 1 NUL
ffmpeg -y -v 9 -loglevel 99 -report -i VTS_01_4.VOB -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 -pass 2 zzz.mp4

The full, uncut console output provided by ffmpeg -v 9 -loglevel 99 -i followed by the name of your input file (copy/pasted from the console, including the banner that indicates version and configuration options), paste ffplay output only if your problem is not reproducible with ffmpeg. You can use the -report option or define the FFREPORT environment variable (to any value) to get the exact command line and the full verbose console output in a file named ffmpeg-*.log...

Windows problem signature:


ffmpeg.exe has stopped working

Problem signature:

Problem Event Name: APPCRASH
Application Name: ffmpeg.exe
Application Version: 0.0.0.0
Application Timestamp: 51fadb46
Fault Module Name: ffmpeg.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 51fadb46
Exception Code: c0000005
Exception Offset: 009bd18a
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 7177
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

1st pass console output:


C:\Users\fvisagie\Videos\My DVDs\MainMovie?\Roxette Live in Sydney - 1991\VIDEO_TS>ffmpeg -y -i VTS_01_4.VOB -an -c:v libx264 -preset veryslow -fastfirstpass 1 -f rawvideo -b:v 1000000 -pass 1 NUL
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpeg2video @ 024799a0] Invalid frame dimensions 0x0.

Last message repeated 9 times

Input #0, mpeg, from 'VTS_01_4.VOB':

Duration: 00:17:27.43, start: 3283.505333, bitrate: 7847 kb/s

Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x1bf]: Data: dvd_nav_packet

[libx264 @ 0247eb00] using SAR=32/27
[libx264 @ 0247eb00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0247eb00] profile Main, level 3.0
Output #0, rawvideo, to 'NUL':

Metadata:

encoder : Lavf55.12.102
Stream #0:0: Video: h264 (libx264), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=-1--1, pass 1, 1000 kb/s, 90k tbn, 29.97 tbc

Stream mapping:

Stream #0:0 -> #0:0 (mpeg2video -> libx264)

Press [q] to stop, ? for help
[mpeg2video @ 024799a0] warning: first frame is no keyframe

Last message repeated 1 times

frame=31388 fps= 75 q=-1.0 Lsize= 132007kB time=00:17:27.24 bitrate=1032.6kbits/s dup=8 drop=0
video:132007kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000%
[libx264 @ 0247eb00] frame I:193 Avg QP:21.83 size: 16334
[libx264 @ 0247eb00] frame P:6536 Avg QP:24.53 size: 8138
[libx264 @ 0247eb00] frame B:24659 Avg QP:25.35 size: 3197
[libx264 @ 0247eb00] consecutive B-frames: 1.8% 1.9% 12.8% 4.9% 3.9% 73.2% 0.7% 0.1% 0.7%
[libx264 @ 0247eb00] mb I I16..4: 50.3% 0.0% 49.7%
[libx264 @ 0247eb00] mb P I16..4: 51.1% 0.0% 0.0% P16..4: 43.4% 0.0% 0.0% 0.0% 0.0% skip: 5.6%
[libx264 @ 0247eb00] mb B I16..4: 8.6% 0.0% 0.0% B16..8: 33.4% 0.0% 0.0% direct:24.3% skip:33.7% L0:39.9% L1:47.6% BI:12.5%
[libx264 @ 0247eb00] final ratefactor: 22.76
[libx264 @ 0247eb00] direct mvs spatial:100.0% temporal:0.0%
[libx264 @ 0247eb00] coded y,uvDC,uvAC intra: 22.1% 54.9% 5.3% inter: 15.7% 33.8% 0.2%
[libx264 @ 0247eb00] i16 v,h,dc,p: 33% 32% 23% 12%
[libx264 @ 0247eb00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 29% 14% 6% 6% 6% 7% 5% 5%
[libx264 @ 0247eb00] i8c dc,h,v,p: 52% 23% 18% 6%
[libx264 @ 0247eb00] Weighted P-Frames: Y:15.6% UV:11.2%
[libx264 @ 0247eb00] kb/s:1032.55

2nd pass console output:


C:\Users\fvisagie\Videos\My DVDs\MainMovie?\Roxette Live in Sydney - 1991\VIDEO_TS>ffmpeg -y -v 9 -loglevel 99 -report -i VTS_01_4.VOB -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 -pass 2 zzz.mp4
ffmpeg started on 2013-08-08 at 11:16:30
Report written to "ffmpeg-20130808-111630.log"
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input file with argument 'VTS_01_4.VOB'.
Reading option '-filter:a' ... matched as option 'filter' (set stream filtergraph) with argument 'aformat=channel_layouts=stereo'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'veryslow'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '1000000'.
Reading option '-pass' ... matched as option 'pass' (select the pass number (1 to 3)) with argument '2'.
Reading option 'zzz.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file VTS_01_4.VOB.
Successfully parsed a group of options.
Opening an input file: VTS_01_4.VOB.
[mpeg @ 003ca7e0] Format mpeg probed with size=8192 and score=52
[mpeg @ 003ca7e0] File position before avformat_find_stream_info() is 0
[mpeg @ 003ca7e0] probing stream 0 pp:2500
[mpeg @ 003ca7e0] Probe with size=2025, packets=1 detected aac with score=1
[mpeg @ 003ca7e0] probing stream 0 pp:2499
[mpeg @ 003ca7e0] Probe with size=4050, packets=2 detected aac with score=1
[mpeg @ 003ca7e0] probing stream 0 pp:2498
[mpeg @ 003ca7e0] probing stream 0 pp:2497
[mpeg @ 003ca7e0] probing stream 0 pp:2496
[mpeg @ 003ca7e0] probing stream 0 pp:2495
[mpeg @ 003ca7e0] probing stream 0 pp:2494
[mpeg @ 003ca7e0] probing stream 0 pp:2493
[mpeg @ 003ca7e0] probing stream 0 pp:2492
[mpeg @ 003ca7e0] probing stream 0 pp:2491
[mpeg @ 003ca7e0] probing stream 0 pp:2490
[mpeg @ 003ca7e0] probing stream 0 pp:2489
[mpeg @ 003ca7e0] probing stream 0 pp:2488
[mpeg @ 003ca7e0] probing stream 0 pp:2487
[mpeg @ 003ca7e0] probing stream 0 pp:2486
[mpeg @ 003ca7e0] probing stream 0 pp:2485
[mpeg @ 003ca7e0] probing stream 0 pp:2484
[mpeg @ 003ca7e0] probing stream 0 pp:2483
[mpeg @ 003ca7e0] probing stream 0 pp:2482
[mpeg @ 003ca7e0] probing stream 0 pp:2481
[mpeg @ 003ca7e0] probing stream 0 pp:2480
[mpeg @ 003ca7e0] probing stream 0 pp:2479
[mpeg @ 003ca7e0] probing stream 0 pp:2478
[mpeg @ 003ca7e0] probing stream 0 pp:2477
[mpeg @ 003ca7e0] probing stream 0 pp:2476
[mpeg @ 003ca7e0] probing stream 0 pp:2475
[mpeg @ 003ca7e0] probing stream 0 pp:2474
[mpeg @ 003ca7e0] probing stream 0 pp:2473
[mpeg @ 003ca7e0] probing stream 0 pp:2472
[mpeg @ 003ca7e0] probing stream 0 pp:2471
[mpeg @ 003ca7e0] probing stream 0 pp:2470
[mpeg @ 003ca7e0] probing stream 0 pp:2469
[mpeg @ 003ca7e0] probing stream 0 pp:2468
[mpeg @ 003ca7e0] probing stream 0 pp:2467
[mpeg @ 003ca7e0] probing stream 0 pp:2466
[mpeg @ 003ca7e0] probing stream 0 pp:2465
[mpeg @ 003ca7e0] probing stream 0 pp:2464
[mpeg @ 003ca7e0] probing stream 0 pp:2463
[mpeg @ 003ca7e0] probing stream 0 pp:2462
[mpeg @ 003ca7e0] probing stream 0 pp:2461
[mpeg @ 003ca7e0] probing stream 0 pp:2460
[mpeg @ 003ca7e0] probing stream 0 pp:2459
[mpeg @ 003ca7e0] probing stream 0 pp:2458
[mpeg @ 003ca7e0] probing stream 0 pp:2457
[mpeg @ 003ca7e0] probing stream 0 pp:2456
[mpeg @ 003ca7e0] probing stream 0 pp:2455
[mpeg @ 003ca7e0] probing stream 0 pp:2454
[mpeg @ 003ca7e0] probing stream 0 pp:2453
[mpeg @ 003ca7e0] probing stream 0 pp:2452
[mpeg @ 003ca7e0] probing stream 0 pp:2451
[mpeg @ 003ca7e0] probing stream 0 pp:2450
[mpeg @ 003ca7e0] probing stream 0 pp:2449
[mpeg @ 003ca7e0] probing stream 0 pp:2448
[mpeg @ 003ca7e0] probing stream 0 pp:2447
[mpeg @ 003ca7e0] probing stream 0 pp:2446
[mpeg @ 003ca7e0] probing stream 0 pp:2445
[mpeg @ 003ca7e0] probing stream 0 pp:2444
[mpeg @ 003ca7e0] probing stream 0 pp:2443
[mpeg @ 003ca7e0] probing stream 0 pp:2442
[mpeg @ 003ca7e0] probing stream 0 pp:2441
[mpeg @ 003ca7e0] probing stream 0 pp:2440
[mpeg @ 003ca7e0] probing stream 0 pp:2439
[mpeg @ 003ca7e0] probing stream 0 pp:2438
[mpeg @ 003ca7e0] probing stream 0 pp:2437
[mpeg @ 003ca7e0] probing stream 0 pp:2436
[mpeg @ 003ca7e0] Probe with size=131625, packets=65 detected h263 with score=25
[mpeg @ 003ca7e0] probing stream 0 pp:2435
[mpeg @ 003ca7e0] probing stream 0 pp:2434
[mpeg @ 003ca7e0] probing stream 0 pp:2433
[mpeg @ 003ca7e0] probing stream 0 pp:2432
[mpeg @ 003ca7e0] probing stream 0 pp:2431
[mpeg @ 003ca7e0] probing stream 0 pp:2430
[mpeg @ 003ca7e0] probing stream 0 pp:2429
[mpeg @ 003ca7e0] probing stream 0 pp:2428
[mpeg @ 003ca7e0] probing stream 0 pp:2427
[mpeg @ 003ca7e0] probing stream 0 pp:2426
[mpeg @ 003ca7e0] probing stream 0 pp:2425
[mpeg @ 003ca7e0] probing stream 0 pp:2424
[mpeg @ 003ca7e0] probing stream 0 pp:2423
[mpeg @ 003ca7e0] probing stream 0 pp:2422
[mpeg @ 003ca7e0] probing stream 0 pp:2421
[mpeg @ 003ca7e0] probing stream 0 pp:2420
[mpeg @ 003ca7e0] probing stream 0 pp:2419
[mpeg @ 003ca7e0] probing stream 0 pp:2418
[mpeg @ 003ca7e0] probing stream 0 pp:2417
[mpeg @ 003ca7e0] probing stream 0 pp:2416
[mpeg @ 003ca7e0] probing stream 0 pp:2415
[mpeg @ 003ca7e0] probing stream 0 pp:2414
[mpeg @ 003ca7e0] probing stream 0 pp:2413
[mpeg @ 003ca7e0] probing stream 0 pp:2412
[mpeg @ 003ca7e0] probing stream 0 pp:2411
[mpeg @ 003ca7e0] probing stream 0 pp:2410
[mpeg @ 003ca7e0] probing stream 0 pp:2409
[mpeg @ 003ca7e0] probing stream 0 pp:2408
[mpeg @ 003ca7e0] probing stream 0 pp:2407
[mpeg @ 003ca7e0] probing stream 0 pp:2406
[mpeg @ 003ca7e0] probing stream 0 pp:2405
[mpeg @ 003ca7e0] probing stream 0 pp:2404
[mpeg @ 003ca7e0] probing stream 0 pp:2403
[mpeg @ 003ca7e0] probing stream 0 pp:2402
[mpeg @ 003ca7e0] probing stream 0 pp:2401
[mpeg @ 003ca7e0] probing stream 0 pp:2400
[mpeg @ 003ca7e0] probing stream 0 pp:2399
[mpeg @ 003ca7e0] probing stream 0 pp:2398
[mpeg @ 003ca7e0] probing stream 0 pp:2397
[mpeg @ 003ca7e0] probing stream 0 pp:2396
[mpeg @ 003ca7e0] probing stream 0 pp:2395
[mpeg @ 003ca7e0] probing stream 0 pp:2394
[mpeg @ 003ca7e0] probing stream 0 pp:2393
[mpeg @ 003ca7e0] probing stream 0 pp:2392
[mpeg @ 003ca7e0] probing stream 0 pp:2391
[mpeg @ 003ca7e0] probing stream 0 pp:2390
[mpeg @ 003ca7e0] probing stream 0 pp:2389
[mpeg @ 003ca7e0] probing stream 0 pp:2388
[mpeg @ 003ca7e0] probing stream 0 pp:2387
[mpeg @ 003ca7e0] probing stream 0 pp:2386
[mpeg @ 003ca7e0] probing stream 0 pp:2385
[mpeg @ 003ca7e0] probing stream 0 pp:2384
[mpeg @ 003ca7e0] probing stream 0 pp:2383
[mpeg @ 003ca7e0] probing stream 0 pp:2382
[mpeg @ 003ca7e0] probing stream 0 pp:2381
[mpeg @ 003ca7e0] probing stream 0 pp:2380
[mpeg @ 003ca7e0] probing stream 0 pp:2379
[mpeg @ 003ca7e0] probing stream 0 pp:2378
[mpeg @ 003ca7e0] probing stream 0 pp:2377
[mpeg @ 003ca7e0] probing stream 0 pp:2376
[mpeg @ 003ca7e0] probing stream 0 pp:2375
[mpeg @ 003ca7e0] probing stream 0 pp:2374
[mpeg @ 003ca7e0] probing stream 0 pp:2373
[mpeg @ 003ca7e0] probing stream 0 pp:2372
[mpeg @ 003ca7e0] probing stream 0 pp:2371
[mpeg @ 003ca7e0] Probe with size=262636, packets=130 detected mpegvideo with score=51
[mpeg @ 003ca7e0] probed stream 0
[dca @ 003ce780] Stream with high frequencies VQ coding
[mpeg2video @ 003c8b00] Invalid frame dimensions 0x0.

Last message repeated 2 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295527960 in the queue
[mpeg @ 003ca7e0] Non-increasing DTS in stream 2: packet 3 with DTS 295527960, packet 4 with DTS 295527960
[mpeg2video @ 003c8b00] Invalid frame dimensions 0x0.
[mpeg @ 003ca7e0] Non-increasing DTS in stream 0: packet 2 with DTS 9223090561878065151, packet 5 with DTS 9223090561878065151
[mpeg2video @ 003c8b00] Invalid frame dimensions 0x0.
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295530840 in the queue

Last message repeated 1 times

[mpeg2video @ 003c8b00] Invalid frame dimensions 0x0.

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295539480 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] Non-increasing DTS in stream 0: packet 5 with DTS 9223090561878065151, packet 8 with DTS 9223090561878065151
[mpeg2video @ 003c8b00] Invalid frame dimensions 0x0.

Last message repeated 2 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295548120 in the queue
[mpeg @ 003ca7e0] Non-increasing DTS in stream 0: packet 8 with DTS 9223090561878065151, packet 11 with DTS 295548648
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295553880 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295562520 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295568280 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295576920 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295585560 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295591320 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295599960 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295608600 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295614360 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295623000 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295628760 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295637400 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295646040 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295651800 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295660440 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295669080 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295674840 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295683480 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295689240 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295697880 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295706520 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295712280 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295720920 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295729560 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295735320 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295743960 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295749720 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295758360 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295767000 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295772760 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295781400 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295790040 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295795800 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295804440 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295810200 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295818840 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295827480 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295833240 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295841880 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295850520 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295856280 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295864920 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295870680 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295879320 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295887960 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295893720 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295902360 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295911000 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295916760 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295925400 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295931160 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295939800 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295948440 in the queue
[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295954200 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] first_dts 295519320 not matching first dts 295962840 in the queue

Last message repeated 1 times

[mpeg @ 003ca7e0] max_analyze_duration 5000000 reached at 5002667 microseconds
[mpeg @ 003ca7e0] File position after avformat_find_stream_info() is 0
Input #0, mpeg, from 'VTS_01_4.VOB':

Duration: 00:17:27.43, start: 3283.505333, bitrate: 7847 kb/s

Stream #0:0[0x1e0], 151, 1/90000: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 1001/60000, max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn

, 59.94 tbc

Stream #0:1[0x8a], 471, 1/90000: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:2[0x80], 158, 1/90000: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3[0x1bf], 10, 1/90000: Data: dvd_nav_packet, 1/90000

Successfully opened the file.
Parsing a group of options: output file zzz.mp4.
Applying option filter:a (set stream filtergraph) with argument aformat=channel_layouts=stereo.
Applying option c:v (codec name) with argument libx264.
Applying option b:v (video bitrate (please use -b:v)) with argument 1000000.
Applying option pass (select the pass number (1 to 3)) with argument 2.
Successfully parsed a group of options.
Opening an output file: zzz.mp4.
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 03d83140] Setting 'video_size' to value '720x480'
[graph 0 input from stream 0:0 @ 03d83140] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 03d83140] Setting 'time_base' to value '1/90000'
[graph 0 input from stream 0:0 @ 03d83140] Setting 'pixel_aspect' to value '32/27'
[graph 0 input from stream 0:0 @ 03d83140] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 03d83140] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 03d83140] w:720 h:480 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:32/27 sws_param:flags=2
[format @ 003ce680] compat: called with args=[yuv420p|yuvj420p|yuv422p|yuv444p]
[format @ 003ce680] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuv444p'
[AVFilterGraph @ 03d1dfe0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[Parsed_aformat_0 @ 03d96420] Setting 'channel_layouts' to value 'stereo'
[graph 1 input from stream 0:1 @ 03d964a0] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 0:1 @ 03d964a0] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 0:1 @ 03d964a0] Setting 'sample_fmt' to value 'fltp'
[graph 1 input from stream 0:1 @ 03d964a0] Setting 'channel_layout' to value '0x60f'
[graph 1 input from stream 0:1 @ 03d964a0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[audio format for output stream 0:1 @ 03d96660] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 03d96660] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[Parsed_aformat_0 @ 03d96420] auto-inserting filter 'auto-inserted resampler 0' between the filter 'graph 1 input from stream 0:1' and the filter 'Parsed_aforma
t_0'
[AVFilterGraph @ 03d41e60] query_formats: 4 queried, 7 merged, 3 already done, 0 delayed
0.414214 0.000000 0.292893 0.000000 0.292893 0.000000
0.000000 0.414214 0.292893 0.000000 0.000000 0.292893
[auto-inserted resampler 0 @ 003c3d00] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[libx264 @ 003cc860] using mv_range_thread = 40
[libx264 @ 003cc860] using SAR=32/27
[libx264 @ 003cc860] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 003cc860] profile High, level 4.0
[libx264 @ 003cc860] 264 - core 135 r2345 f0c1c53 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 de
block=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 ch
roma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=
2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=2pass mbtree=1 bitrate=1000 ratetol=1
.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 cplxblur=20.0 qblur=0.5 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'zzz.mp4':

Metadata:

encoder : Lavf55.12.102
Stream #0:0, 0, 1/30000: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 1001/30000, q=-1--1, pass 2, 1000 kb/s, 30k

tbn, 29.97 tbc

Stream #0:1, 0, 1/48000: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #0:1 -> #0:1 (dca -> libvo_aacenc)

Press [q] to stop, ? for help
[dca @ 003ce780] Stream with high frequencies VQ coding
[mpeg2video @ 003c8b00] warning: first frame is no keyframe
* 12 dup!
[mpeg2video @ 003c8b00] warning: first frame is no keyframe

... -> see log files for rest


I use the Zeranoe builds and do not have access to gdb, valgrind or the ffmpeg_g debug binary.

Kind regards,
Francois

Attachments (1)

ffmpeg logs.rar (1.3 MB) - added by francois.visagie@gmail.com 4 years ago.
ffmpeg logs

Download all attachments as: .zip

Change History (27)

Changed 4 years ago by francois.visagie@gmail.com

ffmpeg logs

comment:1 Changed 4 years ago by francois.visagie@gmail.com

Further information to this:

  1. Single-pass encoding - with otherwise the same settings as 2-pass encoding above - works:

ffmpeg -y -i VTS_01_4.VOB -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 zzz.mp4

  1. Single-pass encoding works with the following formats, in addition to avisynth:

for %i in (asf avi dvd ffm hls mpeg svcd vcd vob) do ffmpeg -i VTS_01_4.VOB -c: copy -f %i pipe:1 | ffmpeg -y -i pipe:0 -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 zzz1%i.mp4

For the avi format I have to add '-map 0:v:0 -map #0x80' before '-c: copy' to prevent parsing errors with this input file not being the first in the VOB sequence, but otherwise the avi command line is identical to the others.

  1. 2-pass encoding only works with the following formats in addition to avisynth:

for %i in (asf avi ffm) do ffmpeg -i VTS_01_4.VOB -c: copy -f %i pipe:1 | ffmpeg -y -i pipe:0 -an -c:v libx264 -preset veryslow -fastfirstpass 1 -f rawvideo -b:v 1000000 -pass 1 NUL && ffmpeg -i VTS_01_4.VOB -c: copy -f %i pipe:1 | ffmpeg -y -i pipe:0 -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 -pass 2 zzz2%i.mp4

For the avi format I have to add '-map 0:v:0 -map #0x80' before '-c: copy' to prevent parsing errors with this input file not being the first in the VOB sequence, but otherwise the avi command line is identical to the others.

  1. 2-pass encoding crashes at the end of pass 2 with the following formats:

for %i in (dvd hls mpeg svcd vcd vob) do ffmpeg -i VTS_01_4.VOB -c: copy -f %i pipe:1 | ffmpeg -y -i pipe:0 -an -c:v libx264 -preset veryslow -fastfirstpass 1 -f rawvideo -b:v 1000000 -pass 1 NUL && ffmpeg -i VTS_01_4.VOB -c: copy -f %i pipe:1 | ffmpeg -y -i pipe:0 -filter:a aformat=channel_layouts=stereo -c:v libx264 -preset veryslow -b:v 1000000 -pass 2 zzz2%i.mp4

According to console output, hls is demuxed as mpegts before decoding.


In summary:
With this input, ffmpeg crashes when:

  • content is demuxed from an MPEG-type format, and
  • 2-pass encoding is used, and
  • '-c:v libx264 -preset veryslow' is used

This happened with 2 out of 20 DVDs I attempted to transcode to H.264 AAC MP4, namely "Neil Diamond Live at the Greek" and "Roxette Live in Sydney - 1991".


I can upload the above VTS_01_4.VOB if needed.

Last edited 4 years ago by francois.visagie@gmail.com (previous) (diff)

comment:2 Changed 4 years ago by francois.visagie@gmail.com

  • Keywords demux MPEG two-pass added

comment:3 Changed 4 years ago by francois.visagie@gmail.com

  • Summary changed from libx264 -preset veryslow crashes on some input files to Two-pass libx264 -preset veryslow crashes on some MPEG-type inputs

comment:4 follow-ups: Changed 4 years ago by cehoyos

  • Keywords demux MPEG two-pass veryslow removed

Please provide a sample that allows to reproduce the crash.

Am I correct that the crash does not happen if you either use -vsync 0 for both the first and the second pass or if you use -an for both passes or if you use the same audio filter for the first pass as for the second?

comment:5 in reply to: ↑ 4 ; follow-up: Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

Please provide a sample that allows to reproduce the crash.

No problem. Do I need to follow "Submitting Sample Media" under http://www.ffmpeg.org/bugreports.html exactly (splitting in 10,000-byte chunks, converting to RGB/YUV/PCM? etc.), or can I just upload the appropriately renamed VTS_01_4.VOB?

Am I correct that the crash does not happen if you either use -vsync 0 for both the first and the second pass or if you use -an for both passes or if you use the same audio filter for the first pass as for the second?

Thanks for the suggestions; I am running those tests now.

comment:6 in reply to: ↑ 5 Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

Replying to cehoyos:

Please provide a sample that allows to reproduce the crash.

No problem. Do I need to follow "Submitting Sample Media" under http://www.ffmpeg.org/bugreports.html exactly (splitting in 10,000-byte chunks, converting to RGB/YUV/PCM? etc.), or can I just upload the appropriately renamed VTS_01_4.VOB?

Please do not upload several small files to circumvent a size limit.
There is no size limit but please test if a cut sample allows to reproduce the problem, if it does, upload a small file. (Do not upload a file that does not allow to reproduce the problem.)

comment:7 in reply to: ↑ 4 Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

Am I correct that the crash does not happen if you either use -vsync 0 for both the first and the second pass or if you use -an for both passes or if you use the same audio filter for the first pass as for the second?

Two-pass encoding completes successfully with either '-vsync 0' for both passes or '-an' for both passes. Using '-vsync 0' causes A/V sync loss (with this input at least).

Two-pass encoding with '-filter:a aformat=channel_layouts=stereo' in both passes crashes as in the bug report above. Very unfortunately, since that would have been a great work-around - using piping to converts formats on the fly seems to cause AV sync loss/changes in some cases, which is something I'm looking into separately.

Last edited 4 years ago by francois.visagie@gmail.com (previous) (diff)

comment:8 in reply to: ↑ 4 Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

Please provide a sample that allows to reproduce the crash.

I've uploaded

upload.ffmpeg.org/incoming/ticket_2846_crash_libx264.txt

and

upload.ffmpeg.org/incoming/ticket_2846_crash_libx264.vob

ticket_2846_crash_libx264.vob is the smallest cut I couild find of VTS_01_4.VOB that still reproduces this issue.

comment:9 Changed 4 years ago by cehoyos

ffmpeg does not crash for me if I use the audiofilter for both passes, could you provide command lines plus console output?

comment:10 Changed 4 years ago by francois.visagie@gmail.com

Here you go:

C:\Users\fvisagie\Videos\Home Videos\Testing\Bug information>ffmpeg -y -i ticket_2846_crash_libx264.vob -filter:a aformat=channel_layouts=stereo -c:v libx264 -p
reset veryslow -fastfirstpass 1 -f rawvideo -b:v 1000000 -pass 1 NUL
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpeg2video @ 0366fc80] Invalid frame dimensions 0x0.
Input #0, mpeg, from 'ticket_2846_crash_libx264.vob':

Duration: 00:02:11.08, start: 4199.857333, bitrate: 7838 kb/s

Stream #0:0[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:3[0x1bf]: Data: dvd_nav_packet

[libx264 @ 03715020] using SAR=32/27
[libx264 @ 03715020] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 03715020] profile Main, level 3.0
Output #0, rawvideo, to 'NUL':

Metadata:

encoder : Lavf55.12.102
Stream #0:0: Video: h264 (libx264), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=-1--1, pass 1, 1000 kb/s, 90k tbn, 29.97 tbc

Stream mapping:

Stream #0:2 -> #0:0 (mpeg2video -> libx264)

Press [q] to stop, ? for help
[mpeg2video @ 0366fc80] warning: first frame is no keyframe

Last message repeated 1 times

frame= 3924 fps= 71 q=-1.0 Lsize= 15630kB time=00:02:10.86 bitrate= 978.4kbits/s dup=0 drop=1
video:15630kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000%
[libx264 @ 03715020] frame I:38 Avg QP:27.40 size: 13392
[libx264 @ 03715020] frame P:1052 Avg QP:30.54 size: 6790
[libx264 @ 03715020] frame B:2834 Avg QP:32.24 size: 2947
[libx264 @ 03715020] consecutive B-frames: 5.5% 5.9% 19.3% 14.2% 5.7% 49.4% 0.0% 0.0% 0.0%
[libx264 @ 03715020] mb I I16..4: 45.0% 0.0% 55.0%
[libx264 @ 03715020] mb P I16..4: 51.6% 0.0% 0.0% P16..4: 39.5% 0.0% 0.0% 0.0% 0.0% skip: 8.9%
[libx264 @ 03715020] mb B I16..4: 8.3% 0.0% 0.0% B16..8: 33.3% 0.0% 0.0% direct:13.4% skip:45.0% L0:40.6% L1:47.7% BI:11.7%
[libx264 @ 03715020] final ratefactor: 26.54
[libx264 @ 03715020] direct mvs spatial:99.9% temporal:0.1%
[libx264 @ 03715020] coded y,uvDC,uvAC intra: 24.3% 37.6% 2.5% inter: 14.3% 19.7% 0.2%
[libx264 @ 03715020] i16 v,h,dc,p: 32% 35% 18% 15%
[libx264 @ 03715020] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 31% 13% 6% 5% 5% 6% 5% 5%
[libx264 @ 03715020] i8c dc,h,v,p: 58% 21% 15% 6%
[libx264 @ 03715020] Weighted P-Frames: Y:12.0% UV:9.7%
[libx264 @ 03715020] kb/s:977.90

C:\Users\fvisagie\Videos\Home Videos\Testing\Bug information>ffmpeg -y -i ticket_2846_crash_libx264.vob -filter:a aformat=channel_layouts=stereo -c:v libx264 -p
reset veryslow -b:v 1000000 -pass 2 zzz.mp4
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpeg2video @ 039f6f60] Invalid frame dimensions 0x0.
Input #0, mpeg, from 'ticket_2846_crash_libx264.vob':

Duration: 00:02:11.08, start: 4199.857333, bitrate: 7838 kb/s

Stream #0:0[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:3[0x1bf]: Data: dvd_nav_packet

[libx264 @ 0428f020] using SAR=32/27
[libx264 @ 0428f020] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0428f020] profile High, level 4.0
[libx264 @ 0428f020] 264 - core 135 r2345 f0c1c53 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 de
block=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 ch
roma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=
2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=2pass mbtree=1 bitrate=1000 ratetol=1
.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 cplxblur=20.0 qblur=0.5 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'zzz.mp4':

Metadata:

encoder : Lavf55.12.102
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=-1--1, pass 2, 1000 kb/s, 30k tbn, 29.97 tbc
Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s

Stream mapping:

Stream #0:2 -> #0:0 (mpeg2video -> libx264)
Stream #0:0 -> #0:1 (dca -> libvo_aacenc)

Press [q] to stop, ? for help
[mpeg2video @ 039f6f60] warning: first frame is no keyframe

Last message repeated 1 times

frame= 3923 fps=8.4 q=28.0 size= 17725kB time=00:02:10.82 bitrate=1109.9kbits/s dup=4 drop=0

comment:11 Changed 4 years ago by cehoyos

Sorry, you have to use -f mov instead of -f rawvideo for the first pass.

comment:12 follow-up: Changed 4 years ago by francois.visagie@gmail.com

With '-f mov' instead of '-f rawvideo' the encode completes successfully. Interesting - is muxing to the same format in both passes a general requirement now, or does it serve only to avoid the problem in this case?

comment:13 in reply to: ↑ 12 ; follow-up: Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

With '-f mov' instead of '-f rawvideo' the encode completes successfully. Interesting - is muxing to the same format in both passes a general requirement now, or does it serve only to avoid the problem in this case?

It is needed at least for some inputs, note that if x264 does not crash, it will print an error message that the logfile (and therefore the 2-pass encoding) was useless. This is related to A/V-sync and assuming that the output of the second pass is correct (and that contrary to your example users have reported that adding weird filters to the second pass has a similar, imo unavoidable effect) I am not sure if anything can be changed within FFmpeg.

comment:14 Changed 4 years ago by francois.visagie@gmail.com

Thanks for your response.

comment:15 in reply to: ↑ 13 ; follow-up: Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

It is needed at least for some inputs ... This is related to A/V-sync ... I am not sure if anything can be changed within FFmpeg.

I can understand how having muxers with potentially different capabilities in the two passes may lead to problems - http://www.ffmpeg.org/ffmpeg-all.html#Advanced-options:

‘-vsync parameter’

...
‘-1, auto’

Chooses between 1 and 2 depending on muxer capabilities. This is the default method.

However,

Replying to francois.visagie@…:

In summary:
With this input, ffmpeg crashes when:

  • content is demuxed from an MPEG-type format, and
  • 2-pass encoding is used, and
  • '-c:v libx264 -preset veryslow' is used

the fact remains that at least '-c:v libx264 -preset ultrafast' handles this particular scenario correctly, while '-c:v libx264 -preset veryslow' doesn't?

comment:16 in reply to: ↑ 15 ; follow-up: Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

the fact remains that at least '-c:v libx264 -preset ultrafast' handles this particular scenario correctly

(I don't think so, I actually believe that it behaves much worse than -preset veryslow.)
Please provide command lines and complete, uncut console output.

comment:17 in reply to: ↑ 16 ; follow-up: Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

Replying to francois.visagie@…:

the fact remains that at least '-c:v libx264 -preset ultrafast' handles this particular scenario correctly

(I don't think so, I actually believe that it behaves much worse than -preset veryslow.)
Please provide command lines and complete, uncut console output.

Here you go:

C:\Users\fvisagie\Videos\Home Videos\Testing\Bug information>ffmpeg -y -i ticket_2846_crash_libx264.vob -an -c:v libx264 -preset ultrafast -fastfirstpass 1 -f r
awvideo -b:v 1000000 -pass 1 NUL
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpeg2video @ 03b0e220] Invalid frame dimensions 0x0.
Input #0, mpeg, from 'ticket_2846_crash_libx264.vob':

Duration: 00:02:11.08, start: 4199.857333, bitrate: 7838 kb/s

Stream #0:0[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:3[0x1bf]: Data: dvd_nav_packet

[libx264 @ 04181020] using SAR=32/27
[libx264 @ 04181020] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 04181020] profile Constrained Baseline, level 3.0
Output #0, rawvideo, to 'NUL':

Metadata:

encoder : Lavf55.12.102
Stream #0:0: Video: h264 (libx264), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=-1--1, pass 1, 1000 kb/s, 90k tbn, 29.97 tbc

Stream mapping:

Stream #0:2 -> #0:0 (mpeg2video -> libx264)

Press [q] to stop, ? for help
[mpeg2video @ 03b0e220] warning: first frame is no keyframe

Last message repeated 1 times

frame= 3924 fps=526 q=-1.0 Lsize= 15960kB time=00:02:10.93 bitrate= 998.6kbits/s dup=0 drop=1
video:15960kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000%
[libx264 @ 04181020] frame I:16 Avg QP:32.12 size: 11993
[libx264 @ 04181020] frame P:3908 Avg QP:35.22 size: 4133
[libx264 @ 04181020] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 04181020] mb P I16..4: 21.4% 0.0% 0.0% P16..4: 40.3% 0.0% 0.0% 0.0% 0.0% skip:38.2%
[libx264 @ 04181020] final ratefactor: 31.59
[libx264 @ 04181020] coded y,uvDC,uvAC intra: 18.0% 23.2% 1.9% inter: 15.1% 15.1% 0.3%
[libx264 @ 04181020] i16 v,h,dc,p: 34% 33% 18% 15%
[libx264 @ 04181020] i8c dc,h,v,p: 56% 21% 16% 7%
[libx264 @ 04181020] kb/s:998.56

C:\Users\fvisagie\Videos\Home Videos\Testing\Bug information>ffmpeg -y -i ticket_2846_crash_libx264.vob -filter:a aformat=channel_layouts=stereo -c:v libx264 -
preset ultrafast -b:v 1000000 -pass 2 zzz.mp4
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers

built on Aug 1 2013 18:01:57 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib

libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100

[mpeg2video @ 03226f60] Invalid frame dimensions 0x0.
Input #0, mpeg, from 'ticket_2846_crash_libx264.vob':

Duration: 00:02:11.08, start: 4199.857333, bitrate: 7838 kb/s

Stream #0:0[0x8a]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], max. 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:3[0x1bf]: Data: dvd_nav_packet

[libx264 @ 0447f020] using SAR=32/27
[libx264 @ 0447f020] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0447f020] profile Constrained Baseline, level 3.0
[libx264 @ 0447f020] 264 - core 135 r2345 f0c1c53 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deb
lock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_
offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_m
in=25 scenecut=0 intra_refresh=0 rc=2pass mbtree=0 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 cplxblur=20.0 qblur=0.5 ip_ratio=1.40 aq=0
Output #0, mp4, to 'zzz.mp4':

Metadata:

encoder : Lavf55.12.102
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=-1--1, pass 2, 1000 kb/s, 30k tbn, 29.97 tbc
Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s

Stream mapping:

Stream #0:2 -> #0:0 (mpeg2video -> libx264)
Stream #0:0 -> #0:1 (dca -> libvo_aacenc)

Press [q] to stop, ? for help
[mpeg2video @ 03226f60] warning: first frame is no keyframe

Last message repeated 1 times

[libx264 @ 0447f020] 2nd pass has more frames than 1st pass (3924)e=1126.9kbits/s dup=4 drop=0
[libx264 @ 0447f020] continuing anyway, at constant QP=36
frame= 3929 fps=408 q=-1.0 Lsize= 18182kB time=00:02:11.10 bitrate=1136.1kbits/s dup=4 drop=0
video:16021kB audio:2049kB subtitle:0 global headers:0kB muxing overhead 0.617050%
[libx264 @ 0447f020] frame I:16 Avg QP:32.50 size: 11913
[libx264 @ 0447f020] frame P:3913 Avg QP:35.27 size: 4144
[libx264 @ 0447f020] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0447f020] mb P I16..4: 22.5% 0.0% 0.0% P16..4: 39.0% 0.0% 0.0% 0.0% 0.0% skip:38.5%
[libx264 @ 0447f020] coded y,uvDC,uvAC intra: 19.0% 23.7% 1.7% inter: 15.0% 14.6% 0.2%
[libx264 @ 0447f020] i16 v,h,dc,p: 34% 33% 18% 15%
[libx264 @ 0447f020] i8c dc,h,v,p: 55% 22% 16% 8%
[libx264 @ 0447f020] kb/s:1001.10

C:\Users\fvisagie\Videos\Home Videos\Testing\Bug information>

comment:18 in reply to: ↑ 17 ; follow-up: Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

[libx264 @ 0447f020] 2nd pass has more frames than 1st pass (3924)
[libx264 @ 0447f020] continuing anyway, at constant QP=36
frame= 3929 fps=408 q=-1.0 Lsize= 18182kB time=00:02:11.10 bitrate=1136.1kbits/s dup=4 drop=0

I may misunderstand how two-pass encoding works but I suspect this means that the encoding was completely broken (the statistics were wrong / did not match the actual encoded frames) and that aborting (without a crash as done with shorter input files with other presets) is much better.

comment:19 in reply to: ↑ 18 ; follow-up: Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

aborting (without a crash as done with shorter input files with other presets) is much better.

Perhaps '-preset ultrafast' handled the stats anomaly better in this instance, but for the sake of correctness I should point out that I've experienced no correlation between crashing and shorter input files.

I first experienced crashing when encoding whole DVDs and since it's happened whenever these conditions have been satisfied:

  • this particular input demuxed from MPEG-type format AND
  • two-pass encoding with different output format on pass 1 and audio filter on pass 2 AND
  • '-preset veryslow',

regardless of input file size.

comment:20 in reply to: ↑ 19 ; follow-up: Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

Replying to cehoyos:

aborting (without a crash as done with shorter input files with other presets) is much better.

Perhaps '-preset ultrafast' handled the stats anomaly better in this instance,

I don't think this is correct (on the contrary): -preset ultrafast succeeds two-pass encoding although the stat file did not match the encoded source, making the whole encode broken (this is not about a few additional frames with constant quantiser at the end of the video but an offset of ~five frames at the beginning, so except for the very first frames, all frames of the video where encoded with a non-optimal / wrong quantiser making the whole two-pass encoding useless).

but for the sake of correctness I should point out that I've experienced no correlation between crashing and shorter input files.

I thought you reported earlier (and I could reproduce this) that you were unable to reproduce the crash with a shorter input file than the one you uploaded?

comment:21 in reply to: ↑ 20 ; follow-up: Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

but for the sake of correctness I should point out that I've experienced no correlation between crashing and shorter input files.

I thought you reported earlier (and I could reproduce this) that you were unable to reproduce the crash with a shorter input file than the one you uploaded?

No, that's not exactly what I'd experienced or meant. It was more a case of making sure the input file cut I made for testing/uploading purposes includes whatever content contributes to the crash - encoding the whole DVD only crashes at the very end of the last VOB (but too large to upload all), encoding individual earlier VOBs completes successfully, encoding only VTS_01_4.VOB crashes at the very end, and as the uploaded cut showed only the last part of VTS_01_4.VOB is needed to reproduce the crash.

Although I didn't try any smaller cuts myself, if they do encode successfully with the initial command lines above, the possibility remains that such cuts then excluded whatever problem content contributed to the crash.

comment:22 in reply to: ↑ 21 ; follow-up: Changed 4 years ago by cehoyos

Replying to francois.visagie@…:

Replying to cehoyos:

but for the sake of correctness I should point out that I've experienced no correlation between crashing and shorter input files.

I thought you reported earlier (and I could reproduce this) that you were unable to reproduce the crash with a shorter input file than the one you uploaded?

No, that's not exactly what I'd experienced or meant.

Then please test.

For future tickets: Please understand that is is regarded extremely bad on this bug tracker if you upload 1G files assuming that smaller files allow to reproduce the original problem.

comment:23 in reply to: ↑ 22 Changed 4 years ago by francois.visagie@gmail.com

Replying to cehoyos:

For future tickets: Please understand that is is regarded extremely bad on this bug tracker if you upload 1G files assuming that smaller files allow to reproduce the original problem.

I'm afraid our misunderstanding seems to continue. The policy you refer to I have no problem with, and in fact I uploaded the smallest cut I could make that still included whatever content was necessary to reproduce the problem as reported. I can see now how Comment 21 might have caused confusion; I hope this explains things better :-).

Last edited 4 years ago by francois.visagie@gmail.com (previous) (diff)

comment:24 Changed 4 years ago by cehoyos

Did you test smaller files and did they crash?

If you did not test them, it was not ok to upload a 100MB file.

If you tested them and it did crash, it was not ok to upload a 100MB file.

If you tested them and it did not crash, I don't understand your comment:19.

Last edited 4 years ago by cehoyos (previous) (diff)

comment:25 Changed 4 years ago by cehoyos

Sorry about the incorrect size, there are many tickets (including this one) where 100MB are necessary to reproduce the issue (and there is one ticket where the original sample was 10G and could not be cut), generally, 100MB is too much without justification.

comment:26 Changed 4 years ago by francois.visagie@gmail.com

No problem.

Note: See TracTickets for help on using tickets.