LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2013, 07:08 AM   #1
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229
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!

Last edited by mina86; 03-01-2013 at 11:29 AM.
 
Old 03-01-2013, 02:34 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
1 members found this post helpful.
Old 03-01-2013, 11:28 AM   #3
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Original Poster
Rep: Reputation: 229Reputation: 229Reputation: 229
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).
 
Old 03-01-2013, 12:17 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Which video are you trying to convert anyway ? The projector says it supports h264 and aac, and various different containers.
 
Old 03-01-2013, 02:24 PM   #5
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Original Poster
Rep: Reputation: 229Reputation: 229Reputation: 229
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.
 
Old 03-02-2013, 01:29 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question: How to brighten/gamma_correct video during transcoding, not playback haertig Linux - Software 2 01-13-2013 02:30 PM
Bash script for transcoding from several video formats into Theora ogv True`Colors Programming 1 01-17-2009 07:21 AM
K3B DVD no video transcoding trailer8713 Linux - Newbie 1 12-01-2007 10:27 AM
transcoding video to quicktime teepark Linux - Desktop 2 09-08-2006 05:32 PM
Transcoding mpeg2 video to dv ssfrstlstnm Linux - Software 4 07-12-2005 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration