VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Hi please helpme,

    I would like to transcode my cat into a .mp4 file with ffmpeg

    In attachement my source:

    cat.avi and cat.wav


    Destination file have to match this parameters (is the mediainfo of anhother .mp4 that have the correct parameters):

    General
    Complete name : C:\Documents and Settings\Administrator\Desktop\pallanuoto.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom
    File size : 115 MiB
    Duration : 1mn 55s
    Overall bit rate : 8 346 Kbps
    Encoded date : UTC 2011-09-04 07:54:50
    Tagged date : UTC 2011-09-04 07:54:50

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L3.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 1 frame
    Format settings, GOP : M=1, N=33
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 1mn 55s
    Source duration : 1mn 55s
    Bit rate mode : Variable
    Bit rate : 7 814 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.754
    Stream size : 108 MiB (94%)
    Source stream size : 112 MiB (98%)
    Language : English
    Encoded date : UTC 2011-09-04 07:54:50
    Tagged date : UTC 2011-09-04 07:54:50
    mdhd_Duration : 115522

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 1mn 55s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 2.63 MiB (2%)
    Language : English
    Encoded date : UTC 2011-09-04 07:54:50
    Tagged date : UTC 2011-09-04 07:54:50
    mdhd_Duration : 115536

    But possibly I can encode also in a better quality, best would be in 422. I need of a fine quality encoding, but not too big files because I have to transfer it via web.

    What is the correct commandline to do this?

    Thanks
    Image Attached Files
    Last edited by marcorocchini; 10th Jun 2014 at 18:04.
    Quote Quote  
  2. please help my cat !
    Quote Quote  
  3. Code:
    ffmpeg -i cat.avi -i cat.wav -c:v libx264 -pix_fmt yuv420p -profile:v main -level:v 3 -g 33 -bf 1 -crf 20 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 192k out.mp4

    1) main profile doesn't support 422. So you have to convert to 420, unless you want to change the profile

    2) x264 (the only free AVC encoder), doesn't support PAFF , only MBAFF (the short explanation is you can think of it as a more advanced type of interlaced encoding) . So scan type will say "MBAFF", which is really a type of interlaced encoding

    3) adjust the CRF value to your tastes (lower values = better quality, larger filesizes)
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by marcorocchini
    cat--->mp4 help please
    Here it goes, here it goes:
    Image Attached Thumbnails Click image for larger version

Name:	lolcat-snacksized.png
Views:	614
Size:	226.9 KB
ID:	25658  

    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    Code:
    ffmpeg -i cat.avi -i cat.wav -c:v libx264 -pix_fmt yuv420p -profile:v main -level:v 3 -g 33 -bf 1 -crf 20 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 192k out.mp4

    1) main profile doesn't support 422. So you have to convert to 420, unless you want to change the profile

    2) x264 (the only free AVC encoder), doesn't support PAFF , only MBAFF (the short explanation is you can think of it as a more advanced type of interlaced encoding) . So scan type will say "MBAFF", which is really a type of interlaced encoding

    3) adjust the CRF value to your tastes (lower values = better quality, larger filesizes)
    Click image for larger version

Name:	cucat.gif
Views:	926
Size:	569.7 KB
ID:	25673

    MMMMMM thanks poison!

    only 2 things: and if I would

    1) encode (and keep) 4:2:2?
    2) considering audio of the cat.wav a L and R separate chennels, can I keep alwais the same L+R .wav but I want panpot L in R and R in L so the destination .wav have alwais L+R but both have the same "monify" audio? (maybe the cat.wav is empty of audio, but I need to do this)

    thanks!!!
    Quote Quote  
  6. Originally Posted by El Heggunte View Post
    Originally Posted by marcorocchini
    cat--->mp4 help please
    Here it goes, here it goes:
    grrrrrrrrrrrrrrrrrrrrrrrrrrrrr
    Name:  Angry-Cat.jpg
Views: 749
Size:  8.8 KB
    Quote Quote  
  7. Originally Posted by marcorocchini View Post

    1) encode (and keep) 4:2:2?
    Change the profile, -pix_fmt

    Code:
    ffmpeg -i cat.avi -i cat.wav -c:v libx264 -pix_fmt yuv422p -profile:v high422 -level:v 3 -g 33 -bf 1 -crf 20 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 192k out422.mp4

    2) considering audio of the cat.wav a L and R separate chennels, can I keep alwais the same L+R .wav but I want panpot L in R and R in L so the destination .wav have alwais L+R but both have the same "monify" audio? (maybe the cat.wav is empty of audio, but I need to do this)
    I'm not sure what you're asking, and I don't know how to do this with ffmpeg. Maybe pipe to sox ?
    Quote Quote  
  8. mmmm it seems work
    Quote Quote  
  9. Originally Posted by poisondeathray View Post

    I'm not sure what you're asking, and I don't know how to do this with ffmpeg. Maybe pipe to sox ?
    I mean this: my source is the attached source (and is in replacement of cat.wav for example)
    I would like to encode in .mp4 so audio become as the attached dest.wav

    so the audio channels are "merged"

    ^^ thanks
    Image Attached Files
    Last edited by marcorocchini; 16th Jun 2014 at 10:12.
    Quote Quote  
  10. Originally Posted by marcorocchini View Post
    Originally Posted by poisondeathray View Post

    I'm not sure what you're asking, and I don't know how to do this with ffmpeg. Maybe pipe to sox ?
    I mean this: my source is the attached source (and is in replacement of cat.wav for example)
    I would like to encode in .mp4 so audio become as the attached dest.wav

    so the audio channels are "merged"

    ^^ thanks


    I still don't understand

    Did you want to mix L + R channels , but keep stereo channels ?

    Maybe -vf pan?
    https://www.ffmpeg.org/ffmpeg-filters.html#pan
    Quote Quote  
  11. maybe yes, sorry, only now I have uploaded source.wav and dest.wav as example to understand :=)

    they are uploaded 2 post over
    Quote Quote  
  12. uhhhh sounds baaad

    My ears hurt
    Name:  2711636_370.jpg
Views: 1022
Size:  13.6 KB

    It sounds like you have discrete L + R in the original stereo track. You want a 50/50 mix in both L + R in the output stereo track ?

    ffmpeg -i source.wav -af "pan=stereo:c0<c0+c1:c1<c0+c1" output.wav
    Last edited by poisondeathray; 16th Jun 2014 at 10:56.
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    uhhhh sounds baaad
    Click image for larger version

Name:	ccat5.jpg
Views:	15045
Size:	36.6 KB
ID:	25775

    I know, it sound bad but I have "extremized" thing to make me understand better. I am a cat. i'm not very practical with computers ^^
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!