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

Deron deron at pagestream.org
Wed Feb 25 23:58:58 CET 2015


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 

After playing with this for several more hours, I'm no closer than 
before. Simplified, what I need is to turn:

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" ...

     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

Into something like this:

     Stream #0:0[0x31]: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 
[SAR 1:1 DAR 16:9], max. 24000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 
59.94 tbc
     Stream #0:1[0x34]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
     Stream #0:2: Subtitle: eia_608

Is there some filter or method to break that rawvideo stream into 
independent video and audio streams?? The ultimate goal is to have a 
single command that does something like:

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" <hi res video and cc 
parameters> "video.hi.m3u8" <low res video parameters> "video.low.m3u8" 
<audio only parameters> "audio.m3u8"

Thanks,

Deron



More information about the ffmpeg-user mailing list