Menu

#60 mp1e cant sync audio and video

open-fixed
None
5
2002-01-13
2002-01-10
Anonymous
No

version in the cvs as of today is having strange
problems, when run with the following options:
./mp1e -v -a3 -X2 -B32 -f1 -S32 -c /dev/video0 -p
/dev/dsp1 >/tmp/new.mpg

some times it generates the following message right
after launching:
mp1e:sync.c:154: Unable to sync audio-oss after
234472671830530.656250 secs
other times it generates video that looks like it is
running 100x the correct speed, but the audio is a the
correct speed. and generates the following messages:

Using SSE2 optimized routines.
/dev/mixer initialized, source 6:line, vol 80%
Opened OSS PCM device /dev/dsp1
Set /dev/dsp1 to signed 16 bit little endian, 32000 Hz,
mono, buffer size 8192 bytes
Opened /dev/video0 ('BT878(ATI TV-Wonder)')
Video standard is 'NTSC' (29.97 Hz)
Audio unmuted
Filter 'YUYV 4:2:2 w/vertical decimation'
Image format 'YUYV' 352 x 480 granted
24 capture buffers granted
Mapping capture buffer #0
Mapping capture buffer #1
Mapping capture buffer #2
Mapping capture buffer #3
Mapping capture buffer #4
Mapping capture buffer #5
Mapping capture buffer #6
Mapping capture buffer #7
Mapping capture buffer #8
Mapping capture buffer #9
Mapping capture buffer #10
Mapping capture buffer #11
Mapping capture buffer #12
Mapping capture buffer #13
Mapping capture buffer #14
Mapping capture buffer #15
Mapping capture buffer #16
Mapping capture buffer #17
Mapping capture buffer #18
Mapping capture buffer #19
Mapping capture buffer #20
Mapping capture buffer #21
Mapping capture buffer #22
Mapping capture buffer #23
Audio compression 32.0 kHz mono at 32 kbits/s (16.0 : 1)
Using rte sample format 3, bps 2, bp 0.00001562500000000000
Audio table #3, 12000 Hz cut-off
Psychoacoustic threshold table #0
Macroblocks 22 x 15
Video compression 352 x 240, 1.0 frames/s at 0.05
Mbits/s (20.3 : 1)
Motion compensation disabled
Encoding 0 picture
Encoding sequence header
Audio compression thread launched
Video compression thread
[Sequence header]
[GOP header, closed=T]
Encoding I picture #0 GOP #0, ref=T
Encoding P picture #1 GOP #1, ref=T, d=0, f_code=1 (0)
Encoding 0 picture #2 GOP #2
0:02 (0.0 MB), system load 100.0 %
0:02 (0.0 MB), system load 100.0 %
0:02 (0.0 MB), system load 100.0 %
Encoding P picture #3 GOP #3, ref=T, d=0, f_code=1 (0)
Encoding 0 picture #4 GOP #4
0:02 (0.0 MB), system load 100.0 %
0:02 (0.0 MB), system load 100.0 %
Encoding P picture #5 GOP #5, ref=T, d=0, f_code=1 (0)
0:02 (0.0 MB), system load 100.0 %
0:02 (0.1 MB), system load 100.0 %
Encoding I picture #6 GOP #6, ref=T
0:02 (0.1 MB), system load 100.0 %
0:02 (0.1 MB), system load 100.0 %
Encoding 0 picture #7 GOP #7
Encoding P picture #8 GOP #8, ref=T, d=0, f_code=1 (0)
Encoding I picture #8 GOP #8, ref=T
0:02 (0.1 MB), system load 100.0 %
0:02 (0.1 MB), system load 100.0 %
Encoding 0 picture #9 GOP #9
Received termination signal

Stop at 1010620223.408544
Video: End of file
0:02 (0.1 MB), system load 100.0 %

Audio: End of file

mp1e: Done.

