LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-05-2011, 10:29 PM   #1
jake20x
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Rep: Reputation: 0
ffmpeg converting video


So I've already asked a similar question to this on another forum but thought I would try here. I have a movie file from itunes that I want to decode so that I can make it into an iso and also play in other programs besides itunes since I use ubuntu more than windows. I was told to try to use the built in to ubuntu program ffmpeg and did some research on the command line for it and still am having problems. I am no pro at reading about everything that comes up about the file but I managed to figure out the right command to convert a video to another format but ran into problems.

I used this command to find information about the file:
# ffmpeg -i /home/jacob/Videos/TheVillage.m4v

After doing so I found the different codec of the audio and video formats and used this along with the size of the video to compile a command to convert the program.

this command: # ffmpeg -i /home/jacob/Videos/TheVillage.m4v -vcodec [mjpeg/drmi] -s 640x344 -b 300k -r 10 -acodec aac -strict experimental -ar 22050 -ab 64k -f avi TheVillage.avi

note is []'s I list two different formats, but used a separate one each time such as -vcodec mjpeg once and the other format the second try. I mention this because this is where my problem occurs, and like I said I am new to this program so I might be doing something wrong that's very simple. The program shows me the info about the file and states under "Stream #0.4" that the video codec is "mjpeg, yuvj420p, 640x344 [PAR 96:96 DAR 80:43], 0 kb/s, PAR 43:80 DAR 1:1, 0k fps, 44100 tbr, 44100 tbn, 44100 tbc", and under another stream it states that the codec is drmi. Knowing this I tried first with drmi since it was listed before the other stream and thought logically it would work, but the program states that drmi is not a format recognized, so I tried with the mjpeg format and everything seems to work, except after it finishes it says the video wasn't created but I have a read only avi file that of course will not play when executed.

So basically I'm wondering if anyone knows the answer to this problem or could help explain to me another way to go about doing this since I have never used this program before.
 
Old 04-06-2011, 05:15 AM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by jake20x View Post
I used this command to find information about the file:
# ffmpeg -i /home/jacob/Videos/TheVillage.m4v
Can you post that info ? It would help.
 
Old 04-07-2011, 02:27 AM   #3
jake20x
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Original Poster
Rep: Reputation: 0
info

Here is the information that comes up

FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 5 2010 22:35:47 with gcc 4.4.5
configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavcodec configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavformat configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavdevice configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavfilter configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libswscale configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libpostproc configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9e58be0]max_analyze_duration reached

Seems stream 1 codec frame rate differs from container frame rate: 2997.00 (2997/1) -> 23.98 (2997/125)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/jacob/Videos/TheVillage.m4v':
Metadata:
major_brand : M4V
minor_version : 0
compatible_brands: M4V mp42isom
title : The Village
artist : M. Night Shyamalan
genre : Thriller
date : 2009-12-29T08:00:00Z
copyright : © Buena Vista Home Entertainment, Inc.
Duration: 01:47:50.26, start: 0.000000, bitrate: 1404 kb/s
Chapter #0.0: start 0.000000, end 208.000000
Metadata:
title : Opening Titles
Chapter #0.1: start 208.000000, end 363.000000
Metadata:
title : Giving Thanks
Chapter #0.2: start 363.000000, end 465.000000
Metadata:
title : "Those We Don't Speak Of"
Chapter #0.3: start 465.000000, end 705.000000
Metadata:
title : The Request
Chapter #0.4: start 705.000000, end 916.000000
Metadata:
title : A Marriage Proposal
Chapter #0.5: start 916.000000, end 1535.000000
Metadata:
title : The Stump
Chapter #0.6: start 1535.000000, end 1822.000000
Metadata:
title : Lucius Enters The Woods
Chapter #0.7: start 1822.000000, end 2098.000000
Metadata:
title : "Don't Let Them In!"
Chapter #0.8: start 2098.000000, end 2313.000000
Metadata:
title : The Note
Chapter #0.9: start 2313.000000, end 2544.000000
Metadata:
title : The Wedding
Chapter #0.10: start 2544.000000, end 2933.000000
Metadata:
title : "We Will Go Together"
Chapter #0.11: start 2933.000000, end 3052.000000
Metadata:
title : The Inquiry
Chapter #0.12: start 3052.000000, end 3173.000000
Metadata:
title : Noah Visits Lucius
Chapter #0.13: start 3173.000000, end 3332.000000
Metadata:
title : A Bad Color
Chapter #0.14: start 3332.000000, end 3736.000000
Metadata:
title : "I Cannot See His Color"
Chapter #0.15: start 3736.000000, end 3904.000000
Metadata:
title : "Do Your Best Not To Scream"
Chapter #0.16: start 3904.000000, end 4454.000000
Metadata:
title : Leaving The Village
Chapter #0.17: start 4454.000000, end 4688.000000
Metadata:
title : "What Have You Done?"
Chapter #0.18: start 4688.000000, end 4874.000000
Metadata:
title : The Woods
Chapter #0.19: start 4874.000000, end 5123.000000
Metadata:
title : Something In The Woods
Chapter #0.20: start 5123.000000, end 5422.000000
Metadata:
title : The Sacrifice
Chapter #0.21: start 5422.000000, end 5551.000000
Metadata:
title : The Box
Chapter #0.22: start 5551.000000, end 6098.000000
Metadata:
title : An Act Of Kindness
Chapter #0.23: start 6098.000000, end 6470.263991
Metadata:
title : End Credits
Stream #0.0(eng): Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
Stream #0.1(eng): Video: drmi / 0x696D7264, 640x344, 1270 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 2997 tbc
Stream #0.2(eng): Data: tmcd / 0x64636D74
Stream #0.3(eng): Subtitle: text / 0x74786574
Stream #0.4(eng): Video: mjpeg, yuvj420p, 640x344 [PAR 96:96 DAR 80:43], 0 kb/s, PAR 43:80 DAR 1:1, 0k fps, 44100 tbr, 44100 tbn, 44100 tbc
At least one output file must be specified
 
