VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Hi

    I try to open AVC/AAC-encoded videos in VirtualDub but I don't get it to work. ffdshow is installed for decoding like I read it in other threads here, but it doesn't change I can't open those videos.

    When I try to open it with an AviSynth-Script, I get this message:


    (German part: "File can not played. The format is not supported")


    When I try to open the file with the DirectShow Input Driver for VirtualDub:




    System/Tools:
    Windows 7 x64
    VirtualDub 1.9.10 x32
    ffdshow tryouts x32 rev. 3562 (08.09.2010)
    AviSynth 2.5.8

    ffdshow:
    VFW:
    H.264/AVC - ffmpeg-mt
    Video Decoder:
    H.264/AVC - ffmpeg-mt
    Audio Decoder:
    AAC - libfaad2

    avs:
    DirectShowSource("test.flv")

    Media Info:
    Format : Flash Video
    Overall bit rate : 136 Kbps

    Video
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L1.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Muxing mode : Container profile=Unknown@1.1
    Duration : 3mn 36s
    Bit rate : 58.1 Kbps
    Width : 320 pixels
    Height : 240 pixels
    Display aspect ratio : 4:3
    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.030
    Stream size : 1.50 MiB (43%)

    Audio
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Format settings, SBR : Yes
    Format settings, PS : No
    Duration : 3mn 36s
    Bit rate : 72.8 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Bit depth : 16 bits
    Stream size : 1.88 MiB (53%)

    I hope you can help me, because I often have to edit AVC videos!
    Last edited by klischee; 10th Sep 2010 at 11:19.
    Quote Quote  
  2. did you use preferred filter tweaker for win7 , to set ffdshow for decoding ? you have to override the default MS decoder

    If you can't "fix" your directshow system , you can use another source filter e.g. ffmpegsource2
    http://code.google.com/p/ffmpegsource/
    Quote Quote  
  3. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    I tried the Filter Tweaker and set H264 & AAC to ffdshow, but it still does not work.
    ffmpegsource2 has no inf or installer or something, don't know how I can tell AviSynth and VirtualDub how to use it.
    Quote Quote  
  4. You need an flv splitter that supports avc/aac if you are using directshow

    You can find one here:
    http://sourceforge.net/projects/guliverkli2/files/DirectShow%20Filters/

    and register it with radlight filter manager, or through graphstudio

    If you render the flv in graphstudio or graphedit , what does it show ? After you've registered the flv splitter , what does it show? do the pins connect ?




    For ffmpegsource2, download the zip file, and unzip the plugins into avisynth\plugins directory (specifically the .avsi and .dll are required) . Full instructions are included as usual in the zip file

    FFMpegSource2("video.flv", atrack=-1)
    Quote Quote  
  5. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Directshow Input driver is 32bit. You need to use Virtualdub 32bit with all 32bit plugins and install 32bit codecs in the SysWOW folder.

    You could use FLVExtract to demux the h264/aac streams and use MP4Box or MKVmerge to mux and cut the files without recoding or better...

    Use gdsmux.exe (part of Haaili splitter) to copy the streams to a TS container and then use H264TS Cutter to cut the files without recoding. Then use gdsmux.exe to mux the streams into an mkv or mp4 container. No recoding is done in any of this process.

    EDIT: I was hoping you could use the ffmpeg copy command to batch convert the FLV files to TS files but it did not work for me.
    Last edited by DarrellS; 10th Sep 2010 at 14:06.
    Quote Quote  
  6. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Edit: I've got it to work! On the flv splitter page there was descriped how to register it:
    "Extract the .ax file to a folder and then Start->Run and type regsvr32 "C:\Locationto\FLVSPlitter.ax" to install it."

    Now I can open AVC encoded videos through AviSynth in VirtualDub! Thanks!


    Original post (outdated ^^):

    Originally Posted by poisondeathray View Post
    and register it with radlight filter manager, or through graphstudio
    With RFM I get an error message when I click on "register"-button and choose the FLVSplitter.ax



    Originally Posted by poisondeathray View Post
    If you render the flv in graphstudio or graphedit , what does it show ? After you've registered the flv splitter , what does it show? do the pins connect ?
    When I try to render it says "cannot render file". How I can register the splitter I did not found out. I googled but did not found the solution.

    Originally Posted by poisondeathray View Post
    FFMpegSource2("video.flv", atrack=-1)
    Ok, this works fine, but Audio is missing of course now... . It would be better to handle AVC through direct show, because it would be much more comfortable to create avs and open them (with scripts). Otherwise I would have to check the codecs of each video.

    Thanks for your help, I hope you can help me further to install the FLV Splitter.

    @DarrellS
    Thanks, but I think/hope there's a easier way to open up AVC-videos
    I know I can convert them to other formats, but I would like to skip that step.
    Last edited by klischee; 10th Sep 2010 at 14:20.
    Quote Quote  
  7. Edit: I've got it to work! On the flv splitter page there was descriped how to register it:
    "Extract the .ax file to a folder and then Start->Run and type regsvr32 "C:\Locationto\FLVSPlitter.ax" to install it."
    Glad to see you got it working


    Ok, this works fine, but Audio is missing of course now... . It would be better to handle AVC through direct show, because it would be much more comfortable to create avs and open them (with scripts). Otherwise I would have to check the codecs of each video.

    are you sure there's no audio? did you specify atrack=-1 ?

    The problem with directshowsource, is that it's not frame accurate (sync errors when editing), and prone to whatever filters you have in your directshow subsystem.

    On the contrary, FFmpegsource is independent of the codecs , splitters in the video , and directshow requires you to check every video or at least ensure you directshow system is working with filters (such as you are doing now) . FFmpegsource2 also indexes your file, so it has higher reliability when editing or using temporal filtering than directshow .

    If you are only doing a straight encode, directshowsource() is fine . If you're adamant on using directshow, consider using DSS2() instead, which is frame accurate when used with video in a container. It only serves video, so you need audiodub() to load the audio together (with an audio source filter)
    Last edited by poisondeathray; 10th Sep 2010 at 14:34.
    Quote Quote  
  8. Originally Posted by DarrellS View Post
    EDIT: I was hoping you could use the ffmpeg copy command to batch convert the FLV files to TS files but it did not work for me.
    You can do it that way too , but you'll find better success using .m2ts (instead of .ts) with ffmpeg batching
    Quote Quote  
  9. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Originally Posted by poisondeathray View Post
    If you are only doing a straight encode, directshowsource() is fine . If you're adamant on usind directshow, consider using DSS2() which is frame accurate when used with video in a container. It only serves video, so you need audiodub() to load the audio together
    Thanks for all those infos, I will keep them in mind!

    Mainly, I just want to cut, convert and copy out the audio of videos, the only filter I use sometimes with VDub is null transform/crop or resize. The first tests look good, edit, oops: audio is still not working. It's AAC. Any idea?

    VirtualDub can export the stream to wav, but it can't reencode it f.e. to lame MP3.
    Last edited by klischee; 10th Sep 2010 at 14:40.
    Quote Quote  
  10. Ok now you have several options

    Just keep that stuff in the back of your mind, because most of the time problems can be directly attributed to directshow subsystem (splitter, codec, filters) - like they were for you today
    Quote Quote  
  11. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Yeah, I will

    Did you read my edit? I was too early with saying audio is okay, my test video was a FLV with mp3, but FLV with AAC does not work for audio reencoding -.- Is there something like AAC-Splitters?

    Btw: Thanks for investing so much of your time for me
    Last edited by klischee; 10th Sep 2010 at 14:56.
    Quote Quote  
  12. Originally Posted by klischee View Post
    Mainly, I just want to cut, convert and copy out the audio of videos, the only filter I use sometimes with VDub is null transform/crop or resize. The first tests look good, edit, oops: audio is still not working. It's AAC. Any idea?

    VirtualDub can export the stream to wav, but it can't reencode it f.e. to lame MP3.
    In vdub, if you use file=>file information is it passing through audio ?

    For encoding to MP3 in vdub , you can install lame ACM . There are special instructions for installing in 32 bit in 64-bit OS
    https://forum.videohelp.com/threads/271712-Lame-MP3-Encoder-on-Vista-x64
    Last edited by poisondeathray; 10th Sep 2010 at 14:48.
    Quote Quote  
  13. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Originally Posted by poisondeathray View Post
    In vdub, if you use file=>file information is it passing through audio ?

    For encoding to MP3 in vdub , you can install lame ACM . There are special instructions for installing in 32 bit in 64-bit OS
    I already have installed lame, it works fine with other source input audio formats.

    This is what VirtualDub tells me in file information:



    When I save the wav (File --> Save WAV) it's playable but PCM. You can see the media info of the input video in the 1st post. I can't compress the audio in VirtualDub to lameMP3 or other formats. Any idea?
    Quote Quote  
  14. It's PCM because avisynth serves uncompressed video & audio . So everything is working correctly, or it should be

    The problem is 5.1 audio, which isnt supported by mp3 . You need to downmix , or use something like AC3 which supports 5.1
    Quote Quote  
  15. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Ok. But when the input is fine, why does VirtualDub not let me compress the audio?
    (Audio --> Full processing Mode --> Compression...).

    Lame compression works fine for other input files like wma, ogg, mp3, ... only AAC is not working.
    Quote Quote  
  16. ^I edited my post above : RE: 5.1 audio
    Quote Quote  
  17. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Ahh, you're a genius! Thanks so much, I would never have get this to work without you.
    VirtualDub is able to convert to stereo, then it works with lame, cool
    Quote Quote  
  18. Another option is to convert 5.1 to stereo in the avisynth script as well


    a = DirectShowSource("video.flv")

    fl = GetChannel(a, 1)
    fr = GetChannel(a, 2)
    c = GetChannel(a, 3)
    lfe = GetChannel(a, 4)
    sl = GetChannel(a, 5)
    sr = GetChannel(a, 6)
    l_sl = MixAudio(fl, sl, 0.2929, 0.2929)
    c_lfe = MixAudio(lfe, c, 0.2071, 0.2071)
    r_sr = MixAudio(fr, sr, 0.2929, 0.2929)
    l = MixAudio(l_sl, c_lfe, 1.0, 1.0)
    r = MixAudio(r_sr, c_lfe, 1.0, 1.0)
    MergeChannels(l, r)
    Cheers
    Quote Quote  
  19. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    I try to keep avs' as simple as possible, because I generate them with a batch script, so I don't have to create them by hand.

    At moment, I click f.e. a .flv-file, "open it..." with the batch-script, then it generates a videoname.avs with "DirectShowSource("filename.ext") ", opens it in VirtualDub, and deletes the avs. So I don't have to do anything :O I'm not professional enough to detect the video settings for each file and generate a complex avs

    <--big noob
    Quote Quote  
  20. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    @DarrellS
    Thanks, but I think/hope there's a easier way to open up AVC-videos
    I know I can convert them to other formats, but I would like to skip that step.
    I posted that in case you didn't want to have to re-encode to a different format. You didn't say what your intentions were
    Quote Quote  
  21. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by DarrellS View Post
    EDIT: I was hoping you could use the ffmpeg copy command to batch convert the FLV files to TS files but it did not work for me.
    You can do it that way too , but you'll find better success using .m2ts (instead of .ts) with ffmpeg batching
    What command would you use? I tried...

    for %%a in ("*.flv") do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.ts

    and it did gave me an output file but there was no video or audio in it.

    replacing ts with m2ts created no file.

    I just assumed that ffmpeg could not mux ts files (or m2ts).
    Quote Quote  
  22. Originally Posted by DarrellS View Post
    Originally Posted by poisondeathray View Post
    Originally Posted by DarrellS View Post
    EDIT: I was hoping you could use the ffmpeg copy command to batch convert the FLV files to TS files but it did not work for me.
    You can do it that way too , but you'll find better success using .m2ts (instead of .ts) with ffmpeg batching
    What command would you use? I tried...

    for %%a in ("*.flv") do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.ts

    and it did gave me an output file but there was no video or audio in it.

    replacing ts with m2ts created no file.

    I just assumed that ffmpeg could not mux ts files (or m2ts).

    Sorry I should have clarified. It depends on what style of flv you are using, and if they are cut or not. It also depends on how your ffmpeg binary was compiled

    If you want it to work consistently for most things, you need a special ffmpeg build that is muxer/demuxer only, that can properly handle h264 streams . Note, this is just a special re-wrapping build (it won't encode to other things)
    http://forum.doom9.org/showthread.php?t=152419

    for %%a in ("*.flv") do ffmpeg -i %%a -vcodec copy -acodec copy -f mpegts -vbsf h264_mp4toannexb %%~na.m2ts

    For whatever reason, "m2ts" works more consistently than "ts" (I suspect it's because m2ts uses 192byte packets, whereas ts uses 188byte packets , the extra bytes are for timecode information)
    Last edited by poisondeathray; 10th Sep 2010 at 18:38.
    Quote Quote  
  23. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Thanks a lot, poisondeathray!
    Quote Quote  
  24. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Hi

    I have again a problem with AVC/AAC

    AviSynth or VirtualDub seems to change AAC tracks to 5.1, so I can't reencode them with VirtualDub.

    The source videos are 2ch Stereo, but after opening them with DirectShowSource("video.ext"), VirtualDub tells me the streams are 5.1, and it is not able to reencode them (not with lame, not with AC-3, even not when I use the stereo-conversion). I really have no clue why the video editors think the audio stream is 5.1. It only happens with almost all AAC encoded audio streams.WMA, MP3 and others stay Stereo. Any idea?

    Media Info about the original source video:

    Audio #2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Format settings, SBR : No
    Codec ID : 40
    Duration : 12mn 50s
    Bit rate mode : Constant
    Bit rate : 80.0 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 32.0 KHz
    Stream size : 7.44 MiB (3%)
    Language : English
    VirtualDub after opening the video with an avs:

    Last edited by klischee; 11th Sep 2010 at 12:00.
    Quote Quote  
  25. Remember what I said earlier.... about directshow issues

    It looks like you have 2 audio streams (because it says audio#2), can you post the FULL mediainfo report

    If you remux and keep only 1 audio, you could choose to pass through the 2.0 stream , or 5.1 stream
    Quote Quote  
  26. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Omg, are you never asleep?

    Here's the complete report of media info:

    General
    Complete name : test.mov
    Format : MPEG-4
    Format profile : QuickTime
    Codec ID : qt
    File size : 126 MiB
    Duration : 17mn 10s
    Overall bit rate : 1 027 Kbps
    Encoded date : UTC 2009-12-24 20:18:35
    Tagged date : UTC 2009-12-24 20:18:48
    Writing library : Apple QuickTime

    Video #1
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L4.2
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 17mn 10s
    Bit rate mode : Variable
    Bit rate : 897 Kbps
    Width : 640 pixels
    Height : 360 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 29.970 fps
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.130
    Stream size : 110 MiB (87%)
    Language : English
    Encoded date : UTC 2009-12-24 20:03:18
    Tagged date : UTC 2009-12-24 20:18:48
    Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
    Transfer characteristics : BT.601-6 525, BT.601-6 625, BT.1358 525, BT.1358 625, BT.1700 NTSC, SMPTE 170M
    Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

    Audio #2
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Format settings, SBR : No
    Codec ID : 40
    Duration : 17mn 10s
    Bit rate mode : Constant
    Bit rate : 128 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Stream size : 15.4 MiB (12%)
    Language : English
    Encoded date : UTC 2009-12-24 20:03:18
    Tagged date : UTC 2009-12-24 20:18:48
    There is no Audio #1. Btw: The same happens with MP4 or FLV contained AAC.

    Originally Posted by poisondeathray View Post
    If you remux and keep only 1 audio, you could choose to pass through the 2.0 stream , or 5.1 stream
    Is remux still possible or needed when there's only one real audio stream? I never muxed, what tool do you prefer? I'm really not into all that video/audio stuff Never remuxed, demuxed and so on.
    Quote Quote  
  27. assuming mediainfo is correct , you shouldn't need to remux

    if you type info() in the script, how many channels does it report (when you preview the script in vdub or avsp, or a media player ?)

    the problem is likely ....guess what.... your directshow decoder

    make sure it's not setup to upsampling 2.0 => 5.1

    I noticed this last video is .mov wrapped. They can be problematic depending how you have your directshow filters setup. You have to fix your directshow filters to use directshowsource()

    You can use tools such as graphstudio to determine what directshow filter chain is currently being used



    or you could use ffmpegsource2 as suggested earlier, to avoid directshow issues . Repeat the above experiment with ffmpegsource2("test.mov", atrack=-1) and use info() and see how many channels it reports
    Last edited by poisondeathray; 11th Sep 2010 at 12:45.
    Quote Quote  
  28. Member
    Join Date
    Mar 2010
    Location
    Berlin
    Search PM
    Originally Posted by poisondeathray View Post
    if you type info() in the script, how many channels does it report (when you preview the script in vdub or avsp, or a media player ?)
    Players and Vdub show me on screen: Audio Channels: 6

    Originally Posted by poisondeathray View Post
    the problem is likely ....guess what.... your directshow decoder
    make sure it's not setup to upsampling 2.0 => 5.1
    Good idea! I had activated the matrix in ffdshow audio (2.0 to 5.1). But after deactivating it, it's still 6ch when I open videos with avisynth.

    Originally Posted by poisondeathray View Post
    You can use tools such as graphstudio to determine what directshow filter chain is currently being used
    It seems to use AC-3 Filter, not ffdshow. AC-3 is set to output stereo.
    You can have a look to graph edit when you open the attachement capturing. Possible you detect something?

    Originally Posted by poisondeathray View Post
    or you could use ffmpegsource2 as suggested earlier, to avoid directshow issues . Repeat the above experiment with ffmpegsource2("video.flv", atrack=-1) and use info() and see how many channels it reports
    With this script it works! It detects 2ch and is recompress the AAC to lame MP3 without any problems. Great! I will try to get into it what formats are opened the best with which method. It's so complex, uh!

    BIG thanks again for your help.
    Image Attached Files
    Quote Quote  
  29. I will try to get into it what formats are opened the best with which method.
    As mentioned earlier, ffms2 is independent of directshow system filters, codecs, splitters. And most problems can be attributed to directshow (THIS thread is ample evidence of that) . So unless you are adept at configuring your directhow system, I would avoid directshowsource() completely, and use only as last resort

    FFMS2 should work on everything (at least all the common video formats)

    It does have a frame rate bug with some transport streams (.m2ts, .ts) so you might want to fix it in avisynth (e.g. with assumefps) , or use another source filter to load if your source is transport stream.
    Quote Quote  
  30. BTW , when you use graphstudio, you open the native file, not the avs, to see the filter chain
    Quote Quote  



Similar Threads

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