VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 32
Thread
  1. Hi every body and happy new year to all..

    Please to go easy with me as I am new to the forum and very very new to ffmpeg converter..

    I been struggling for the last days with this issue.. I have beautiful clip that I edited for TV station, now here is the heck, they requested me to deliver it as MP4 H264 (5 audio channels, yes right 5) interlaced 25 fps. everything is done perfect but when I wanted to export and render, that`s where issues started..

    I am using Sony Vegas Pro 13, so (surprisingly) I needed to install x264 separately to render in H264 (and it gives you .AVI !!). I tried it and sound is not sync. I tried to play with many setting unsuccessfully. I then exported it as uncompressed AVI file with 5 audio channels (great and sync.) . I also tried with premiere but it was like nuclear science to assign the 5 audio channels to separate channels in the premiere and get them working. so I decided the best way to do is to convert the clean version to the requested specifications. I tried with format factory didn`t work as the output is progressive and audio channels can`t be retained. I tried with handbrake, same problem (or at least couldn`t do it). then I read that ffmpeg would be the beast to do the job! so here I am. (in between, all previous steps, I would spend tremendous time of searching the net and trying (sometimes a day per step), so you can imagine what I been through)..

    I am very new to the ffmpeg, and I never used it before. I don`t mean anything, but I am not interested at the point (and exhausted from all searches) to learn its specifications. I would just highly appreciate if someone can just tell me what to type to get my file (named: ABC.AVI, located at the profile folder in the c:\users) to be converted to the above specifications, which are again: MP4 H264 interlaced 25 fps 5 audio channels (same 5 audio channels in the AVI file)..

    The AVI info are as follow:
    General
    name : ABC.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    Format profile : OpenDML
    File size : 29.2 GiB
    Duration : 3 min 21 s
    Overall bit rate : 1 248 Mb/s
    TCOD : 0
    TCDO : 2012800000

    Video
    ID : 0
    Format : RGB
    Codec ID : 0x00000000
    Codec ID/Info : Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
    Duration : 3 min 21 s
    Bit rate : 1 244 Mb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 FPS
    Bit depth : 8 bits
    Bits/(Pixel*Frame) : 24.000
    Stream size : 29.2 GiB (100%)

    Audio
    ID : 1
    Format : PCM
    Format settings, Endianness : Little
    Format settings, Sign : Signed
    Codec ID : 1
    Duration : 2 min 47 s
    Source duration : 3 min 21 s
    Bit rate mode : Constant
    Bit rate : 3 840 kb/s
    Channel(s) : 6 channels
    Sampling rate : 48.0 kHz
    Bit depth : 16 bits
    Stream size : 92.1 MiB (0%)
    Alignment : Aligned on interleaves
    Interleave, duration : 250 ms (6.24 video frames)
    Interleave, preload duration : 250 ms

    any help is highly appreciated... if there is any other suggestion for another efficient program to do the requested conversion please let me know with small instructions please..

    Happy New Year
    Nedo
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Why can't you use the MainConcept or Sony AVC encoders that come with Vegas 13? Either one will give you an MP4 file. AVC = h.264
    Quote Quote  
  3. now here is the deal ..

    I tried the MAinconcept/AVC... (Blu Ray 1920X1080 50i) 25 Mbps video stream, which is the only one highlighted when I asked to match source file.. not only didn`t allow me to choose "enable multichannel mapping" but there are no audio at all!!

    if you have something you are aware of at Vegas 13 that uses MP4 H264 and allows channel mapping please advise me of which ..

    thanks..
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    That sounds like a Sony preset and there's no audio because the workflow is to render video and audio separately, then mux in DVD Architect. But anyway, if you want to use FFmpeg, which 5 channels from your audio? OP says you have 6 ...
    Quote Quote  
  5. I noticed it ...

    It has 5 channels so I think the first 5 (or in this case we transfer the 6 maybe!)?
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Is it 5.1 surround sound? That would be five main channels plus LFE. The command to drop a channel is way more complicated so I want to make sure what you need to do.
    Quote Quote  
  7. The bitrate suggests 5 ch audio , so mediainfo is misreporting

    What type of audio ? For MP4 container, you'd normally be using AAC, or perhaps AC3 but AC3 in MP4 can have compatibility issues in some programs . There are no free/open source muxers that can mux PCM Wav into MP4, so you're really left with AAC unless they requested AC3 specifically

    Part of the problem is not all AAC encoders support the 5.0 channel configuration

    QAAC does for certain. But it's CLI like ffmpeg. I'm trying to think of the "easiest" way to do this:

    If you already have the proper 1080i50 mainconcept or sony avc video encode from vegas, and the uncompressed AVI in your mediainfo report, you can just encode the audio separately from the AVI source, then mux the video with the new audio

    GUI's that can use QAAC would be megui, lamexp . Megui also has muxing tools, so it might be easier to use that. But megui isn't really a straightforward GUI either, but all you're using it for is the audio part and perhaps muxing. I think that would be the "easiest"
    Quote Quote  
  8. Hi guys and sorry for late reply felt a sleep..

    JVRains, what I included in Vegas was 5 audio channels (not 5.1 surround audio).. you think I might be using that and it will work? the 5.1 surround audio-generally speaking..

    Poisondeathray the audio I used to export this AVI file is PCM uncompressed, they didn`t specify any specific audio coding but only requested for it to be 5 separate channels (each one with different material, I guess for them to have better control over volumes and if to remove any audio), so I didn`t want to add hustle by asking about that, and I assume any audio format that can deliver it should be fine until advised otherwise..

    I have the audio separately from Vegas, it is in WAV format (5 channels) with same specifications of the file below (48 K, 3840 Kbps etc..) so in this case you advise me with using the LameXP? will it preserve it? I mean I will give it a try but let me know if its the case, guys more picture now, so let me know what you advise..

    Thanks..
    Quote Quote  
  9. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Render the interlaced AVC file from Vegas. Then combine with your WAV file:

    Code:
    ffmpeg -i ABC.avc -i ABC.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 480k ABC.mp4
    Quote Quote  
  10. Thanks JVrains,

    I did guys what you suggested, exported the video in .avc format (didn`t even open, only in editing programs I could view it). then brought the WAV file with 5 channels (checked it on the editing program, and the 5 channels are there and separate).. now I did the FFmpeg with the code from JV, I was happy at beginning that finally I got MP4 interlaced (that was a real heck). but there are 2 problems, one major and one minor.

    1) the major is the audio, there are 2 channels missing or not playing properly. I opened it in the Vegas pro and it showed 3 audio channels only (other 2 as if they don`t exist).

    2) minor, is that it shows me 50 fps, not 25 fps. that`s on mediainfo, and right clicking->propertied, but when I checked on Vegas pro it gave me 25 FPS, so I would guess this is the more accurate no?

    here are the meida info for the outcome MP4:

    General
    name : ABC.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 265 MiB
    Duration : 3 min 21 s
    Overall bit rate mode : Variable
    Overall bit rate : 11.1 Mb/s
    Writing application : Lavf57.56.100

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Format settings, GOP : M=3, N=15
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 3 min 21 s
    Bit rate mode : Variable
    Bit rate : 10.6 Mb/s
    Maximum bit rate : 20.0 Mb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 50.000 FPS
    Original frame rate : 25.000 FPS
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan type, store method : Separated fields
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.103
    Stream size : 255 MiB (96%)
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 3 min 21 s
    Bit rate mode : Variable
    Bit rate : 422 kb/s
    Maximum bit rate : 480 kb/s
    Channel(s) : 2 channels
    Channel(s)_Original : 5 channels
    Channel positions : Front: L C R, Side: L R
    Sampling rate : 48.0 kHz
    Frame rate : 46.875 FPS (1024 spf)
    Compression mode : Lossy
    Stream size : 10.1 MiB (4%)
    Default : Yes
    Alternate group : 1

    I think there is something wrong with the compression mode or something .. here ate the media info for the WAV file used:

    General
    name : ABC.wav
    Format : Wave
    File size : 92.1 MiB
    Duration : 3 min 21 s
    Overall bit rate mode : Constant
    Overall bit rate : 3 840 kb/s
    TCOD : 0
    TCDO : 2012800000

    Audio
    Format : PCM
    Format settings, Endianness : Little
    Format settings, Sign : Signed
    Codec ID : 1
    Duration : 3 min 21 s
    Bit rate mode : Constant
    Bit rate : 3 840 kb/s
    Channel(s) : 6 channels
    Sampling rate : 48.0 kHz
    Bit depth : 16 bits
    Stream size : 92.1 MiB (100%)

    What do you think the problem guys? what I need to do or modify in the code or anything to get the desired results?
    Quote Quote  
  11. if you are using rawavc as in input for ffmpeg, you need to use -f h264 and specify the framerate -r25 , both as input options (preceding the -i )

    Code:
    ffmpeg -f h264 -r 25 -i ABC.avc -i ABC.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 480k ABC.mp4
    ffmpeg's aac encoder might not be writing the metadata correctly , let me check
    Quote Quote  
  12. yes, there is a problem with ffmpeg's aac encoder and that channel configuration

    qaac works with 5 ch correctly in vegas , either as elementary audio, or muxed into mp4 (with mp4box)

    Here is an example of the syntax to use ffmpeg to pipe to qaac

    e.g
    Code:
    ffmpeg -i input.ext -acodec pcm_f32le -f wav - | "PATH\qaac" -V 80 --no-delay -o qaac_q80.m4a -


    What application / platform are the people you are sending it to using ?

    Do you have a spec sheet or requirement sheet that they provided ?
    Image Attached Files
    Quote Quote  
  13. Hi poison and thanks ..

    to tell the truth I got lost a little bit, according to this then can you suggest a code to type to convert lets say ABC.AVC (doesn`t exist, needs to do it again) and ABC.wav to make ABC.mp4 file with the 5 channels..

    if I got you right, I need to write the second code to conver .wav to .m4a .. then I will use this .m4a instead of the .wav while writing the 1st code you wrote. am I correct? if not please advise what to do or the code/s to write...

    thanks
    Quote Quote  
  14. Originally Posted by Nedo View Post

    to tell the truth I got lost a little bit, according to this then can you suggest a code to type to convert lets say ABC.AVC (doesn`t exist, needs to do it again) and ABC.wav to make ABC.mp4 file with the 5 channels..

    if I got you right, I need to write the second code to conver .wav to .m4a .. then I will use this .m4a instead of the .wav while writing the 1st code you wrote. am I correct? if not please advise what to do or the code/s to write...

    While uncompressed PCM WAV audio would be ideal, I mentioned you cannot mux it into MP4 with open source/ commonly available software tools. WAV is compatible in MOV , and transport streams which are the typical submission formats for broadcast/TV stations who typically want uncompressed audio . So this is a bit bizarre, as is the 5ch configuration. But give them whatever they want

    So assuming that's what they want , you encode aac with qaac (which again, definitely works in that non standard channel configuration as you can see with the samples provided, at least in vegas, and premiere) , then mux your video with the new audio into mp4 container (e.g. using mp4box)

    Earlier I suggested megui, because it's a GUI which has all those tools and more, but if you're happy with commandline:

    1) Encode your video in vegas (or check the recycling bin) Let's call it "ABC.avc"

    2) Encode your audio with qaac. If you have WAV input, you don't need to use ffmpeg to pipe to qaac, it accepts WAV input directly. If you had the audio in AVI container, you'd have to use the example provided earlier to pipe. You can change the parameters, quality etc... there are a bunch of switches. qaac -h will list all the switches. I just used "quality based" 80 in that example. If your spec sheet needed CBR for example, then you should use that mode.

    Code:
    "qaac" -V 80 --no-delay "ABC.wav" -o "ABC.m4a"
    There might be an issue with the WAV header that you are using , because mediainfo still "sees" it as 6ch . So check the output "ABC.m4a" with mediainfo and vegas at that stage before continuing. It should report 5ch , and it should import into vegas as 5ch . If it doesn't let me know and there are ways to fix that

    3) mux your video and audio with mp4box into mp4 container

    Code:
    mp4box -add "ABC.avc":fps=25.000 -add "ABC.m4a" -brand mp42 ABC_mp4box_muxed.mp4
    Now this looks fine in mediainfo, premiere, various other programs but vegas doesn't like the audio config for some reason. When the audio is separate, or muxed in mp4 alone as in the 2 samples provided above, it works fine in vegas. As soon as you mux video+audio, vegas messes up the audio configuration . Not sure why . So it is actually a muxing compatibility issue with vegas. So it's always a good idea to know what the recipients are using
    Quote Quote  
  15. Hi poison, and happy new year...

    I tried the code for the audio it didn`t work, it give me this message :


    C:\Users\1>"qaac" -V 80 --no-delay "ABC.wav" -o "ABC.m4a"
    '"qaac"' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\1>

    I installed lamexp, but couldn`t read the WAV file for some reason!!

    please advise..

    in BTW, if there is paid software who can do this I might consider rather thanbeing so stuck and late for the channel like this! this is pain in the a$$ you know and I agree its totally unnecessary!!

    Thanks..
    Quote Quote  
  16. you need to download qaac , and set the correct paths in the commandline

    Code:
    "PATH\qaac" -V 80 --no-delay "PATH\ABC.wav" -o "PATH\ABC.m4a"
    For example, if ABC.wav was in c:\folder , it's full path would be "c:\folder\ABC.wav"

    I don't know why lamexp couldn't read a wav file

    5 channel AAC is non standard, so I doubt there are many software that can encode it properly (and it seems at least vegas can't handle decoding it either, but I don't know of any stations that use vegas, it's typically adobe, avid, and fcp)

    I would look at the spec sheet a bit closer, because this is non standard for submissions. You don't want to jump through all these hoops just to find out it's wrong.
    Quote Quote  
  17. Poison,

    it gives me:

    Microsoft Windows [Version 10.0.14393]
    (c) 2016 Microsoft Corporation. All rights reserved.

    C:\Users\1>"C:\qaac\X64\QAAC64.EXE" -V 80 --no-delay ABC.wav -o ABC.m4a
    ERROR: CoreAudioToolbox.dll: The specified module could not be found.

    C:\Users\1>C:\qaac\X64\QAAC64 -V 80 --no-delay ABC.wav -o ABC.m4a
    ERROR: CoreAudioToolbox.dll: The specified module could not be found.

    C:\Users\1>QAAC64 -V 80 --no-delay ABC.wav -o ABC.m4a
    ERROR: CoreAudioToolbox.dll: The specified module could not be found.

    C:\Users\1>"QAAC64" -V 80 --no-delay "ABC.wav" -o "ABC.m4a"
    ERROR: CoreAudioToolbox.dll: The specified module could not be found.

    C:\Users\1>"QAAC64" -V 80 --no-delay "ABC.wav" -o "ABC.m4a"
    ERROR: CoreAudioToolbox.dll: The specified module could not be found.

    I tried in many formats and finally put them all together in same folder of the CM to make it easier... still as you can see

    any advise?
    Quote Quote  
  18. you advise me to render the audio from Vegas in different format than the WAV? I don`t mine to do so !
    Quote Quote  
  19. No WAV is the most compatible, but vegas probably has done something with the wave header to make it look like 6 ch . The sample I posted above were done with true 5ch WAV ,and mediainfo reports as 5 ch (your's said 6) . You can re-export or fix it in an audio editor like audacity if qaac reads the input WAV as 6ch instead of 5ch

    You need CoreAudioToolbox.dll. It needs to go in a subfolder "qtfiles"

    There are a bunch of prerequisites for QAAC listed on the author's homepage, but you don't actually need Apple Quicktime or Apple Application Support installed

    This thread in the lamexp deals with the workaround if you don't want an Apple footprint
    http://forum.doom9.net/showthread.php?p=1588077
    Last edited by poisondeathray; 30th Dec 2016 at 13:53.
    Quote Quote  
  20. Attached is the qtfiles folder that I had on this computer. Place in the same directory of qaac.exe. I had been using qaac 2.49 and x86 version on a x64 OS, but it should work with any qaac version, x86 or x64

    I don' t know if all the .dll's are strictly necessary but I just migrate this folder to different computers and they all seem to work with qaac. The original workaround was derived from that thread I linked to in the previous post
    Image Attached Files
    Quote Quote  
  21. Oh boy.. this file I think is cursed or haunted or something lol..

    I did the following command, and here is the error I got:

    C:\Users\1>D:\qaac_2.61\qaac\x64\qaac64 -V 80 --no-delay ABC.wav -o ABC.m4a
    ERROR: 193: CoreAudioToolbox.dll

    C:\Users\Laptop>

    and this was after I transfered everything you sent me to there...

    any tips!
    Quote Quote  
  22. Try the x86 binary , maybe some of the dll's in that folder require x86

    If that doesn't work , try the exact same version I used, qaac 2.49 x86
    Quote Quote  
  23. happy new year everybody..

    I have updates, I spoke with the channel and they agreed that I can send for them separate the audio from video.. so I guess this solves the issue finally to some extent.

    my point is: can you please guys advise whats the code to use with ffmpeg if I want to create ABC.MP4 (should be encoded with H264 as per their request) from either ABC.AVC (compressed with H264) or from ABC.AVI (uncompressed completely), while maintaining the interlaced (not to have the ABC.MP4 as progressive, as it is another obstacle I notice it with convertors).. both the original files are interlaced as well..

    I would highly appreciate a soon reply..

    many thanks and happy new year ..

    Nedo
    Quote Quote  
  24. If you wanted to encode from an AVI (an RGB AVI if you exported from vegas) , there are host of other potential issues you're going to face. Get ready to spend hours reading about this, but studio vs. computer RGB levels in vegas (the output AVI might not be what you think it is, and the recieving program might not act like you think it should) , interlaced RGB to YUV conversion (if it's not done correctly, you will get chroma "ghosting"). There are switches in ffmpeg and workarounds in avisynth, but it depends on what the actual levels were in vegas, what types of YUV assets were used (different types get different treatment). So the safest / easiest way is to use vegas to do the video encoding.

    ffmpeg uses libx264, which only encodes MBAFF. But some stations want PAFF , you should clarify what they want specifically. Basically there are 2 different ways of encoding what people think as "interlaced" AVC. MBAFF is superior (for example BBC,CBC, NBC, ITV accept it), but some local affiliate stations run on old hardware/software combos and don't like or accept it. So the safest way if you're not sure, is to use vegas to encode to encode interlaced AVC (which is PAFF, and universally accepted by stations who want interlaced) .

    MP4Box is superior to muxing than ffmpeg for MP4 container. ffmpeg can sometimes have issues muxing interlaced AVC. You might notice the frame rate is read as the field rate or other issues. So I would use the mp4box command above
    Quote Quote  
  25. Their studio would not accept m2ts? It seems natural for video with 5.1 audio. Vegas should have no problem with 5.1 AC3.
    You could use Blu-Ray streams for export, modify them. This way you avoid possible MBAFF problem (it is a problem for them).
    You could put those streams together in tsMuxer, if Vegas handles only separate streams properly during export. But right now I don't see the reason why.
    Why not to send them m2ts sample then.
    Last edited by _Al_; 2nd Jan 2017 at 19:16.
    Quote Quote  
  26. Thanks Poison,

    I already have the .AVC encoded H264 from Vegas, I am very flexible in using anyway in order to get the MP4 interlaced, their request was exactly : MP4 H264, interlaced.. so basically I don`t mind any way to get to that (I am thinking to submit the .AVC as well in case they faced difficulties).

    so is there a way to get the MP4 H264 interlaced from Vegas directly? or better to convert from .AVC,, if I will convert from the .AVC you advise me with MP4Box rather than FFmpeg? like what would you do as first choice then second etc if you were in my shoes? I have premiere as well if that helps..

    In BTW: I am glad they accepted the separate audio, that saved a lot of craziness out of me!
    Quote Quote  
  27. My first choice would be a transport stream as _Al_ suggested. That's the proper standardized container for broadcast interlaced AVC, not MP4 . Your client requirements are very non standard , but give them what they want...

    Yes, you can encode interlaced AVC MP4 with vegas, just customize the export settings . They won't have a preset because it's non standard. There is probably higher chance of compatibility / fewer problems if you let vegas do it. But make sure you have the settings correctly matching and setup correctly (project settings, file interpetation settings, export settings) . That's my 2nd choice if they wouldn't accept transport streams for some strange reason
    Quote Quote  
  28. Thank AI ..

    I did with the blue-ray 1080 50i and exported the .AVC out of it, is it the same one or there is another way for producing something else? (like mp4 interlaced etc)..

    so you believe if I submit the .AVC with the 5 channels audio should be enough? I am not sure what is m2ts, Im new to the rendering thing and its a real heck!!

    please advise what you think best solution in a primary level since I am beginner in the rendering field..

    thanks..
    Quote Quote  
  29. Many thanks Poison I will go with that..

    the only issue with exporting MP4 from Vegas is that i didn`t find any way to export it directly as interlaced, all are progressive.. so I will try with the converting one you advised (unless you know a way to export MP4 interlaced from Vegas) and give them both.. if they accepted the AVC, then will make it standard with them for any future deal (with audio separate)..

    Its good to know whats going on as standard world wide, It should apply to them also hopefully..

    many thanks..

    Nedo
    Quote Quote  
  30. Originally Posted by Nedo View Post

    the only issue with exporting MP4 from Vegas is that i didn`t find any way to export it directly as interlaced, all are progressive..
    File => render as .

    Select one of the AVC options (Mainconcept, Sony)

    Push the custom template button

    Change field order from progressive to upper field first

    Make sure all the other settings are correct (for example a 25 FPS project should have 25 FPS export settings)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!