Old 04-07-2011, 05:08 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I see, so there are two different video streams, one mjpeg and one drmi (DRMed). There is no way to decode this drmi video legally, because it is DRMed.

It may be possible to decode the mjpeg one. Use the '-map 0:0 -map 0:4' option to select those streams. Your '-vcodec' can be anything you want, like 'libxvid' or 'libx264' or 'mjpeg'.
 
Old 04-07-2011, 09:52 PM   #5
jake20x
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Could you be a little more specific of where to use those options in the command, I'm new to this program. Also you said there's no legal way so is there another way of doing this or none at all?

Thanks a lot.
 
Old 04-07-2011, 10:34 PM   #6
trillobyte
Member
 
Registered: Apr 2007
Location: USA
Distribution: Slackware, FreeBSD, Trisquel
Posts: 105
Blog Entries: 1

Rep: Reputation: 33
This page may help you and answer some of your questions.

http://howto-pages.org/ffmpeg/

Hope this helps.
 
Old 04-08-2011, 04:28 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Try:

Code:
ffmpeg -i input.m4v -vcodec copy -acodec copy output.mp4 -map 0.0 -map 0.4
As for DRM, to be honest, there is no tool to do this on Linux, and even if there were, I couldn't post it here. Just stay away from DRMed stuff, I do.

Last edited by H_TeXMeX_H; 04-10-2011 at 02:59 AM. Reason: fixed -map
 
Old 04-09-2011, 05:55 PM   #8
trillobyte
Member
 
Registered: Apr 2007
Location: USA
Distribution: Slackware, FreeBSD, Trisquel
Posts: 105
Blog Entries: 1

Rep: Reputation: 33
Shouldn't he want to -map 0:0 and -map 0:4 ? -map 0:1 is the DRM stream.

Code:
ffmpeg -i input.m4v -vcodec copy -acodec copy output.mp4 -map 0:0 -map 0:4
Best regards
 
1 members found this post helpful.
Old 04-10-2011, 02:58 AM   #9
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by trillobyte View Post
Shouldn't he want to -map 0:0 and -map 0:4 ? -map 0:1 is the DRM stream.

Code:
ffmpeg -i input.m4v -vcodec copy -acodec copy output.mp4 -map 0:0 -map 0:4
Best regards
Oh, yeah, you're right.
 
  


Reply

Tags
decode, decoder, video


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] FFMPEG video converting, VERY pixelated Helstedxd Linux - Newbie 4 01-20-2011 01:49 PM
[SOLVED] Converting VOB to XVID (using ffmpeg)? Steve W Linux - Software 5 12-10-2010 09:54 AM
[SOLVED] converting to 3gp using ffmpeg sumeet inani Linux - Software 4 10-01-2010 09:09 AM
LXer: Converting video & audio files using ffmpeg in GNU/Linux LXer Syndicated Linux News 0 05-30-2009 04:31 AM
converting vob to xvid using ffmpeg schneidz Linux - Software 3 12-07-2006 03:03 PM


All times are GMT -5. The time now is 02:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration