I've had some success in capturing live FLV streams from some websites using RTMPHelper. I ran into issues where the resulting files were not closed out properly, and would only be playable in a select few FLV players. Conversions were required in order to produce a file fully-playable in any player and editable without audio sync issues. It took me a month, but I had figured out a 3-step conversion process which converted to MP4 (eliminating audio sync issues by seeking to the 1 sec or 2 sec marker before converting, removing a collection of erroneous frames), to TS, then back to MP4 (to properly code the time codes and play length) to accomplish this.
I have run into a new issue that I am unable to solve on my own, after scouring the internet. It is a similar live stream, but produces a file which is only about 24 seconds long (the same portion is also only played with the select FLV players), and FFMPEG drops out with a "stream discovered after head already parsed" error. It gives me a new video stream (0:2), but when I attempt to map the stream, it says that "stream 0:2 does not exist". It does not let me know if the audio stream 0:1 continues through to the end of the file, or if there is a new audio stream. The 24 second resultant file stops the audio at its end, as well, so I have no way to figure this out.
It also gives me PTS and DTS locations for the new stream start, but I am unsure how to proceed with that information.
I cannot provide the file itself, as there are some privacy and adult-themed concerns that I wish not to release to the world.
Any help to fix this file so that I can properly convert it would be greatly appreciated.
This is my command line:
FFMPEG -i Original.f4v -ss 00:00:01.00 -vcodec libx264 -x264opts qp=15 -acodec libvo_aacenc -vsync 2 Step1.mp4
This is the console output:
ffmpeg version N-52233-gee94362 Copyright (c) 2000-2013 the FFmpeg developers
built on Apr 18 2013 02:55:39 with gcc 4.8.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrn
b --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libr
tmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheo
ra --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --ena
ble-zlib
libavutil 52. 26.100 / 52. 26.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 2.100 / 55. 2.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 56.103 / 3. 56.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[flv @ 0000000003d300a0] DTS discontinuity in stream 0: packet 85 with DTS 39, p
acket 86 with DTS 966489
Input #0, flv, from 'Original.f4v':
Duration: 01:11:14.34, start: 0.000000, bitrate: 872 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 24 tbr,
1k tbn, 48 tbc
Stream #0:1: Audio: nellymoser, 22050 Hz, mono, flt
[libx264 @ 00000000023b95c0] using SAR=1/1
[libx264 @ 00000000023b95c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1
Cache64
[libx264 @ 00000000023b95c0] profile High, level 1.3
[libx264 @ 00000000023b95c0] 264 - core 130 r2274 c832fe9 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 r
ef=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed
_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pski
p=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 deci
mate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_
adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=2
4 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=15 ip_ratio=1.40 pb_ratio=1.30
aq=0
Output #0, mp4, to 'Step1.mp4':
Metadata:
encoder : Lavf55.2.100
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1
DAR 4:3], q=-1--1, 12288 tbn, 24 tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 128 k
b/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (nellymoser -> libvo_aacenc)
Press [q] to stop, [?] for help
frame= 32 fps=0.0 q=15.0 size= 226kB time=00:16:07.00 bitrate= 1.9kbits/
frame= 60 fps= 58 q=17.0 size= 473kB time=00:16:08.16 bitrate= 4.0kbits/
frame= 65 fps=8.2 q=15.0 size= 521kB time=00:16:08.49 bitrate= 4.4kbits/
frame= 88 fps= 10 q=17.0 size= 690kB time=00:16:09.55 bitrate= 5.8kbits/
frame= 114 fps= 13 q=15.0 size= 862kB time=00:16:10.67 bitrate= 7.3kbits/
frame= 145 fps= 15 q=15.0 size= 1058kB time=00:16:12.01 bitrate= 8.9kbits/
frame= 179 fps= 18 q=15.0 size= 1251kB time=00:16:13.64 bitrate= 10.5kbits/
frame= 209 fps= 20 q=15.0 size= 1470kB time=00:16:14.99 bitrate= 12.4kbits/
frame= 246 fps= 22 q=16.0 size= 1654kB time=00:16:16.66 bitrate= 13.9kbits/
frame= 284 fps= 25 q=15.0 size= 1814kB time=00:16:18.28 bitrate= 15.2kbits/
frame= 322 fps= 27 q=15.0 size= 1978kB time=00:16:20.05 bitrate= 16.5kbits/
frame= 341 fps= 27 q=17.0 size= 2130kB time=00:16:20.93 bitrate= 17.8kbits/
frame= 367 fps= 28 q=15.0 size= 2374kB time=00:16:22.14 bitrate= 19.8kbits/
frame= 390 fps= 28 q=15.0 size= 2595kB time=00:16:23.25 bitrate= 21.6kbits/
frame= 414 fps= 29 q=15.0 size= 2785kB time=00:16:24.23 bitrate= 23.2kbits/
frame= 434 fps= 29 q=15.0 size= 2951kB time=00:16:25.20 bitrate= 24.5kbits/
frame= 460 fps= 30 q=15.0 size= 3121kB time=00:16:26.36 bitrate= 25.9kbits/
frame= 479 fps= 30 q=12.0 size= 3272kB time=00:16:27.25 bitrate= 27.2kbits/
frame= 501 fps= 31 q=15.0 size= 3492kB time=00:16:28.18 bitrate= 28.9kbits/
frame= 528 fps= 31 q=15.0 size= 3749kB time=00:16:29.38 bitrate= 31.0kbits/
Stream discovered after head already parsed
[flv @ 0000000003d300a0] New video stream 0:2 at pos:223963332 and DTS:-597633s
frame= 543 fps= 31 q=-1.0 Lsize= 3953kB time=00:16:30.03 bitrate= 32.7kbits
/s dup=0 drop=32
video:3553kB audio:385kB subtitle:0 global headers:0kB muxing overhead 0.384003%
[libx264 @ 00000000023b95c0] frame I:4 Avg QP:12.00 size: 24706
[libx264 @ 00000000023b95c0] frame P:348 Avg QP:15.00 size: 8044
[libx264 @ 00000000023b95c0] frame B:191 Avg QP:16.88 size: 3872
[libx264 @ 00000000023b95c0] consecutive B-frames: 36.5% 48.6% 3.9% 11.0%
[libx264 @ 00000000023b95c0] mb I I16..4: 6.7% 19.9% 73.4%
[libx264 @ 00000000023b95c0] mb P I16..4: 4.7% 5.6% 12.0% P16..4: 39.2% 21.5
% 9.3% 0.0% 0.0% skip: 7.6%
[libx264 @ 00000000023b95c0] mb B I16..4: 0.8% 0.9% 3.8% B16..8: 42.1% 12.0
% 6.3% direct:13.8% skip:20.3% L0:44.0% L1:39.4% BI:16.6%
[libx264 @ 00000000023b95c0] 8x8 transform intra:24.1% inter:24.6%
[libx264 @ 00000000023b95c0] coded y,uvDC,uvAC intra: 81.1% 89.9% 64.4% inter: 4
5.2% 67.5% 42.5%
[libx264 @ 00000000023b95c0] i16 v,h,dc,p: 11% 20% 12% 57%
[libx264 @ 00000000023b95c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 21% 15% 5% 5%
7% 5% 7% 8%
[libx264 @ 00000000023b95c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 19% 12% 6% 8%
9% 7% 7% 7%
[libx264 @ 00000000023b95c0] i8c dc,h,v,p: 42% 21% 23% 14%
[libx264 @ 00000000023b95c0] Weighted P-Frames: Y:12.9% UV:5.7%
[libx264 @ 00000000023b95c0] ref P L0: 66.0% 15.1% 14.1% 4.5% 0.3%
[libx264 @ 00000000023b95c0] ref B L0: 95.9% 3.9% 0.2%
[libx264 @ 00000000023b95c0] ref B L1: 98.3% 1.7%
[libx264 @ 00000000023b95c0] kb/s:1185.75
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
Problems with a FLV file (size/stream time)
By aquadark in forum Video ConversionReplies: 2Last Post: 12th Jul 2012, 13:46 -
Possible to fix this FLV/H264/MP4 live stream video?
By tigerb in forum Newbie / General discussionsReplies: 0Last Post: 3rd Dec 2011, 15:05 -
How: Converting incoming video file into live stream?
By 2Blive in forum Video Streaming DownloadingReplies: 0Last Post: 14th Nov 2009, 13:00 -
FLV file with no video stream
By CSULB71 in forum Video ConversionReplies: 2Last Post: 13th Jul 2009, 22:37