Opened 11 years ago

Closed 11 years ago

#2076 closed defect (invalid)

FFMPEG creates WTV files which are unplayable on XBMC

Reported by: ramitb Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: wtv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: FFMPEG with the newest version works well to create WTV files, however these only work on WMP/MCE. They are not playable on XBMC.

To replicate the issue, take a very simple case:

Take a WTV file, convert to TS, and then convert back to WTV. The resultant file will not play on XBMC.

XBMC (including the latest v11) throws an error: CDVDPlayer::OpenDemuxStream - Error creating demuxer

However XBMC CAN play the ORIGINAL WTV file without any issues.

I've uploaded a sample file CSI.wtv to the FTP server (or you can use any file). This happens consistently with ANY file.

The reason I picked WTV -> TS -> WTV was to show that original works on XBMC where as the remuxed does not.

How to reproduce:

ffmpeg.2311 -i ..\CSI.wtv -vcodec copy -acodec copy csi-test.ts
ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 21 2012 09:06:30 with gcc 4.7.2 (GCC)
  configuration: --enable-static --arch=x86 --target-os=mingw32 --cross-prefix=/home/rdp/dev/ffmpeg-windows-build-helper
s/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth -
-enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfig --ena
ble-libass --enable-libutvideo --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-lib
vo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopenc
ore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbluray --enable-libvpx --enable-runtime-cpudetect

  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 49.102 / 54. 49.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 29.100 /  3. 29.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mp2 @ 02c34e20] Header missing
[mpeg2video @ 02c2eee0] mpeg_decode_postinit() failure
    Last message repeated 7 times
Input #0, wtv, from '..\CSI.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : CSI: Crime Scene Investigation
    WM/SubTitle     : Justice Is Served
    WM/SubTitleDescription: Grissom investigates the death of a jogger; Catherine tries to determine the cause of death
of a little girl on a carnival ride.
    genre           : Drama;General;Series;Action/Adventure
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : William Petersen/Marg Helgenberger/Paul Guilfoyle/George Eads/Gary Dourdan/Jorja Fox;Thomas J. Wri
ght;;Eric Szmanda/Robert David Hall/Skip O'Brien/David Berman/Alicia Coppola/Earl Brown/Kellie Waymire/Brad Johnson/Wayn
e Wilderson/Steffanie Brass/Joseph Pa
    service_provider: USA
    service_name    : USA Network
    WM/MediaNetworkAffiliation: Satellite
    WM/MediaOriginalChannel: 42
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2001-04-26T04:00:00Z
    WM/MediaOriginalRunTime: 20288549297
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: true
    WM/MediaIsLive  : false
    WM/MediaIsTape  : false
    WM/MediaIsDelay : false
    WM/MediaIsSubtitled: false
    WM/MediaIsMovie : false
    WM/MediaIsPremiere: false
    WM/MediaIsFinale: false
    WM/MediaIsSAP   : false
    WM/MediaIsSport : false
    WM/ParentalRating: TV-PG
    WM/Provider     : MediaCenterDefault
    WM/VideoClosedCaptioning: true
    WM/WMRVEncodeTime: 2012-01-27 06:28:11
    WM/WMRVSeriesUID: !MCSeries!00380341
    WM/WMRVServiceID: !MCService!28459373
    WM/WMRVProgramID: !MCProgram!29070181
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 3
    WM/WMRVOriginalSoftPrePadding: 1745
    WM/WMRVOriginalSoftPostPadding: 120
    WM/WMRVHardPrePadding: -1685
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: false
    WM/WMRVDTVContent: false
    WM/WMRVHDContent: false
    Duration        : 475547199
    WM/WMRVEndTime  : 2012-01-27 06:28:58
    WM/WMRVBitrate  : 8.257536
    WM/WMRVKeepUntil: 0
    WM/WMRVActualSoftPrePadding: 16
    WM/WMRVActualSoftPostPadding: -1861
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : false
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 234
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 255
    WM/MediaThumbRatingLevel: 255
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: -4616189618054758400
    WM/MediaThumbType: 2
  Duration: 00:00:46.55, start: 14.626711, bitrate: 8290 kb/s
    Stream #0:0[0x11]: Subtitle: eia_608
    Stream #0:1[0x12]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 10000k tbn, 5
9.94 tbc
    Stream #0:2[0x13]: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 384 kb/s
    Stream #0:3[0x0]: Attachment: mjpeg
    Metadata:
      title           : TV Thumbnail
File 'csi-test.ts' already exists. Overwrite ? [y/N] y
Output #0, mpegts, to 'csi-test.ts':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : CSI: Crime Scene Investigation
    WM/SubTitle     : Justice Is Served
    WM/SubTitleDescription: Grissom investigates the death of a jogger; Catherine tries to determine the cause of death
of a little girl on a carnival ride.
    genre           : Drama;General;Series;Action/Adventure
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : William Petersen/Marg Helgenberger/Paul Guilfoyle/George Eads/Gary Dourdan/Jorja Fox;Thomas J. Wri
ght;;Eric Szmanda/Robert David Hall/Skip O'Brien/David Berman/Alicia Coppola/Earl Brown/Kellie Waymire/Brad Johnson/Wayn
e Wilderson/Steffanie Brass/Joseph Pa
    service_provider: USA
    service_name    : USA Network
    WM/MediaNetworkAffiliation: Satellite
    WM/MediaOriginalChannel: 42
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2001-04-26T04:00:00Z
    WM/MediaOriginalRunTime: 20288549297
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: true
    WM/MediaIsLive  : false
    WM/MediaIsTape  : false
    WM/MediaIsDelay : false
    WM/MediaIsSubtitled: false
    WM/MediaIsMovie : false
    WM/MediaIsPremiere: false
    WM/MediaIsFinale: false
    WM/MediaIsSAP   : false
    WM/MediaIsSport : false
    WM/ParentalRating: TV-PG
    WM/Provider     : MediaCenterDefault
    WM/VideoClosedCaptioning: true
    WM/WMRVEncodeTime: 2012-01-27 06:28:11
    WM/WMRVSeriesUID: !MCSeries!00380341
    WM/WMRVServiceID: !MCService!28459373
    WM/WMRVProgramID: !MCProgram!29070181
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 3
    WM/WMRVOriginalSoftPrePadding: 1745
    WM/WMRVOriginalSoftPostPadding: 120
    WM/WMRVHardPrePadding: -1685
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: false
    WM/WMRVDTVContent: false
    WM/WMRVHDContent: false
    Duration        : 475547199
    WM/WMRVEndTime  : 2012-01-27 06:28:58
    WM/WMRVBitrate  : 8.257536
    WM/WMRVKeepUntil: 0
    WM/WMRVActualSoftPrePadding: 16
    WM/WMRVActualSoftPostPadding: -1861
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : false
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 234
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 255
    WM/MediaThumbRatingLevel: 255
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: -4616189618054758400
    WM/MediaThumbType: 2
    encoder         : Lavf54.49.102
    Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps, 90k tbn, 29.97 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 384 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1388 fps=0.0 q=-1.0 Lsize=   48525kB time=00:00:46.69 bitrate=8513.9kbits/s
video:42586kB audio:2181kB subtitle:0 global headers:0kB muxing overhead 8.394296%

ffmpeg.2311 -i csi-test.ts -vcodec copy -acodec copy csi.wtv
ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 21 2012 09:06:30 with gcc 4.7.2 (GCC)
  configuration: --enable-static --arch=x86 --target-os=mingw32 --cross-prefix=/home/rdp/dev/ffmpeg-windows-build-helper
s/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth -
-enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfig --ena
ble-libass --enable-libutvideo --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-lib
vo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopenc
ore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbluray --enable-libvpx --enable-runtime-cpudetect

  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 49.102 / 54. 49.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 29.100 /  3. 29.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mp3 @ 021bfc00] Header missing
[mpegts @ 021bc940] max_analyze_duration 5000000 reached at 5016000
Input #0, mpegts, from 'csi-test.ts':
  Duration: 00:00:46.57, start: 1.552389, bitrate: 8535 kb/s
  Program 1
    Metadata:
      service_name    : USA Network
      service_provider: USA
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 29.97 fps,
 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Output #0, wtv, to 'csi.wtv':
  Metadata:
    encoder         : Lavf54.49.102
    Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps, 10000k tb
n, 29.97 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 384 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1388 fps=0.0 q=-1.0 Lsize=   45340kB time=00:00:46.53 bitrate=7981.1kbits/s
video:42586kB audio:2181kB subtitle:0 global headers:0kB muxing overhead 1.279846%

Change History (13)

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavformat
Keywords: wtv added

Are you sure that you are reporting this problem on the right bug tracker?

comment:2 by ramitb, 11 years ago

Yes I thought so too and debated it, you call finally but here' my thoughts.

