Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#623 closed defect (invalid)

FLV file saved from within VLC can't be opened by FFmpeg

Reported by: burek Owned by: Michael Niedermayer
Priority: normal Component: undetermined
Version: git-master Keywords: flv h264 aac
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The file was captured/saved with VLC and when I try to cut/seek/remux/transcode (pretty much anything) in FFmpeg, all I get is the following:

# ffmpeg -i live.98.1.2011-11-07-21-58-56.flv
ffmpeg version N-34556-g5ca392d, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  7 2011 18:29:27 with gcc 4.6.1
  configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-libx264 --enable-libaacplus --enable-libmp3lame --enable-libv4l2 --enable-libvo-aacenc --enable-version3
  libavutil    51. 24. 0 / 51. 24. 0
  libavcodec   53. 28. 0 / 53. 28. 0
  libavformat  53. 19. 0 / 53. 19. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 47. 0 /  2. 47. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[aac @ 0x24702a0] Pulse data corrupt or invalid.
[flv @ 0x2469760] Stream discovered after head already parsed
Input #0, flv, from 'live.98.1.2011-11-07-21-58-56.flv':
  Metadata:
    encoder         : Lavf53.19.0
  Duration: 03:10:13.06, start: 0.000000, bitrate: 300 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 320 kb/s, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: aac, 44100 Hz, 2 channels (FC), s16, 32 kb/s
    Stream #0:2: Data: none
At least one output file must be specified

The sample (first 10mb) of the file can be found here:
http://ffmpeg.test-lab.ch/uploads/flv-from-vlc-cant-open.flv

Change History (9)

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: FFmpegundetermined
Version: unspecifiedgit-master

Which program plays the file?

comment:2 by burek, 12 years ago

VLC? :)

Also, when I do:

cvlc live.98.1.2011-11-07-21-58-56.flv --sout='#std{access=udp,mux=ts,dst=127.0.0.1:10001}'
&&
ffmpeg -f mpegts -i udp://127.0.0.7:10001 -acodec copy -vcodec copy out.ts

the resulting out.ts file is ok and plays fine in ffmpeg.

comment:3 by burek, 12 years ago

Also this:

# ffmpeg -i live.98.1.2011-11-07-21-58-56.flv -acodec copy -vcodec copy bla.flv

ffmpeg version N-34556-g5ca392d, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov  7 2011 18:29:27 with gcc 4.6.1
  configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-libx264 --enable-libaacplus --enable-libmp3lame --enable-libv4l2 --enable-libvo-aacenc --enable-version3
  libavutil    51. 24. 0 / 51. 24. 0
  libavcodec   53. 28. 0 / 53. 28. 0
  libavformat  53. 19. 0 / 53. 19. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 47. 0 /  2. 47. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[aac @ 0x1d282a0] Pulse data corrupt or invalid.
[flv @ 0x1d21760] Stream discovered after head already parsed
Input #0, flv, from 'live.98.1.2011-11-07-21-58-56.flv':
  Metadata:
    encoder         : Lavf53.19.0
  Duration: 03:10:13.06, start: 0.000000, bitrate: 300 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 320 kb/s, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: aac, 44100 Hz, 2 channels (FC), s16, 32 kb/s
    Stream #0:2: Data: none
Output #0, flv, to 'bla.flv':
  Metadata:
    encoder         : Lavf53.19.0
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 320 kb/s, 1k tbn, 1k tbc
    Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, 2 channels (FC), 32 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[flv @ 0x1d28b00] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 17303808 >= 3668967
av_interleaved_write_frame(): Invalid argument

in reply to:  2 comment:4 by Carl Eugen Hoyos, 12 years ago

Replying to burek:

VLC? :)

Which version?
I tried 1.1.10 and todays nightly, the older one fails completely, the newer one shows one frame (as does FFmpeg).
(md5sum flv-from-vlc-cant-open.flv shows de7f85bf711399e30fb81151f8139585)

comment:5 by burek, 12 years ago

Most probably because its a cut of the original file (~420 MB).. Are you on irc channels now? I can setup a user account for you, so you can login and test what you need?

comment:6 by Carl Eugen Hoyos, 12 years ago

Resolution: invalid
Status: newclosed

Please reopen if you can provide a file that plays with vlc but fails with FFmpeg.

comment:7 by burek, 12 years ago

I'll give you a link to the original file, but I apologize because of its size (400 MB).
http://ffmpeg.test-lab.ch/uploads/flv-from-vlc-cant-open-full-video.flv

in reply to:  7 comment:8 by Carl Eugen Hoyos, 12 years ago

Keywords: flv h264 aac added

Replying to burek:

I apologize because of its size (400 MB).

Why?

I hope you agree that the sample plays very badly with vlc (you have to seek to the middle), so I believe it is safe to assume the file is broken.

It plays better with ffplay than with any other player (MPlayer needs one forward-seek), ffmpeg -ss 3680 -i flv-from-vlc-cant-open-full-video.flv works afaict (as vlc), remuxing is not possible.

Please reopen if you believe the sample could be handled better.

comment:9 by burek, 12 years ago

I've used the latest git vlc (1.2) to save and to read the file. I've also compiled both vlc and ffmpeg in order for vlc to use ffmpeg to encode audio using libaacplus (sout='std{aenc=ffmpeg{acodec=libaacplus},...}'.

When I play it back on that vlc, it does show some warnings and errors, but it plays the media (for example if I send the stream over udp, I can play it in ffmpeg too). But, I agree, it looks like no other media player can play this file correctly, so we can safely assume that the file is most likely broken :/

Thanks for the help and time spent to analyze it.

Note: See TracTickets for help on using tickets.