Opened 9 years ago

Last modified 8 years ago

#2055 open enhancement

wtvenc: support subtitle muxing

Reported by: ramitb Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: wtv cc
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: When FFMPEG tries to copy attachment metadata it fails

How to reproduce:

ffmpeg -i test-wtv.wtv -c copy -map 0 test.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
[mpeg2video @ 0036f1a0] mpeg_decode_postinit() failure
    Last message repeated 12 times
Input #0, wtv, from 'test-wtv.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to sp
end the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Eri
nn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
  Duration: 00:31:59.52, start: 2.880931, bitrate: 8 kb/s
    Stream #0:0[0x29](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:1[0x2a](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x2b]: Video: mpeg2video (Main), yuv420p, 528x480 [SAR 40:33 DAR 4:3], 29.97 fps, 29.97 tbr, 10000k tbn,
 59.94 tbc
    Stream #0:3[0x2c]: Subtitle: eia_608
    Stream #0:4[0x0]: Attachment: mjpeg
    Metadata:
      title           : TV Thumbnail
[wtv @ 02d8a780] unknown codec_type (0x3)
[wtv @ 02d8a780] write stream codec info failed codec_type(0x3)
[wtv @ 02d8a780] write stream codec failed codec_type(0x3)
Output #0, wtv, to 'test.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to sp
end the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Eri
nn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
    encoder         : Lavf54.49.102
    Stream #0:0(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:2: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 528x480 [SAR 40:33 DAR 4:3], q=2-31, 29.97 fps, 90k tbn
, 29.97 tbc
    Stream #0:3: Subtitle: eia_608
    Stream #0:4: Attachment: mjpeg (MJPG / 0x47504A4D)
    Metadata:
      title           : TV Thumbnail
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted

ffmpeg -i test.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
[wtv @ 0035c940] timeline data missing
test.wtv: Invalid data found when processing input

Attachments (1)

test-wtv.wtv (2.0 MB ) - added by ramitb 9 years ago.

Download all attachments as: .zip

Change History (15)

by ramitb, 9 years ago

Attachment: test-wtv.wtv added

comment:1 by ramitb, 9 years ago

Add on:

if one uses -map 0:s then also it fails, afaik it's not able to copy subtitle streams either from a WTV to a WTV file.

in reply to:  1 comment:2 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: wtv added
Priority: normalwish
Reproduced by developer: set
Status: newopen
Type: defectenhancement
Version: unspecifiedgit-master

Replying to ramitbhalla:

Add on:

if one uses -map 0:s then also it fails, afaik it's not able to copy subtitle streams either from a WTV to a WTV file.

This is actually the only problem that you did report with the console output you posted...

$ ffmpeg -i test-wtv.wtv -c:t copy -map 0:4 out.wtv
ffmpeg version N-48117-g707af43 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 23 2012 10:56:26 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  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.101 /  3. 29.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg2video @ 0x26e6260] mpeg_decode_postinit() failure
    Last message repeated 12 times
Input #0, wtv, from 'test-wtv.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to spend the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Erinn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
  Duration: 00:31:59.52, start: 2.880931, bitrate: 8 kb/s
    Stream #0:0[0x29](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:1[0x2a](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x2b]: Video: mpeg2video (Main), yuv420p, 528x480 [SAR 40:33 DAR 4:3], 29.97 fps, 29.97 tbr, 10000k tbn, 59.94 tbc
    Stream #0:3[0x2c]: Subtitle: eia_608
    Stream #0:4[0x0]: Attachment: mjpeg
    Metadata:
      title           : TV Thumbnail
[wtv @ 0x27b4be0] unknown codec_type (0x4)
[wtv @ 0x27b4be0] write stream codec info failed codec_type(0x4)
[wtv @ 0x27b4be0] write stream codec failed codec_type(0x4)
Output #0, wtv, to 'out.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to spend the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Erinn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
    encoder         : Lavf54.49.102
    Stream #0:0: Attachment: mjpeg (MJPG / 0x47504A4D)
    Metadata:
      title           : TV Thumbnail
Stream mapping:
  Stream #0:4 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
Last edited 9 years ago by Carl Eugen Hoyos (previous) (diff)

comment:3 by ramitb, 9 years ago

