2

I am using ffmpeg to convert my video files to flv.

My issue is that I want the converted flv files to have videoCodecId and audioCodecId = 2, because, I am injecting keyframes in the converted file and using it for progressive streaming.

But when I try the progressive streaming using file with videoCodecId = 7 and auddioCodecId = 10, I am unable to make the file run properly. (maybe I am doing something wrong here as well)

I tried to convert a same file two ways:

  1. First with videoCodecId = 7 and audioCodecId = 10 I used the following commandline to do so:

    /usr/local/bin/ffmpeg -i %s -map_meta_data 0:0 -acodec libfaac -ab 96k -ar 44100 -vcodec libx264 -vpre hq -crf 20 -threads 0 -f flv %s

  2. Other way keeps the videoCodecId = 2 and audioCodecId = 2 (which is desired), but it effects highly on the video quality.

    /usr/local/bin/ffmpeg -i %s -map_meta_data 0:0 -ab 96k -ar 44100 -crf 20 -f flv %s

So, both ways can help me solve my issue, first if I can improve the quality of my video after converting using the second method, or, I could make the progressive streaming work for files with videoCodecId = 7.

But I read in a few articles that even youtube uses video with videoCodecId = 2 and audioCodecId = 2. So probably, there is a reason they do it too. But if I download a file from youtube, and see its codec information using VLCplayer, it says the video codec - h264 and audio as mp4a which is 7 and 10 respectively (I guess)

I am very confused in this right now. And have been trying to figure this out since a few days now.

Any help, or suggestion is appreciated.

2
  • Are you asking witch of the two methods is best?
    – Nifle
    May 27, 2011 at 8:17
  • yes, that is what i am asking. May 27, 2011 at 16:11

0

You must log in to answer this question.

Browse other questions tagged .