Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

player --fffmpeg MOV audio problem

Developers
guhlda
2011-10-19
2013-04-25
  • guhlda
    guhlda
    2011-10-19

    Hi Ingex team,

    I have a mov DV25 file, which contains one video track and one stereo audio track:

    > ffmpeg -i dvcpro25.mov 
    FFmpeg version 0.5.3-2_GF_DNxHD_h264_aac, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --shlibdir=/usr/lib --enable-pthreads --enable-shared --enable-gpl --enable-avfilter --disable-static --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-postproc --enable-libtheora --enable-version3 --enable-swscale --enable-nonfree --enable-libfaac --enable-libfaad
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 1 / 52.20. 1
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct  5 2011 11:28:41, gcc: 4.3.2 [gcc-4_3-branch revision 141291]
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/common/dvcpro25.mov':
      Duration: 01:00:01.24, start: 0.000000, bitrate: 31110 kb/s
        Stream #0.0(eng): Video: dvvideo, yuv411p, 720x576, PAR 59:54 DAR 295:216, 25 tbr, 25 tbn, 25 tbc
        Stream #0.1(eng): Audio: pcm_s24le, 48000 Hz, stereo, s16, 2304 kb/s
        Stream #0.2(eng): Data: tmcd / 0x64636D74
    At least one output file must be specified
    
    player --x11 --ffmpeg dvcpro25.mov --src-info
    Info: Version: version 0.91, build: Oct 19 2011 18:24:36
    Warning: Failed to open jog-shuttle device for exclusive access - will try again later
    Source Information:
      Source #0: dvcpro25.mov
         0: Picture, UYVY, 25/1 fps, 720x576, 4:3
         1: Sound, PCM, 48000/1 Hz, 1 channel, 16 bits/sample
         2: Sound, PCM, 48000/1 Hz, 1 channel, 16 bits/sample
         3: Timecode, source
    Unlocked
    Playing
    Started
    Speed 1x
    

    The file plays well with mplayer and others, but with

    player --ffmpeg
    

    , I get only audio on right channel, obviously playing twice too slow. My guess is that the 2 16bits audio are not getting deinterlaced, all samples going to 1 channel, but apparently this is done in ffmpeg_source.c using deinterleave_audio().

    Any help please ?

    Thanks
    Guhlda

     
  • Philip de Nier
    Philip de Nier
    2011-10-19

    The -ffmpeg source only supports 16-bit audio. Your input has 24-bit audio. A quick look at ffplay reveals that although the avcodec_decode_audio2 function has an int16_t sample output parameter type, the bps can be 24-bit for example. ffplay uses an av_audio_convert call to convert to 16-bit audio.

    You would need to change the deinterleaving code and stream registration in the -ffmpeg source to identify and support 24-bit audio sources.

    Philip

     
  • guhlda
    guhlda
    2011-10-24

    Philip,

    I have added source audio conversion to ffmpeg_source.c. I will send you the patch for today's HEAD CVS release.

    Guhlda