[FFmpeg-user] How to get only audio from "rawvideo" stream

Deron deron at pagestream.org
Fri Feb 27 17:50:50 CET 2015


On 2/25/15 3:58 PM, Deron wrote:
> On 2/25/15 11:00 AM, Deron wrote:
>> I'm trying to generate a number of HLS streams from a single source 
>> including using the new webvtt for cc.
>>
>> The following command:
>>
>> ffmpeg -i test.ts -vn -f hls -hls_segment_filename "a.%d.ts" -y "a.m3u8"
>>
>> Works as expected, but
>>
>> ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -vn -sn -f hls 
>> -hls_segment_filename "a.%d.ts" -y "a.m3u8"
>>
>> Fails with:
>> Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
>>   Duration: N/A, start: 9602.931211, bitrate: N/A
>>     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
>> 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
>>     Stream #0:1: Subtitle: eia_608
>> Output #0, hls, to 'a.m3u8':
>> Output file #0 does not contain any stream
>>
>> I get that I surpressed the video stream, and the audio is merged 
>> with it. How do I get it out without changing the input? I ultimately 
>> need to generate multiple streams including cc from a single input, 
>> so I can't remove cc from the input.
>>
>> Thanks,
>>
>> Deron 

Well, I decided that I didn't need the audio only stream if it was going 
to be this much trouble. As it turns out, someone could have saved me 
the aggravation and told me that the audio was not available at all and 
not "merged with the video" as I presumed. I thought it was a bit 
strange, but what do I know? I can't imagine why the audio would be dropped.

As it turns out, "movie=test.ts[out0+subcc]" generates a rawvideo 
stream. No audio.

So what happens to the audio, and how do I get it??? What good is 
subtitles if I loose the audio?

Thanks,

Deron

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" test.avi
ffmpeg version N-70148-g418be7c Copyright (c) 2000-2015 the FFmpeg 
developers
   built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
   configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg --enable-librtmp --enable-libx265 
--disable-stripping
   libavutil      54. 19.100 / 54. 19.100
   libavcodec     56. 26.100 / 56. 26.100
   libavformat    56. 23.104 / 56. 23.104
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 11.101 /  5. 11.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
   Duration: N/A, start: 2.117867, bitrate: N/A
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 
[SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 90k tbc
     Stream #0:1: Subtitle: eia_608
Output #0, avi, to 'test.avi':
   Metadata:
     ISFT            : Lavf56.23.104
     Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720 
[SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 59.94 fps, 59.94 tbn, 59.94 tbc
     Metadata:
       encoder         : Lavc56.26.100 mpeg4
Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=13086 fps=327 q=31.0 Lsize=   46145kB time=00:03:38.31 
bitrate=1731.5kbits/s
video:45826kB audio:0kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.695515%




More information about the ffmpeg-user mailing list