Ticket #2254 (new enhancement)
Unsupported h264 file
| Reported by: | cehoyos | Owned by: | |
|---|---|---|---|
| Priority: | wish | Component: | avcodec |
| Version: | git-master | Keywords: | h264 mpegts videolan |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
(videolan ticket 8145)
A vlc user uploaded a DVB recording from TTV HD (Taiwan) explaining that when this broadcast station went on-air, set-top-box provider had to update their firmware to support decoding.
FFmpeg only decodes the first frame, WMP plays the stream recognizable but with heavy motion artefacts.
$ ffmpeg -vsync 0 -i ttvHD_vlc_sample.ts -vframes 2 out%2d.png
ffmpeg version N-49708-ga92816c Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 9 2013 01:34:27 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --disable-indev=jack
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.102 / 54. 91.102
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.101 / 3. 35.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[h264 @ 0x183a3c0] Missing reference picture, default is 65536
Last message repeated 4 times
[mpegts @ 0x1834fc0] max_analyze_duration 5000000 reached at 5034667 microseconds
[mpegts @ 0x1834fc0] decoding for stream 2 failed
Input #0, mpegts, from 'ttvHD_vlc_sample.ts':
Duration: 00:00:59.92, start: 36071.669144, bitrate: 4373 kb/s
Program 1
Stream #0:0[0x44](): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
Stream #0:1[0x45](): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
Stream #0:2[0x46](): Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 30 tbr, 90k tbn, 59.94 tbc
Output #0, image2, to 'out%2d.png':
Metadata:
encoder : Lavf54.61.104
Stream #0:0(): Video: png, rgb24, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
Stream #0:2 -> #0:0 (h264 -> png)
Press [q] to stop, [?] for help
[h264 @ 0x18703c0] Missing reference picture, default is 65536
[h264 @ 0x1871680] Missing reference picture, default is 65536
[h264 @ 0x186fe20] Missing reference picture, default is 65536
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x186ee60] Missing reference picture, default is 65536
[h264 @ 0x186fe20] Missing reference picture, default is 65536
[h264 @ 0x1871040] Missing reference picture, default is 65536
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x186fe20] Missing reference picture, default is 65536
[h264 @ 0x1871040] Missing reference picture, default is 65536
[h264 @ 0x186e080] Missing reference picture, default is 65536
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x1870a00] Missing reference picture, default is 65536
[h264 @ 0x186e080] Missing reference picture, default is 65536
[h264 @ 0x1871680] Missing reference picture, default is 65536
Last message repeated 1 times
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x186fe20] Missing reference picture, default is 65536
[h264 @ 0x186f880] Missing reference picture, default is 65536
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x18703c0] Missing reference picture, default is 65536
[h264 @ 0x186f2e0] Missing reference picture, default is 65536
[h264 @ 0x18703c0] Missing reference picture, default is 65536
[h264 @ 0x1871680] Missing reference picture, default is 65536
Missing reference picture, default is 6553600:00.00 bitrate=N/A
[h264 @ 0x18703c0] Missing reference picture, default is 65536
[h264 @ 0x1871680] Missing reference picture, default is 65536
frame= 1 fps=0.3 q=0.0 Lsize=N/A time=00:00:00.06 bitrate=N/A
video:3191kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000673%
(early exit, FFmpeg would search the whole stream for a second frame)
Change History
comment:2 Changed 3 months ago by michael
Can anything decode the uploaded file? If not, theres a chance that the file itself is broken. It does on first look, look like 50% of the data is missing
comment:3 follow-up: ↓ 4 Changed 3 months ago by cehoyos
- Priority changed from normal to wish
- Type changed from defect to enhancement
- Component changed from undetermined to avcodec
I only have the information provided in these tickets:
https://trac.videolan.org/vlc/ticket/8145
https://trac.videolan.org/vlc/ticket/8235
I did not find another source for the claim "when Taiwan TV shift from analog to digital, many set-top-box can't decoding TTVHD" and I don't understand "but when I record TTV HD progam only by command line,it can't play properly".
In any case, Windows Media Player shows a recognizable video, so I believe decoding can be improved even if the sample is broken.
comment:4 in reply to: ↑ 3 Changed 5 weeks ago by michael
Replying to cehoyos:
I only have the information provided in these tickets:
https://trac.videolan.org/vlc/ticket/8145
https://trac.videolan.org/vlc/ticket/8235
I did not find another source for the claim "when Taiwan TV shift from analog to digital, many set-top-box can't decoding TTVHD" and I don't understand "but when I record TTV HD progam only by command line,it can't play properly".
In any case, Windows Media Player shows a recognizable video, so I believe decoding can be improved even if the sample is broken.
You misunderstand i think.
There are several possible explanations
- this file is missing 50% of the data and the software used to store it has or had a serious bug
- The file is not h264 but a non standard variant of it that looks like h264 with half the data missing
- something else
what indication do we have that its not A. ?
can something display this video without heavy artifacts ?
has someone dumped the raw ts stream without any complex software in the loop?
does the filesize match the expected duration and bitrate or is it half of that ?
comment:5 Changed 5 weeks ago by michael
Also if you want to see "better" decoding you can use this:
but its just displaying the incomplete frames
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 502ee92..c4b8585 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1906,7 +1906,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
* yet, so we assume the worst for now. */
// if (setup_finished)
// ff_thread_finish_setup(h->avctx);
- return;
+// return;
}
cur->f.interlaced_frame = 0;



Sample uploaded to http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2254/