Got it, can you please correct the title, it should be cannot stream copy Subtitle and Attachment in WTV files.

comment:4 by Carl Eugen Hoyos, 9 years ago

Does the sample you uploaded - test-wtv.wtv - actually contain visible subtitles?

If not, and since attachments and subtitles are different things (as shown on ffmpeg-devel today), please consider opening a second ticket for subtitles including a sample that allows to test this. I can also do it, but please point me to a sample.

comment:5 by ramitb, 9 years ago

Yes it does contain subtitles in this sample test-wtv.wtv

in reply to:  5 comment:6 by Carl Eugen Hoyos, 9 years ago

Replying to ramitbhalla:

Yes it does contain subtitles in this sample test-wtv.wtv

How can I see them?

comment:7 by ramitb, 9 years ago

I see them in Windows Media Center. Open the file in Windows MEdia Center, when playing, right click and Select Captions. It will give you 3 options, Off, CC1 and CC2.

Select CC1 and the subs will show up.

comment:8 by Carl Eugen Hoyos, 9 years ago

Keywords: cc added

comment:9 by ramitb, 9 years ago

Err... was the the fix that messed up ffmpeg in ticket #2227? In that case please don't fix this :)
#2227 is far more important and impactful than this - we can live without copying attachment streams, can't live with a broken video stream :)

tx

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

Replying to ramitbhalla:

Err... was the the fix that messed up ffmpeg in ticket #2227?

I expected you to do the regression test and answer this question (although I thought it was another ticket by you).

comment:11 by ramitb, 9 years ago

will test it and let you know, didn't know it was fixed. But again like I said I'd rather the other be fixed than this :)

comment:12 by ramitb, 9 years ago

Not yet working, but I'm VERY concerned, it's reporting the same issue here which is in ticket #2227

now it's reporting the mjpeg attachment as a video stream - VERY disturbing.

ffmpeg -i "..\Corrupted Audio and Sync Guys With Kids_KNBC_2012_11_21_20_28_00.wtv"
 -codec copy -map 0 test.wtv

ffmpeg version N-49527-g985e93a Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  1 2013 18:41:39 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --ena
ble-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en
able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 35.100 /  3. 35.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wtv @ 0325e9a0] truncated file
    Last message repeated 3 times
[mpeg2video @ 003e31a0] 0x0 is invalid
    Last message repeated 12 times
[wtv @ 0325e9a0] max_analyze_duration 5000000 reached at 5024000 microseconds
Input #0, wtv, from '..\Corrupted Audio and Sync Guys With Kids_KNBC_2012_11_21_20_28_00.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to sp
end the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Eri
nn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
    Duration        : 20992941505
    WM/WMRVEndTime  : 2012-11-22 05:03:01
    WM/WMRVBitrate  : 3.975938
    WM/WMRVKeepUntil: -1
    WM/WMRVActualSoftPrePadding: 417
    WM/WMRVActualSoftPostPadding: 181
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : true
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 320
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 9
    WM/MediaThumbRatingLevel: 10
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: 4643601142938852099
  Duration: 00:34:57.15, start: 2.880931, bitrate: 3980 kb/s
    Stream #0:0[0x29](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:1[0x2a](eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x2b]: Video: mpeg2video (Main), yuv420p, 528x480 [SAR 40:33 DAR 4:3], 29.97 fps, 29.97 tbr, 10000k tbn,
 59.94 tbc
    Stream #0:3[0x2c]: Subtitle: eia_608
    Stream #0:4[0x0]: Video: mjpeg, yuvj420p, 200x182 [SAR 96:96 DAR 100:91], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      title           : TV Thumbnail
File 'test.wtv' already exists. Overwrite ? [y/N] y
unknown codec_type (0x3)
[wtv @ 03c58080] write stream codec info failed codec_type(0x3)
[wtv @ 03c58080] write stream codec failed codec_type(0x3)
Output #0, wtv, to 'test.wtv':
  Metadata:
    WM/MediaClassPrimaryID: db9830bd-3ab3-4fab-8a371a995f7ff74
    WM/MediaClassSecondaryID: ba7f258a-62f7-47a9-b21f4651c42a000
    Title           : Guys With Kids
    WM/SubTitle     : Thanksgiving
    WM/SubTitleDescription: Sheila tries to win the gang over with a traditional Thanksgiving dinner; Gary decides to sp
