[FFmpeg-user] optimal slide encoding for low bandwidth at youtube

James Lu luj125 at gmail.com
Tue Aug 16 14:52:25 CEST 2011


On Mon, Aug 15, 2011 at 6:40 PM, Robert Rowntree <rowntreerob at gmail.com>wrote:

> i want to combine 1 slide ( vid ) and a 3gpp ( audio ) in output that is
> suitable for youtube upload. i have a CLI expression working for ffmpeg ,
> but its video bandwidth is too high considering that i am muxing just a
> single jpeg.
>
> i have used the following , but think that i can do better on the bandwidth
> of the VIDEO track...
>
> *./ffmpeg -y -loop_input -f image2 -shortest -r 1/2 -i 1459.JPG -i
> 1459.3gpp
> -s 640x480 -b 100k -bt 240k -vcodec msmpeg4 -acodec libmp3lame -ab 64k -ar
> 22050  out.wmv*
>
> Once the output from the above is uploaded to youtube, youtube exposes 2
> RTSP URI's  - a high and low bandwidth version of the video.
>
> the low bandwidth youtube version still has 39K of video bandwidth and that
> is what i want to reduce.... its just a single slide in the video
>
> v=0
> o=GoogleStreamer 98636128 107718649 IN IP4 74.125.213.247
> s=Video
> c=IN IP4 0.0.0.0
> b=AS:51
> t=0 0
> a=control:*
> a=range:npt=0-63.800000
> m=video 0 RTP/AVP 98
> *b=AS:39                           <--  VIDEO bandwidth*
> a=rtpmap:98 H263-2000/90000
> a=control:trackID=0
> a=cliprect:0,0,144,176
> a=framesize:98 176-144
> a=fmtp:98 profile=0;level=10
> m=audio 0 RTP/AVP 99
> b=AS:12
> a=rtpmap:99 AMR/8000/1
> a=control:trackID=1
> a=fmtp:99 octet-align
> * Connection #0 to host v8.cache8.c.youtube.com left intact
>
> for comparison purpose, the following URI on youtube uses just 8K for its
> video bandwidth and i want to try to get down near that.
>
> http://www.youtube.com/watch?v=FX9ccqQuzO4      is a typical sound track
> hosted on youtube having the SDP below from the rtsp feed:
>
> v=0
> o=GoogleStreamer 515160982 1824503727 IN IP4 74.125.213.247
> s=Video
> c=IN IP4 0.0.0.0
> b=AS:20
> t=0 0
> a=control:*
> a=range:npt=0-190.200000
> m=video 0 RTP/AVP 98
> *b=AS:8                                       <--- low video bandwidth *
> a=rtpmap:98 H263-2000/90000
> a=control:trackID=0
> a=cliprect:0,0,144,176
> a=framesize:98 176-144
> a=fmtp:98 profile=0;level=10
> m=audio 0 RTP/AVP 99
> b=AS:12
> a=rtpmap:99 AMR/8000/1
> a=control:trackID=1
> a=fmtp:99 octet-align
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>

Hey Robert,

A few suggestions:
1) what may be killing you are the intra frames. What size is your jpg? Also
look into making your GOP size as large as possible maybe? this is done by
using option -g 'gop_size'
2) is there a specific reason you are using wmv? In my usage I've found
libx264 to compress the most efficiently, and i'm fairly certain that
youtube accepts .mp4 upload. (-vcodec libx264 -acodec aac -strict
experimental)
3) not sure how low frame rate can go, but try dropping it more? maybe
1/(song_length_in_seconds) would work?
4) your -b option is at 100k.... try dropping to your real target? Same with
-bt

None of these are tested, just ideas. Hope one of them helps.

~James


More information about the ffmpeg-user mailing list