Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


Questions for audio

Discussions about problems encountered using ffmpeg.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

Questions for audio

Postby hoolydays » Sun Mar 03, 2013 4:08 pm

I apologize for my English - I write in the google-translator

Ffmpeg version - 1.1.2 -
1. My questions.
When creating an audio track to the movie of 6 mono files I've used this line for Ffmpeg:
Code: Select all
ffmpeg -i /home/usr/fl.wav -i /home/usr/fc.wav -i /home/usr/fr.wav -i /home/usr/lfe.wav -i /home/usr/sl.wav /home/usr/sr.wav -filter_complex join=inputs=6:channel_layout=5.1 -filter channelmap=1\,0\,2\,5\,3\,4 /home/usr/out51.wav
But the result is not obtained satisfactory. The central channel [RC] does not sound in the centre, and collapses - that's right, then the left. When listening in stereo. Although this has not been on the original audio track, before the process of splitting into 6 mono files.
How do I treat this disease audio?

2. And have not found a satisfactory option for stretching the audio track of time "time stretch." How exactly can stretch the audio track from 23.976 fps to 25 fps, with great precision and without losing sync.
Do not offer the function <-af atempo> - the accuracy is not sufficient to stretch a very long tracks in hours - 2h, 3h.
Application example (25.000/23.976023976 x 100%) < -af atempo=1.042708333 > for a 2 hour movie. async has been observed at around 20-30 minutes of video - and increased significantly by the end of the movie
Code: Select all
C:\Documents and Settings\usr>C:\1.ffmpeg\bin\ffmpeg -i C:\video\BF.wav -c:a pcm_s16le -af atempo=1.042708333 C:\video\BF25.wav
ffmpeg version N-50442-g4f0d4ac Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar  2 2013 15:25:54 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.102 / 54. 63.102
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wav @ 02537ae0] max_analyze_duration 5000000 reached at 5001333 microseconds
Input #0, wav, from 'C:\video\BF.wav':
  Metadata:
    encoder         : Lavf54.63.100
  Duration: 01:56:01.02, bitrate: 4608 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1(side), s16, 4608 kb/s
File 'C:\video\BF25.wav' already exists. Overwrite ? [y/N] y
Output #0, wav, to 'C:\video\BF25.wav':
  Metadata:
    ISFT            : Lavf54.63.102
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1(side), s16, 4608 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
size=  748384kB time=00:22:10.49 bitrate=4607.9kbits/s

Linux Ubuntu 12.04.1 LTS
Code: Select all
usr@com:~$ ffmpeg -i /media/E20803260802F975/video/BF.wav -c:a pcm_s16le -af atempo=1.042708333 /media/E20803260802F975/videooo/BF25.wav
ffmpeg version git-2013-02-22-db05f7a Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 22 2013 16:04:11 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 39.100 /  3. 39.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wav @ 0xa547320] max_analyze_duration 5000000 reached at 5001333 microseconds
Input #0, wav, from '/media/E20803260802F975/video/BF.wav':
  Metadata:
    encoder         : Lavf54.63.100
  Duration: 01:56:01.02, bitrate: 4608 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1(side), s16, 4608 kb/s
File '/media/E20803260802F975/video/BF25.wav' already exists. Overwrite ? [y/N]
Last edited by hoolydays on Wed Mar 06, 2013 7:51 pm, edited 1 time in total.
hoolydays
 
Posts: 14
Joined: Sun Mar 03, 2013 3:16 pm

Re: Questions for audio

Postby burek » Mon Mar 04, 2013 11:52 pm

Hi,

1) Please read this

2) Please read this
burek
 
Posts: 868
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: Questions for audio

Postby hoolydays » Tue Mar 05, 2013 10:56 am

Thank you ...
Dear burek, - the function <atempo> does not work with sufficient accuracy to stretch a long time audio tracks. Already in the middle of the length of the movie - there is out of sync...
The function <join> generates an error on the wrong parameter: map=0.0-FL\ ,1.0-FR\ ,2.0-FC\ ,3.0-SL\ ,4.0-SR\ ,5.0-LFE ... This line only works:
Code: Select all
C:\ffmpeg\bin\ffmpeg -i C:\video\fc.wav -i C:\video\fl.wav -i C:\video\fr.wav -i C:\video\lfe.wav -i C:\video\sl.wav -i C:\video\sr.wav -c:a pcm_s16le -filter_complex join=inputs=6:channel_layout=5.1 -filter channelmap=1.0\,2.0\,0.0\,3.0\,4.0\,5.0 C:\video\out51.wav


* * *

I realized my mistake about the location of the audio channels - Input #0 - fc.wav … Input #1 - fl.wav … Input #2 - fr.wav … Input #3 - lfe.wav … Input #4 - sl.wav … Input #5 - sr.wav . Need to consider the location of files in the source folder channels, and then configure them under the scheme: FL,FR,FC,LFE,SL,SR
But this does not solve the problem with <map> - the documented example - does not work...
hoolydays
 
