hi everyone,
i'm not an ffmpeg expert and i'm not english so i apolgy for my poor language
i'm trying to convert an mp4 file into mpeg2.
i used this:
ffmpeg '-i' '/Users/nene/Desktop/test_hd.mp4' '-y' '-deinterlace' '-target' 'pal-dvd' '-aspect' '16:9' '-pass' '1' '-passlogfile' '/tmp/SeZU0U' '-async' '1' '-vsync' '0' '-acodec' 'mp2' '-ab' '224' '-r' '25' '/Users/nene/Desktop/test.mpg'
everything seems to be ok but my qucktime doesn't detect the audio.
i want to convert it into this audio codec which works:
- Format: Mpeg-1 layer 2 (mp2)
- Size: 1016.07 MB (4%)
- FourCC: 0x50
- Number(s) and language(s): 192 (0xC0): Undefined
- Profile: Layer 2
- Bitrate: 224 Kbps
- Bitrate mode: Constant
- Rate: 48.0 KHz
- Channel(s): 2 (stereo)
where is the error?
please help me
+ Reply to Thread
Results 1 to 16 of 16
-
-
where is the error?
it might help if you specify the audio sampling rate (i.e. -ar 48000), since Quicktime is a really picky piece of software,...
if you want a constant audio bit-rate you also need to specify '-minrate' and '-maxrate' otherwise the output will not be cbr.
Cu Selur
Ps.: ffmpegs deinterlacer really sucks,.. better use '-vf yadif' it's still not as good as some other deinterlacers that are out there but a lot better than ffmpegs -deinterlace) -
Thanks Selur
this the input mediainfo:
ffmpeg version git-2011-09-29-ecf31a6, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 29 2011 13:38:37 with clang 2.1 (tags/Apple/clang-163.7.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --cc=/usr/bin/clang --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid
libavutil 51. 18. 0 / 51. 18. 0
libavcodec 53. 18. 0 / 53. 18. 0
libavformat 53. 13. 0 / 53. 13. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/paolo/Desktop/Zoncolan_final.mp4':
Metadata:
major_brand : mp42
minor_version : 19529845
compatible_brands: mp42isom
creation_time : 2012-03-21 14:10:11
Duration: 00:03:55.32, start: 0.000000, bitrate: 11019 kb/s
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 256 kb/s
Metadata:
creation_time : 2012-03-21 14:10:11
Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 10758 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
creation_time : 2012-03-21 14:10:11 -
do you mean this?
input:
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 309 MiB
Duration : 3mn 55s
Overall bit rate mode : Variable
Overall bit rate : 11.0 Mbps
Encoded date : UTC 2012-03-21 14:10:11
Tagged date : UTC 2012-03-21 14:10:11
Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Muxing mode : Container profile=Baseline@4.0
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3mn 55s
Bit rate mode : Variable
Bit rate : 10.8 Mbps
Maximum bit rate : 22.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.208
Stream size : 302 MiB (98%)
Language : English
Encoded date : UTC 2012-03-21 14:10:11
Tagged date : UTC 2012-03-21 14:10:11
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 3mn 55s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 7.18 MiB (2%)
Language : English
Encoded date : UTC 2012-03-21 14:10:11
Tagged date : UTC 2012-03-21 14:10:11
output:
Complete name : /Users/video/Public/test.mpg
Format : MPEG-PS
File size : 46.8 MiB
Duration : 1mn 0s
Overall bit rate mode : Variable
Overall bit rate : 6 534 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : No
Format settings, Matrix : Default
Format settings, GOP : M=1, N=15
Duration : 1mn 0s
Bit rate mode : Variable
Bit rate : 5 956 Kbps
Maximum bit rate : 9 000 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.575
Stream size : 42.6 MiB (91%)
Audio
ID : 189 (0xBD)-128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Muxing mode : DVD-Video
Duration : 59s 840ms
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 3.20 MiB (7%) -
yes that would be a mediainfo analysis output form mediainfo for the input,... but you still did not post the same info for the output of your ffmpeg call,... (btw. your ffmpeg version is quite old, you might want to update it)
(+ you also do not want to deinterlace since you input is not interlaced - deinterlacing progressive content will result in arefacts) -
The video and audio channels are in an unusual order - usually the video stream has a lower ID value than the audio. This can probably be fixed by using ffmpeg's -map option to tell it which stream is which.
I'll need to do a few tests before I suggest a set of command line parameters. -
I don't know why you're using quotes around every parameter. It shouldn't be necessary with MacOS.
Try this:
Code:ffmpeg -i '/Users/nene/Desktop/test_hd.mp4' -map 0:1 -map 0:0 -y -target pal-dvd -aspect 16:9 -pass 1 -passlogfile '/tmp/SeZU0U' -async 1 -vsync 0 -acodec mp2 -ab 224 -r 25 /Users/nene/Desktop/test.mpg
The -map syntax is quite confusing. If you want to know more about how it works, just ask.
--
Selur is right about not deinterlacing. Unfortunately, ffmpeg doesn't automatically preserve interlacing when converting from high definition to standard definition.
I will try and find out how to do this properly.
EDIT: I've just noticed the HD source video (test_hd.mp4) is progressive according to mediainfo. So in this instance you shouldn't need to deinterlace at all.Last edited by intracube; 23rd Mar 2012 at 11:43.
-
thanks everyone.
back to work again!
intracube, i put the code
ffmpeg -i '/Users/nene/Desktop/test_hd.mp4' -map 0:1 -map 0:0 -y -target pal-dvd -aspect 16:9 -pass 1 -passlogfile '/tmp/SeZU0U' -async 1 -vsync 0 -acodec mp2 -ab 224 -r 25 /Users/nene/Desktop/test.mpg
but it generates an empty file
also it shows me a warning:
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, dvd, to '/Users/video/desktop/test.mpeg':
Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, pass 1, 6000 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 0 kb/s
Codec type mismatch for mapping #0.1 -> #0.0
i can't uderstand the error, i try to change the -ab parameter but didn't workLast edited by ilpilo; 28th Mar 2012 at 10:52.
-
i can't uderstand the error, i try to change the -ab parameter but didn't work
-
thanks Selur,
but still don't work.
i read somewhere this error occurs because the inversion of the audio and video channels:
Codec type mismatch for mapping #0.1 -> #0.0
if it's so, how can i invert the channels? -
I wouldn't change the mapping at all, since afaik there's no standard that specifies, that the first stream needs to be the video stream,.. personally I would use something like:
Code:ffmpeg -i "/Users/nene/Desktop/test_hd.mp4" -y -target pal-dvd -aspect 16:9 -pass 1 -sameq -acodec mp2 -ab 224000 -r 25 "/Users/nene/Desktop/test.mpg"
Similar Threads
-
FFmpeg error trying to convert audio in mp4
By Thunderhead2772 in forum Video ConversionReplies: 4Last Post: 30th Jan 2015, 09:24 -
[FFmpeg] Unsynched audio in MP4
By Klagar in forum Video ConversionReplies: 4Last Post: 4th Aug 2011, 13:52 -
ffmpeg help... convert mp4 to jpeg array, and back to mp4 - problem!
By SaskVideoMaker in forum Video ConversionReplies: 2Last Post: 4th Feb 2011, 04:53 -
Audio out of sync problem with FFMPEG encoding MP4 (h.264,AAC)
By jenak1980 in forum Video ConversionReplies: 7Last Post: 5th May 2010, 01:03 -
FFMPEG AVI (XVID) to IPOD Mp4, AUDIO OUTPUT is 2x Normal Speed, HELP!
By jiulonghks in forum ffmpegX general discussionReplies: 1Last Post: 20th Sep 2008, 23:35