Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2025 closed defect (fixed)

FFMPEG unable to create WTV files > 2GB

Reported by: ramitbhalla Owned by: pross
Priority: normal Component: avformat
Version: git-master Keywords: wtv
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

FIRST of all thanks @Peter Ross for fixing the seek in WTV files.

Summary of the bug: When I try to convert TS files to WTV files and if the converted file is > 2GB, it is unplayable.

How to reproduce: Here is a very simple remux from TS to WTV, as you can see the conversion itself is showing no errors, but if the destination is > 2GB the file is not playable by WMP, however if I use a smaller source so the destination is < 2GB it works fine (same settings).

ffmpeg -i ..\Himoe_USA_WRC-HD.ts -codec copy test.wtv
ffmpeg version N-46726-g2f74f8d Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 13 2012 19:29:51 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable
-bzlib --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enab
le-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroed
inger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52.  6.100 / 52.  6.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 23.100 /  3. 23.100
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
Input #0, mpeg, from '..\Himoe_USA_WRC-HD.ts':
  Duration: 00:20:26.79, start: 0.200000, bitrate: 15313 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn,
59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 96 kb/s (visual impaired)
Output #0, wtv, to 'test.wtv':
  Metadata:
    encoder         : Lavf54.36.100
    Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 10000k
 tbn, 29.97 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 96 kb/s (visual impaired)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=36773 fps=305 q=-1.0 Lsize= 2278828kB time=00:20:26.99 bitrate=15214.6kbits/s
video:2253105kB audio:14377kB subtitle:0 global headers:0kB muxing overhead 0.500394%

I'm marking this important since it's fundamental issue, but if my analysis is incorrect feel free to change it.

Change History (7)

comment:1 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords wtv added
  • Priority changed from important to normal
  • Status changed from new to open

comment:2 Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Version changed from unspecified to git-master
$ ffmpeg -f lavfi -i testsrc=s=1920x1080 -fs 2150M -qscale 2 out2.wtv
ffmpeg version N-47781-g4391262 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 13 2012 00:29:04 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 79.102 / 54. 79.102
  libavformat    54. 49.101 / 54. 49.101
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 27.101 /  3. 27.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[lavfi @ 0x1bab2c0] Estimating duration from bitrate, this may be inaccurate
Input #0, lavfi, from 'testsrc=s=1920x1080':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, wtv, to 'out2.wtv':
  Metadata:
    encoder         : Lavf54.49.101
    Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 10000k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
Press [q] to stop, [?] for help
frame=220754 fps= 63 q=2.0 Lsize= 2102056kB time=02:27:10.12 bitrate=1950.1kbits/s
video:2072757kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.413528%
$ ffmpeg -i out2.wtv
ffmpeg version N-47781-g4391262 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 13 2012 00:29:04 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 79.102 / 54. 79.102
  libavformat    54. 49.101 / 54. 49.101
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 27.101 /  3. 27.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wtv @ 0x2da3280] unknown guid 00000000000000000000000000000000, expected dir_entry_guid; remaining directory entries ignored
[wtv @ 0x2da3280] timeline data missing
out2.wtv: Invalid data found when processing input

comment:3 Changed 5 years ago by pross

Fixed, and >2GB file tested on Windows Media Centre.

Note: Windows Media Centre complains when the .wtv file does not contain an audio track. I will look into this separately.

comment:4 Changed 5 years ago by pross

  • Owner set to pross

comment:5 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

comment:6 Changed 5 years ago by ramitbhalla

Thanks, will test it and let you know.
Now if only someone can figure out how to get H.264 in a WTV container, that would be awesome!

comment:7 Changed 5 years ago by ramitbhalla

Working great, thanks.

Note: See TracTickets for help on using tickets.