LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help transcoding video with avconv (https://www.linuxquestions.org/questions/linux-software-2/help-transcoding-video-with-avconv-4175452069/)

mina86 02-28-2013 08:08 AM

Help transcoding video with avconv
 
I'm trying to convert Blender Foundation videos into a format accepted by an oppo BDP-83 projector but I'm failing miserably and don't know how to proceed.

For instance, for Elephants Dream, I'm trying the following sequence of commands:

Code:

avconv -y -i /home/mpn/FOSS-TGIF/blender/ED_HD.avi -pass 1 -passlogfile ED_HD \
    -c:v libxvid -maxrate 20000k -minrate 16000k -b:v 18000k -bufsize 32768 \
    -mbd 2 -bf 2 -aspect 16:9 -s 1920x1080 -an -r 29.97 -f rawvideo /dev/null
avconv -y -i /home/mpn/FOSS-TGIF/blender/ED_HD.avi -pass 2 -passlogfile ED_HD \
    -c:v libxvid -maxrate 12000k -minrate 12000k -bufsize 32768 -mbd 2 -bf 2 \
    -aspect 16:9 -s 1920x1080 -c:a libmp3lame -ar 48000 -ab 128k -ac 2 \
    -r 29.97 -f avi ED_HD.avi

but it generates a terrible quality video.

And when trying analogous commands for Sintel no usable output is created.

As a matter of fact, it would be ideal if for some of the content I could just pass it as-is. For instance, Sintel uses h264 for video and AAC for audio which both seem to be supported by BD player I'm interested it, yet the container is not, so all I really need is to move streams from one container to another.

Any help would be greatly appreciated!

H_TeXMeX_H 03-01-2013 03:34 AM

Try:

Code:

ffmpeg -i input.mkv -vcodec libxvid -q:v 5 -s 640x272 -aspect 640:272 -r 23.976 -g 240 -bf 2 -acodec libmp3lame -ab 160k -ar 48000 -async 48000 -ac 2 -pass 1 -an -f rawvideo -y /dev/null
ffmpeg -i input.mkv -vcodec libxvid -q:v 5 -s 640x272 -aspect 640:272 -r 23.976 -g 240 -bf 2 -acodec libmp3lame -ab 160k -ar 48000 -async 48000 -ac 2 -pass 2 output.avi

I'm pretty sure replacing 'ffmpeg' with 'avconv' will work just fine.

mina86 03-01-2013 12:28 PM

Thanks! “-q:v 5” is what I needed.

I've also found “-c:a copy” which avoids transcoding (even though MPlayer was unable to seek correctly if audio stream has been copied, ie. seeking video worked fine but audio started from start each time).

H_TeXMeX_H 03-01-2013 01:17 PM

Which video are you trying to convert anyway ? The projector says it supports h264 and aac, and various different containers.

mina86 03-01-2013 03:24 PM

That is correct, but when the video is encoded using supported code it's in unsupported container and the other way around, so I could not find a working file.

H_TeXMeX_H 03-02-2013 02:29 AM

To convert containers you just use '-vcodec copy' and '-acodec copy' and put the output format as needed.


All times are GMT -5. The time now is 04:44 PM.