Я пытаюсь сохранить аудио (или видео) канал на локальный с помощью FFmpeg. Вот команда и аргументы, которые я использую.
ffmpeg -i http://7359.live.streamtheworld.com:80/CONTINENTALAAC_SC -vn -ar 22050 -acodec flac -ss 0 -t 6000 test1.flac
затем я повторяю это в Bash, но у меня есть перекрытие между концом одного файла и следующим.
есть ли способ, чтобы получить, что корм разорван каждые 10 минут?
это выход t оболочки:
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%
консоль распечатать с новыми аргументами, как предложил 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'