Discussion

  • Michael H. Schimek

    • assigned_to: nobody --> mschimek
    • status: open --> open-works-for-me
     
  • Michael H. Schimek

    Logged In: YES
    user_id=46861

    Hi Anonymous,

    > ./mp1e -v -a3 -X2 -B32 -f1 -S32 -c /dev/video0 -p
    > /dev/dsp1 >/tmp/new.mpg

    Did you really want -f1 one frame per second?

    > some times it generates the following message right
    > after launching:
    > mp1e:sync.c:154: Unable to sync audio-oss after
    > 234472671830530.656250 secs

    Uh-oh. That shouldn't happen even at 1 fps, I'll
    investigate.

    Michael

     
  • Nobody/Anonymous

    Logged In: NO

    yes 1fps is very important to me.

     
  • Michael H. Schimek

    Logged In: YES
    user_id=46861

    Should work now, please try.

    Michael

     
  • Michael H. Schimek

    • status: open-works-for-me --> open-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    The version in todays cvs also has bad time stamps:
    # ./mp1e -v -a3 -X2 -B32 -S32 -c /dev/video4 -p /dev/dsp5 >
    /tmp/out.mpg
    Audio compression 32.0 kHz mono at 32 kbits/s (16.0 : 1)
    Video compression 352 x 240, 30.0 frames/s at 2.30 Mbits/s
    (13.2 : 1)
    Motion compensation disabled
    0:01 (0.1 MB), system load 100.0 %
    Stop at 1011213801.271155
    0:01 (0.1 MB), system load 100.0 %
    mp1e: Done.

     
  • Nobody/Anonymous

    Logged In: NO

    I got a similar problem in version 1.92. I am using
    i810_audio with a fixed rate of 48kHz.

    [apple]# mp1e -vvvv -p /dev/dsp -a 0 -S 48000 >1.mpg
    Using SSE optimized routines.
    /dev/mixer initialized, source 6:line, vol 80%
    Opened OSS PCM device /dev/dsp
    Set /dev/dsp to signed 16 bit little endian, 48000 Hz,
    stereo
    Dsp buffer size 16384
    Opened /dev/video ('BT878(PixelView PlayTV pro)')
    Video standard is PAL/SECAM
    Using mmap interface, 2 capture buffers granted.
    Mapping capture buffers
    Grab 1st frame and set capture format and dimensions.
    Filter 'YUV 4:2:0 fastest'
    Allocated 24 bounce buffers.
    V4L capture thread launched
    Audio compression 48.0 kHz stereo at 160 kbits/s (9.6 : 1)
    Audio table #0, 0 Hz
    Psychoacoustic threshold table #2
    Macroblocks 22 x 18
    Video compression 352 x 288, 25.0 frames/s at 2.30 Mbits/s
    (13.2 : 1)
    Motion compensation disabled
    Encoding 0 picture
    Encoding sequence header
    Audio compression thread launched
    SS 02: disagree start_time
    17976931348623157081452742373170435679807056752584499
    659891747680315726078002853876058955863276687817154045895351
    43824642343213268894
    641827684675467035375169860499105765512820762454900903893289
    44075868508455133942
    304583236903222948165808559332123348274797826204144723168738
    17718091929988125040
    4026184124858368.000000, discard 1012975206.120196
    mp1e:sync.c:119: Unable to sync audio-oss after
    44738.902276 secs

    Video compression thread
    Video compression thread launched

     
  • Devin Bayer

    Devin Bayer - 2002-07-10

    Logged In: YES
    user_id=153308

    I am getting the same error message. About 95% or the time
    I run mp1e with -vvv it gives this output:

    devin@elektrono:~/tmp$mp1e -n 300 -vvv > stream.mpeg
    Using 3DNow! optimized routines.
    /dev/sound/mixer initialized, source 14:line1, vol 100%
    Opened OSS PCM device /dev/sound/dsp
    Set /dev/sound/dsp to signed 16 bit little endian, 44100 Hz,
    mono
    Dsp buffer size 16384
    Opened /dev/v4l/video0 ('BT878(ATI TV-Wonder)')
    Video standard is NTSC
    Using mmap interface, 2 capture buffers granted.
    Mapping capture buffers
    Grab 1st frame and set capture format and dimensions.
    Filter 'YUV 4:2:0 fastest'
    Allocated 24 bounce buffers.
    V4L capture thread launched
    Audio compression 44.1 kHz mono at 80 kbits/s (8.8 : 1)
    Audio table #0, 0 Hz
    Psychoacoustic threshold table #1
    Macroblocks 20 x 15
    Video compression 320 x 240, 30.0 frames/s at 2.30 Mbits/s
    (12.0 : 1)
    Motion compensation disabled
    Encoding 0 picture
    Encoding sequence header
    Audio compression thread launched
    mp1e:sync.c:120: Unable to sync audio-oss after 97390.921964
    secs

    Video compression thread
    Video compression thread launched
    ------------------------------END OF OUTPUT

    My Config File Looks like this:
    capture_device /dev/v4l/video0
    pcm_device /dev/sound/dsp
    rec_source 14,100
    image_size 320x240
    mixer_device /dev/sound/mixer
    vbi_device /dev/video/vbi0
    cpu c3
    mux mpeg1

    I am using version 1.9.1 (the RPM) on Debian GNU/Linux
    2.4.17 with an ATI TV-Wonder. When it records it works
    fine. This is going to make it hard to work in a script.

     

Log in to post a comment.