Initially I thought it's a XBMC bug, then I relooked at it - how is it that XBMC is able to play the original file and not the remuxed file.
Yes its possible there's a bug in XMBC - but I couldn't overlook the fact that if the Container formats were identical there wouldn't be an issue, possibly something is not right in the container created by FFMPEG which is causing XMBC to bug out.
Again, not saying that it's not a XBMC problem but definitely there's something in FFMPEG which is creating the WTV container is a slightly differnet format than the original WTV container. (after all we're only remuxing it).

Keeping the above in mind, here's something else anohter user reported in their XMBC logs (which also appears to use ffmpeg). Again keep in mind, there goal here is to find out what's differnet about the ffmpeg created wtv vs the original:

:00:15 T:5640   ERROR: ffmpeg[1608]: [wtv] unknown guid 00000000000000000000000000000000, expected dir_entry_guid; remaining directory entries ignored
08:00:15 T:5640   ERROR: ffmpeg[1608]: [wtv] timeline data missing
08:00:15 T:5640   ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file C:\Users\paul\Desktop\S09E11-A Lovely Landing Strip After.wtv
08:00:15 T:5640   ERROR: CDVDFileInfo::ExtractThumb - Error creating demuxer

comment:3 by Carl Eugen Hoyos, 11 years ago

Is is possible that XBMC is using libavformat to demux wtv files?

comment:4 by pross, 11 years ago

What version of XBMC? What operating system?

comment:5 by ramitb, 11 years ago

I've tried XBMC v11 3bit on Windows 7 32 bit SP1. I believe one of the other uesrs tried an older version as well on Windows 7 64 bit.

comment:6 by Elon Musk, 11 years ago

It is obvious xbmc use older ffmpeg. So ticket is invalid.

comment:7 by Carl Eugen Hoyos, 11 years ago

I tested playback of the remuxed file with ffplay 0.7, 0.8, 0.9, 0.10, 0.11 and 1.0 and all of them work fine, so I wonder why it fails with xbmc.

comment:8 by ramitb, 11 years ago

@richardpl - assuming you're read the thread. If it's obvious, why is it able to play MCE recorded WTV files flawlessly?

I.e. the WTV file created by FFMPEG is NOT the same (format wise) as the MCE created WTV file right?

in reply to:  8 comment:9 by Carl Eugen Hoyos, 11 years ago

Replying to ramitbhalla:

I.e. the WTV file created by FFMPEG is NOT the same (format wise) as the MCE created WTV file right?

But the relevant application for wtv is WMP (not xbmc).

Does xbmc print the used lavf version or were you able to find out which version was used for compilation?

comment:10 by ramitb, 11 years ago

Unfortunately no, I tried play with the log settings but am not able to get anything related to this.

I did check the dll files installed but there are no version numbers on them, however they appear to be build on 3.2.12

in reply to:  10 comment:11 by Carl Eugen Hoyos, 11 years ago

Replying to ramitbhalla:

I did check the dll files installed but there are no version numbers on them, however they appear to be build on 3.2.12

If you are unable to look at the sources, you can grep for "lavf" inside the libavformat dll.

comment:12 by ramitb, 11 years ago

Here is what I got:

avformat-52.dll: Location Content-Length Content-Range bytes  Transfer-Encoding chunked WWW-Authenticate Authentication-
Info Connection close Lavf52.94.0 User-Agent: %s

avformat-52.dll: /%s connect app LNX %s %d,%d,%d,%d Lavf52.94.0 FMLE/3.0 (compatible; %s) type nonprivate flashVer tcUrl
 fpad capabilities audioCodecs videoCodecs videoFunction FLV☺♣               /ondemand/ rtmp
  Genuine Adobe Flash Media Server 001≡ε┬JÇh╛Φ. ╨╤☻₧~Wn∞]-)Ço½ô╕µ6╧δ1«                            Genuine Adobe Flash Pl
ayer 001≡ε┬JÇh╛Φ. ╨╤☻₧~Wn∞]-)Ço½ô╕µ6╧δ1«    @@  Ç@                                                            PCMU    ☺
  ♠ ☺ @▼  ☺   ♥   GSM     ☺       @▼  ☺   ♦   G723    ☺       @▼  ☺   ♣   DVI4    ☺       @▼  ☺   ♠   DVI4    ☺       Ç>
  ☺      LPC     ☺       @▼  ☺    PCMA    ☺    ☺ @▼  ☺             G722    ☺   ∟►☺ @▼  ☺

avformat-52.dll: Lavf52.94.0 encoder !*next_point stream index %d is not valid

comment:13 by Carl Eugen Hoyos, 11 years ago

Resolution: invalid
Status: newclosed

The playback problem is reproducible with very old (unsupported) versions of FFmpeg, for example a9d921c, fixed by Peter Ross in January 2011 (e6fb5a4).
If pross wants to work on this, I will be happy to reopen;-)

Note that the two-year old FFmpeg version xbmc uses (if your report is correct) contains hundreds of known, user-reported bugs that have been fixed in current FFmpeg, some of them security relevant (including ones that are said to be actually exploitable), there cannot be any good reason for third party projects to release binaries containing these dll's.

Note: See TracTickets for help on using tickets.