VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi all,

    I have some video files in DV-DVI type1 format. The video is NTSC 720x480 29.94 fps

    I need to be able to process these files through ffmpeg. ffmpeg work great with PAL resolution video in the same format but fails processing NTSC.

    I get an error about swScaler cannot find context.

    Does anyone know how to get ffmpeg to process NTSC clips?

    Thanks

    Vert
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    commandline?
    and it's output?
    Quote Quote  
  3. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Sorry i should have thought to include it in my first post.

    The error is different, i think the other error must have been from some other variation that i tryed yestreday.



    C:\>ffmpeg.exe -i c:\answer1_ntsc.avi c:\answer1.yuv c:\answer1.mp3

    FFmpeg version SVN-r8435, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --
    enable-liba52 --enable-avisynth --enable-libdts --enable-libfaac --enable-libfaa
    d --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libogg --enable-l
    ibtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb --enable
    -amr_wb --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
    libavutil version: 49.3.0
    libavcodec version: 51.39.0
    libavformat version: 51.11.0
    built on Mar 18 2007 22:27:19, gcc: 4.3.0 20070126 (experimental)
    [avi @ 009FEB90]Could not find codec parameters (Video: dvvideo, 25000 kb/s)
    c:\answer1_ntsc.avi: could not find codec parameters

    C:\>
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    works for me.

    update your ffmpeg version.
    http://esby.free.fr/CelticDruid/mirror/ffmpeg/

    try again.

    upload a sample if it doesn't work

    gl
    Quote Quote  
  5. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi

    Thanks for the link I will give it a go!

    Cheers

    Vert
    Quote Quote  
  6. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi Guys

    I download the newest ffmpeg executable from the link posted.

    Unfortunatly i get the same error.

    Thanks

    Vert
    Quote Quote  
  7. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    you might try converting to type II avi before processing.

    https://www.videohelp.com/tools/Canopus_DV_File_Converter
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  8. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi aedipuss

    I converted the video to type 2 ntsc with DvDate.

    Now when i run ffmpeg i get a big long list of errors, thus

    "Error while decoding stream #0.0"

    Is ffmpeg capable of decoding NTSC streams? Sure it isn't restricted to PAL?

    Thanks

    Vert
    Quote Quote  
  9. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Vertuas
    Is ffmpeg capable of decoding NTSC streams? Sure it isn't restricted to PAL?
    Yes. Sure.

    Probably your source,
    upload a non-working sample somewhere if you'd like someone else to have a shot at it.
    Quote Quote  
  10. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi

    I uploaded a test video clip at

    www.videoboothsystems.co.uk/uploads/test_type1_ntsc.avi

    The file is 77.6 Meg in size.

    Thanks

    Vert
    Quote Quote  
  11. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Yes there's something wrong with your file.
    The header for one.

    Can't say i'm too concerned with the actual problem as there are plenty of options open to you.
    Why yuv btw?

    1. use avisynth
    Code:
    directshowsource("dv.avi")
    Code:
    ffmpeg -i dv.avs dv.yuv dv.mp3
    this worked for me.
    2. just use vdub to convert to something like huffyuv or uncompressed rgb. (separate audio proc)
    3. direct stream with vdub and run through mplayer/mencoder. (separate audio proc)
    4. convert to dv type 2 and run through mplayer/mencoder.
    Code:
    mplayer dv2.avi -ao pcm:fast -vo yuv4mpeg
    encode wav with lame

    weird ffmpeg won't take the type 2 avi or re-streamed dv, it doesn't seem to be able to detect the colourspace and fails.
    anyway

    gl
    Quote Quote  
  12. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi All,

    I am converting a few files to yuv and mp3 then getting ffmpeg to join them to make one large video file.

    It was suggested to me (not on this forum) that i need to convert the video to a common format before trying to join them up. yuv and mp3 was suggested to me.

    Hope this helps

    Vert
    Quote Quote  
  13. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Sorry

    forgot to ask what is wrong with the file header?

    thanks
    Quote Quote  
  14. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Update.

    I used After Effects to create a ntsc video file and that one work perfectly. Must be dodgy video that has caused my problems.

    Another question :

    Can ffmpeg re-convert my yuv/mp3 files back to dv avi? I can get them to go back if the video is PAL to PAL, but not with NTSC to NTSC?


    C:\>ffmpeg -i test2.mp3 -acodec pcm_s16le -vcodec dvvideo -s 720x480 -r 29.97 -i
    c:\test2.yuv c:\test2_m.avi
    FFmpeg version SVN-r8435, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --
    enable-liba52 --enable-avisynth --enable-libdts --enable-libfaac --enable-libfaa
    d --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libogg --enable-l
    ibtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb --enable
    -amr_wb --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
    libavutil version: 49.3.0
    libavcodec version: 51.39.0
    libavformat version: 51.11.0
    built on Mar 18 2007 22:27:19, gcc: 4.3.0 20070126 (experimental)
    Input #0, mp3, from 'test2.mp3':
    Duration: 00:00:04.1, start: 0.000000, bitrate: 63 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, stereo, 64 kb/s
    Input #1, rawvideo, from 'c:\test2.yuv':
    Duration: N/A, bitrate: N/A
    Stream #1.0: Video: rawvideo, yuv420p, 720x480, 29.97 fps(r)
    Output #0, avi, to 'c:\test2_m.avi':
    Stream #0.0: Video: dvvideo, yuv420p, 720x480, q=2-31, 200 kb/s, 29.97 fps(c)
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
    Stream mapping:
    Stream #1.0 -> #0.0
    Stream #0.0 -> #0.1
    Press [q] to stop encoding
    Video encoding failed
    Quote Quote  
  15. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Vertuas
    Must be dodgy video that has caused my problems.
    I said as much

    Originally Posted by Vertuas
    It was suggested to me (not on this forum) that i need to convert the video to a common format before trying to join them up. yuv and mp3 was suggested to me.
    quite frankly, that sounds ridiculous.
    what's wrong with dv? or something lossless like huffyuv?
    And why on earth would you go to mp3 for joining/editing when you've got uncompressed audio staring at you?

    Originally Posted by Vertuas
    Can ffmpeg re-convert my yuv/mp3 files back to dv avi? I can get them to go back if the video is PAL to PAL, but not with NTSC to NTSC?
    See the foolishness?
    pcm to mp3 to pcm??

    Yes. Why not ntsc?
    try:
    Code:
    C:\>ffmpeg -i test2.mp3 -i c:\test2.yuv -acodec pcm_s16le -pix_fmt yuv411p -vcodec dvvideo -s 720x480 -r 29.97  c:\test2_m.avi
    gl
    Quote Quote  
  16. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi

    You are quite correct it does appear silly going from uncompressed-compressed-uncompressed as the loss of quality.

    The intermediate formats are things that i have been left to work with from someone else, there is no reason why they cannot change.

    The DV input and DV output must stay the same however the output can be type 2, thats not a problem. The inputs are type 1 as they are from a DV Video camera.

    Before attempting to sort out the mess that i was left with, i had never use ffmpeg before! Is a rapid learning experience indeed!

    I appriciate your help very much.
    Quote Quote  
  17. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hello

    I just found the reason for the use of MP3 audio.

    If i use wavs, the audio doesn't get muxed properly on the merged output. Only the audio from the first video gets included.

    So back to MP3 then.

    Again Thank you very much for all your help

    Vert
    Quote Quote  
  18. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Vertuas
    If i use wavs, the audio doesn't get muxed properly on the merged output. Only the audio from the first video gets included.
    out of interest,
    using what commandline?
    Quote Quote  
  19. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi 45tripp

    All of the video to be joined get put into one folder. Command line :

    ffmpeg -i input.avi -pix_fmt yuv411p input.yuv input.mp3

    change yuv411p to yuv420p for PAL input video.......if you don't include the pix_fmt, the NTSC clips don't go back to DV-AVI correctly! You need to do this for each video to be joined up.

    Then all the YUV files get appended into on big YUV file.

    All the MP3 files get appended to one big MP3 file.

    Then for NTSC :

    ffmpeg -i merged.mp3 -acodec pcm_s16le -pix_fmt yuv411p -vcodec dvvideo -s 720x480 -r 29.97 -i merged.yuv merged.avi

    or

    ffmpeg -i merged.mp3 -acodec pcm_s16le -pix_fmt yuv420p -vcodec dvvideo -s 720x576 -r 25 -i merged.yuv merged.avi

    for pal.

    You cannot cross covert between PAL/NTSC. All input video clips must have an audio track and be the same format (NTSC/PAL).

    I beleive that after the header issue, it was ommission of the pix_fmt option in the extract for the AVI that was causing my problems, as NTSC was saved as yuv420p not yuv411p. The resulting video content was just a mass of shapeless color.

    The missing header issue was caused by DVDate which i had used to convert my PAL test files to NTSC. NTSC video from After Effects work fine.

    Thanks

    Vert
    Quote Quote  



Similar Threads

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