Opened 14 years ago

Last modified 13 years ago

#1708 closed defect (fixed)

Fail to read .mkv files from pipe with -demuxer lavf

Reported by: j@… Owned by: r_togni@…
Priority: normal Component: demuxer
Version: HEAD Severity: normal
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

mplayer-r31317 fail to read .mkv files from a pipe.
it works when i choose -demuxer mkv
How to test it:
cat file.mkv | mplayer -

Output from mplayer -v:
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
Cache not filling!
C

MPlayer interrupted by signal 2 in module: demux_open

MPlayer interrupted by signal 2 in module: enable_cache
[matroska @ 0x319ad90]Unknown entry 0x4329
[matroska @ 0x319ad90]Unknown entry 0x233C8A
[matroska @ 0x319ad90]Could not find codec parameters (Video: h264, 1280x536)
[matroska @ 0x319ad90]Estimating duration from bitrate, this may be inaccurate
==> Found video stream: 0
======= VIDEO Format ======

biSize 81
biWidth 1280
biHeight 536
biPlanes 0
biBitCount 0
biCompression 875967048='H264'
biSizeImage 0

Unknown extra header dump: [1] [64] [0] [1f] [ff] [e1] [0] [19] [67] [64] [0] [1f] [ac] [34] [e6] [1] [40] [11] [7e] [58] [40] [0] [0] [fa] [40] [0] [2e] [e0] [23] [c6] [c] [66] [80] [1] [0] [5] [68] [e9] [6b] [3c] [8f]
===========================
[lavf] stream 0: video (h264), -vid 0
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 8193 (0x2001)
Channels: 6
Samplerate: 48000
avg byte/sec: 0
Block align: 1
bits/sample: 0
cbSize: 0
==========================================================================
[lavf] stream 1: audio (dca), -aid 0, -alang eng
[lavf] stream 2: subtitle (unknown), -sid 0, -slang eng
LAVF: 1 audio and 1 video streams found
LAVF: build 3425024
VIDEO: [H264] 1280x536 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:1280x536 fps:23.976 ftime:=0.0417
get_path('sub/') -> '/home/johan/.mplayer/sub/'
X11 opening display: :0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 2720x1024 with depth 24 and 32 bpp (":0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports STAYS_ON_TOP state.
[x11] Current fstype setting honours FULLSCREEN STAYS_ON_TOP ABOVE BELOW X atoms
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "dca" init OK!
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Trying preferred audio driver 'alsa', options '[none]'
alsa-init: requested format: 48000 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.23
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: pcm opened in blocking mode
alsa-init: got buffersize=32768
alsa-init: got period size 1024
alsa: 48000 Hz/2 channels/4 bpf/32768 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@…>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Starting playback...
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
ds_fill_buffer: EOF reached (stream: video)
Uninit audio filters... 0.000 ct: 0.000 0/ 0 ??% ??% ??,?% 0 0 0%
[libaf] Removing filter dummy
Uninit audio: ffmpeg
Uninit video: ffmpeg
alsa-uninit: pcm closed
vo: uninit ...

Exiting... (Quit)

Change History (3)

comment:1 by reimar, 14 years ago

I proposed below little patch to FFmpeg, which should fix the issue.
Index: libavformat/matroskadec.c
===================================================================
--- libavformat/matroskadec.c (revision 23468)
+++ libavformat/matroskadec.c (working copy)
@@ -1063,6 +1063,10 @@

MatroskaLevel level;
int i;


+ we should not do any seeking in the streaming case
+ if (url_is_streamed(matroska->ctx->pb))
+ return;
+

for (i=0; i<seekhead_list->nb_elem; i++) {

int64_t offset = seekhead[i].pos + matroska->segment_start;


comment:2 by j@…, 14 years ago

(In reply to comment #1)

I proposed below little patch to FFmpeg, which should fix the issue.
Index: libavformat/matroskadec.c
===================================================================
--- libavformat/matroskadec.c (revision 23468)
+++ libavformat/matroskadec.c (working copy)
@@ -1063,6 +1063,10 @@

MatroskaLevel level;
int i;

+ we should not do any seeking in the streaming case
+ if (url_is_streamed(matroska->ctx->pb))
+ return;
+

for (i=0; i<seekhead_list->nb_elem; i++) {

int64_t offset = seekhead[i].pos + matroska->segment_start;

It works great with that fix :)

comment:3 by compn, 13 years ago

Resolution: fixed
Status: newclosed, patriotact@gmail.com

works for me with svn, reimar's patch must have been applied.

Note: See TracTickets for help on using tickets.