Dividir a transmissão de áudio usando o FFmpeg

0

Estou tentando salvar um feed de áudio (ou vídeo) em local usando o FFmpeg. Aqui estão os comandos e argumentos que estou usando.

ffmpeg -i http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC  -vn -ar 22050 -acodec flac -ss 0 -t 6000 test1.flac

Eu faço uma iteração no Bash, mas tenho uma sobreposição entre o final de um arquivo e o próximo.

Existe uma maneira de obter esse feed a cada 10 minutos?

Esta é a saída do shell:

    ffmpeg -i http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC  -vn -ar 22050 -acodec flac -ss 0 -t 6 test1.flac
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 23:56:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[aac @ 0x928e850]max_analyze_duration reached
[aac @ 0x928e850]Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC':
  Duration: N/A, bitrate: 29 kb/s
    Stream #0.0: Audio: aac, 44100 Hz, 2 channels (FC), s16, 29 kb/s
File 'test1.flac' already exists. Overwrite ? [y/N] y
Output #0, flac, to 'test1.flac':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Audio: flac, 22050 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=     175kB time=6.06 bitrate= 236.6kbits/s
video:0kB audio:167kB global headers:0kB muxing overhead 4.824872%

Imprimir o console com novos argumentos, conforme sugerido por LordNeckbeard:

ffmpeg -i http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC -vn -codec:a flac -map 0 -f segment -segment_list out.list -segment_time 00:10:00.00 out%03d.flac
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 23:56:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[aac @ 0x8c8e850]max_analyze_duration reached
[aac @ 0x8c8e850]Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC':
  Duration: N/A, bitrate: 23 kb/s
    Stream #0.0: Audio: aac, 44100 Hz, 2 channels (FC), s16, 23 kb/s
Unrecognized option 'codec:a'
    
por xulen 05.02.2013 / 03:30

1 resposta

1

Experimente o muxer do segmentador .

ffmpeg -i input -vn -codec:a flac -map 0 -f segment -segment_list out.list \
-segment_time 00:10:00.00 out%03d.flac

Copiar o fluxo de áudio em vez de recodificar valeria a pena considerar, mas é impossível fornecer um exemplo sem adivinhação sem a saída do console do ffmpeg.

    
por 05.02.2013 / 20:27