end the holiday waiting in line for a TV that's on sale.
    genre           : Comedy;Series
    WM/OriginalReleaseTime: 0
    WM/MediaCredits : Anthony Anderson/Zach Cregger/Jesse Bradford/Jamie-Lynn Sigler/Tempestt Bledsoe;;;Emmitt Smith/Eri
nn Hayes
    service_provider: KNBC
    service_name    : KNBC
    WM/MediaNetworkAffiliation: NBC Affiliate
    WM/MediaOriginalChannel: 4
    WM/MediaOriginalChannelSubNumber: 0
    WM/MediaOriginalBroadcastDateTime: 2012-11-21T08:00:00Z
    WM/MediaOriginalRunTime: 20974292466
    WM/MediaIsStereo: true
    WM/MediaIsRepeat: false
    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-11-22 04:28:02
    WM/WMRVSeriesUID: !MCSeries!274690485
    WM/WMRVServiceID: !MCService!28455445
    WM/WMRVProgramID: !MCProgram!282437030
    WM/WMRVRequestID: 0
    WM/WMRVScheduleItemID: 0
    WM/WMRVQuality  : 0
    WM/WMRVOriginalSoftPrePadding: 420
    WM/WMRVOriginalSoftPostPadding: 180
    WM/WMRVHardPrePadding: -300
    WM/WMRVHardPostPadding: 0
    WM/WMRVATSCContent: true
    WM/WMRVDTVContent: true
    WM/WMRVHDContent: false
    Duration        : 20992941505
    WM/WMRVEndTime  : 2012-11-22 05:03:01
    WM/WMRVBitrate  : 3.975938
    WM/WMRVKeepUntil: -1
    WM/WMRVActualSoftPrePadding: 417
    WM/WMRVActualSoftPostPadding: 181
    WM/WMRVContentProtected: false
    WM/WMRVContentProtectedPercent: 0
    WM/WMRVExpirationSpan: 9223372036854775807
    WM/WMRVInBandRatingSystem: 255
    WM/WMRVInBandRatingLevel: 255
    WM/WMRVInBandRatingAttributes: 0
    WM/WMRVWatched  : true
    WM/MediaThumbWidth: 352
    WM/MediaThumbHeight: 320
    WM/MediaThumbStride: 1056
    WM/MediaThumbRet: 0
    WM/MediaThumbRatingSystem: 9
    WM/MediaThumbRatingLevel: 10
    WM/MediaThumbRatingAttributes: 0
    WM/MediaThumbAspectRatioX: 4
    WM/MediaThumbAspectRatioY: 3
    WM/MediaThumbTimeStamp: 4643601142938852099
    encoder         : Lavf54.61.104
    Stream #0:0(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:2: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 528x480 [SAR 40:33 DAR 4:3], q=2-31, 29.97 fps, 90k tbn
, 29.97 tbc
    Stream #0:3: Subtitle: eia_608
    Stream #0:4: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p, 200x182 [SAR 96:96 DAR 100:91], q=2-31, 90k tbn, 90k tbc
    Metadata:
      title           : TV Thumbnail
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted

At the risk of repeating myslef, I'd rather this not be fixed than the mjpeg be reported a video stream.

comment:13 by pross, 8 years ago

Summary: FFMPEG unable to copy attachment metadata in WTV fileswtvenc: support subtitle muxing

@ramitbhalla, you have reported two separate problems here.

  1. "Subtitle copying does not work."

wtvenc does not currently support subtitle muxing. The error messages could make this clearer (codec type 0x3 is AVMEDIA_TYPE_SUBTITLE). Essentially you are asking for an enhancement.

[wtv @ 02d8a780] unknown codec_type (0x3)
[wtv @ 02d8a780] write stream codec info failed codec_type(0x3)
[wtv @ 02d8a780] write stream codec failed codec_type(0x3)
  1. "Attachment metadata copying does not work."

If you exclude the subtitle stream this works. e.g:

./ffmpeg -i test-wtv.wtv -c copy -map 0:0 -map 0:1 -map 0:2 -map 0:4 out.wtv

comment:14 by ramitb, 8 years ago

true, you're right I'm asking for an enhancement here.

Note: See TracTickets for help on using tickets.