[MPlayer-users] mencoder -endpos <size>mb does not work, neither does mplayer -sb XXXXX -dumpstream

Jouni.Lohikoski@iki.fi jlohikos at cc.hut.fi
Mon Jan 2 23:35:52 CET 2006


I am trying to split WMV (ASF) to two working video files without
needing to re-encode anything.

1)
Why following (mencoder commandline) does not work as expected?

$ du -sh video1.wmv
540M video1.wmv

$ mencoder -ovc copy -oac copy -endpos 391mb video1.wmv -mc 0 -noskip -o video2.wmv

$ du -sh video2.wmv
52M video2.wmv

So only 52 MiB and not 391 MiB which was asked with -endpos!

I believe it is because mencoder knows only AVI and MPEG container, and
neither of them support variable FPS as ASF (WMV) files does?

If I use -ofps 25, it kind of seem to work, but what if WMV has variable
frame rate somewhere middle of the video. I really do not know if it has
or not, or what would be the true average frame rate even. Will it brake
the video file when framerate actually in the WMV is something else but
25, maybe variable, and I am forcing to be 25 FPS?

Is there any way to tell mencoder just copy everything like dd would?
Oh yes I could use dd, but it is not "nice" for the end of the video.

I would use mplayer -streamdump, but mplayer doesn't support -endpos

2)
And then the rest of the video:
$ mplayer  -sb 409993216 video1.wmv -dumpstream -dumpfile video3.wmv
$ du -sh video3.wmv
149M video3.wmv

Kind of seem to work if comparing the file size. (391M + 149M = 540M)

But mplayer doesn't know how to show this video3.wmv then:
$ mplayer -v video3.wmv

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Duron Spitfire (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
....
[file] File size is 155291648 bytes
STREAM: [file] video3.wmv
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:1728512
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for Nullsoft Streaming Video
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename video3.wmv ext: .wmv
Trying demuxer 6 based on filename extension
ASF_check: not ASF guid!
demuxer: continue fuzzy content-based format guessing...
Checking for MOV
Checking for VIVO
AVS: avs_check_file - attempting to open file video3.wmv
AVS: File is too big, aborting...
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 68522, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=13747 size=164195064
LMLM4 Stream Format not found
sync_mpeg_ps: seems to be MP3 stream...
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 0  p101: 0 p1B6: 0 p12x: 0 sli: 0 a: 0 b: 0 c: 0 idr: 0 sps: 0 pps: 0 PES: 0  MP3: 174
Not MPEG System Stream format... (maybe Transport Stream?)
Checking for DV
==> Found video stream: 0
ds_fill_buffer: EOF reached (stream: video)
LAVF_check: no clue about this gibberish!

vo: x11 uninit called but X11 not inited..

Exiting... (End of file)

// jouni




More information about the MPlayer-users mailing list