Posts: 14
Joined: Sun Mar 03, 2013 3:16 pm

Re: Questions for audio

Postby burek » Tue Mar 05, 2013 6:18 pm

Regarding channels mappings, your command is not the same as provided in the example I forwarded you to. Using both "-filter_complex" and "-filter" at the same command line may exhibit unpredictable issues and that is the most probable reason why your command line does not work. Please use either one of those two. The example uses only "-filter_complex" in this way:
Code: Select all
ffmpeg\
   -i fl\
   -i fr\
   -i fc\
   -i sl\
   -i sr\
   -i lfe\
   -filter_complex 'join=inputs=6:channel_layout=5.1:map=0.0-FL\,1.0-FR\,2.0-FC\,3.0-SL\,4.0-SR\,5.0-LFE'\
   out


For speeding up / slowing down the audio, you can also consult our wiki article Speeding up/slowing down audio.
burek
 
Posts: 868
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: Questions for audio

Postby hoolydays » Wed Mar 06, 2013 7:49 pm

Code: Select all
C:\Documents and Settings\usr>C:\1.ffmpeg\bin\ffmpeg -i C:\video\a\fc.wav -i C:\video\a\fl.wav -i C:\video\a\fr.wav -i C:\video\a\lfe.wav -i C:\video\a\sl.wav -i C:\video\a\sr.wav -c:a pcm_s16le -filter_complex join=inputs=6:channel_layout=5.1:map=0.0-FL\,1.0-FR\,2.0-FC\,3.0-SL\,4.0-SR\,5.0-LFE C:\video\out.wav
ffmpeg version N-50442-g4f0d4ac Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar  2 2013 15:25:54 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.102 / 54. 63.102
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wav @ 02537ce0] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, wav, from 'C:\video\a\fc.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[wav @ 02660a20] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #1.0 : mono
Input #1, wav, from 'C:\video\a\fl.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[wav @ 0272e3e0] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #2.0 : mono
Input #2, wav, from 'C:\video\a\fr.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #2:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[wav @ 0276be60] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #3.0 : mono
Input #3, wav, from 'C:\video\a\lfe.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #3:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[wav @ 02844120] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #4.0 : mono
Input #4, wav, from 'C:\video\a\sl.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #4:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[wav @ 028cd460] max_analyze_duration 5000000 reached at 5034667 microseconds
Guessed Channel Layout for  Input Stream #5.0 : mono
Input #5, wav, from 'C:\video\a\sr.wav':
  Duration: 01:56:01.02, bitrate: 768 kb/s
    Stream #5:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
[Parsed_join_0 @ 0284c0e0] Output channel 'SL' is not present in requested channel layout.
[AVFilterGraph @ 02538a40] Error initializing filter 'join' with args 'inputs=6:channel_layout=5.1:map=0.0-FL,1.0-FR,2.0-FC,3.0-SL,4.0-SR,5.0-LFE'
Error configuring filters.

C:\Documents and Settings\usr>

[Parsed_join_0 @ 0284c0e0] Output channel 'SL' is not present in requested channel layout.
[AVFilterGraph @ 02538a40] Error initializing filter 'join' with args 'inputs=6:channel_layout=5.1:map=0.0-FL,1.0-FR,2.0-FC,3.0-SL,4.0-SR,5.0-LFE'
Error configuring filters.

* * *

If there is at bug in program, to the bug must be corrected... In this case, - consultation, help and wiki article - to not fix it problem.
hoolydays
 
Posts: 14
Joined: Sun Mar 03, 2013 3:16 pm

Re: Questions for audio

Postby burek » Wed Mar 13, 2013 11:11 pm

I've created a bug issue here: https://ffmpeg.org/trac/ffmpeg/ticket/2357
So, you can track it in the future and provide some more info if needed by developers.
burek
 
Posts: 868
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: Questions for audio

Postby burek » Thu Mar 14, 2013 1:40 pm

Hi, try using "BL" instead of "SL" or use amerge and pan audio filters (which are recommended, because it appears that "join (filter) is flawed by design" - quoted a developer)
burek
 
Posts: 868
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: Questions for audio

Postby hoolydays » Fri Mar 15, 2013 11:50 pm

Thanks burek, - I'll try these options...
Another would be to fix a bug with <atempo> - it would be great!...
hoolydays
 
Posts: 14
Joined: Sun Mar 03, 2013 3:16 pm

Re: Questions for audio

Postby burek » Sat Mar 16, 2013 1:50 am

Hi, if I understood correctly, this is not a bug, rather the fact that 5.1 layout does not have SL channel?
burek
 
Posts: 868
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: Questions for audio

Postby hoolydays » Sun Mar 17, 2013 8:17 pm

SL channel - is present in 5.1 channel layout... I am check all channels 5.1 layout with a sound editor...
hoolydays
 
Posts: 14
Joined: Sun Mar 03, 2013 3:16 pm

Next

Return to ffmpeg

Who is online

Users browsing this forum: No registered users and 3 guests