Page 207 of 231 FirstFirst ... 107157197205206207208209217 ... LastLast
Results 2,061 to 2,070 of 2306

Thread: HOWTO: Install and use the latest FFmpeg and x264

  1. #2061
    Join Date
    Aug 2008
    Beans
    67

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    Change:
    Code:
    for file in *.mp4
    to:
    Code:
    for file in *.avi
    Yes, but I getting an error using this command for avi:

    ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 output.mp4
    ffmpeg version git-2011-12-04-f88d5df, Copyright (c) 2000-2011 the FFmpeg developers
    built on Dec 4 2011 11:21:47 with gcc 4.6.1
    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
    libavutil 51. 30. 0 / 51. 30. 0
    libavcodec 53. 40. 0 / 53. 40. 0
    libavformat 53. 24. 0 / 53. 24. 0
    libavdevice 53. 4. 0 / 53. 4. 0
    libavfilter 2. 50. 0 / 2. 50. 0
    libswscale 2. 1. 0 / 2. 1. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [avi @ 0x90fcac0] parser not found for codec camtasia, packets or times may be invalid.
    [avi @ 0x90fcac0] parser not found for codec pcm_s16le, packets or times may be invalid.
    Input #0, avi, from 'input.avi':
    Duration: 00:01:04.00, start: 0.000000, bitrate: 743 kb/s
    Stream #0:0: Video: camtasia (tscc / 0x63637374), bgr24, 1028x739, 15 tbr, 15 tbn, 15 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    Incompatible pixel format 'bgr24' for codec 'libx264', auto-selecting format 'yuv420p'
    [buffer @ 0x9104160] w:1028 h:739 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
    [buffersink @ 0x9102800] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
    [scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
    [libx264 @ 0x9102240] height not divisible by 2 (1028x739)
    Output #0, mp4, to 'output.mp4':
    Stream #0:0: Video: h264, yuv420p, 1028x739, q=-1--1, 90k tbn, 15 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, 352 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (camtasia -> libx264)
    Stream #0:1 -> #0:1 (copy)
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    What do I have to change in the command?
    Last edited by rulet; December 23rd, 2011 at 12:58 AM.

  2. #2062
    Join Date
    Dec 2006
    Beans
    6,926

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Looks like there is some unhappiness with your dimensions:

    Code:
    [scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
    [libx264 @ 0x9102240] height not divisible by 2 (1028x739)
    Mind you when I took more attention to such things encoding with x264 demanded that width and height should be divisible by 16 but this is obviously no longer the case. I suspect that you will need to investigate either the scale or the pad filter...
    Last edited by andrew.46; December 25th, 2011 at 10:35 AM.
    You think that's air you're breathing now?

  3. #2063
    Join Date
    Aug 2008
    Beans
    67

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by andrew.46 View Post
    Looks like there is some unhappiness with your dimensions:

    Code:
    [scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
    [libx264 @ 0x9102240] height not divisible by 2 (1028x739)
    Mind you when I took more attention to such things encoding with x264 demanded that width and height should be divisible by 16 but this is obviously no longer the case. I suspect that you will need to investigate either the scale or the pad filter...
    Yea, thank's, seems you are right. I cropped the height of this test video to 738 by the command:

    Code:
    ffmpeg -i input.avi -vf crop=1028:738:0:0 output.avi
    And then recoded it to mp4 with that command without errors.

    ...Is it possible to do cropping and recoding with one command? What it will look with this example?
    Last edited by rulet; December 25th, 2011 at 02:46 PM.

  4. #2064
    Join Date
    Sep 2006
    Beans
    3,483

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    ...Is it possible to do cropping and recoding with one command?
    Yes.
    Quote Originally Posted by rulet View Post
    What it will look with this example?
    Combining your commands it would look like:
    Code:
    ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -vf crop=1028:738:0:0 output.mp4
    I removed -threads 0 since that is default now.

  5. #2065
    Join Date
    Aug 2008
    Beans
    67

    Re: HOWTO: Install and use the latest FFmpeg and x264

    It gives an error:

    ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -vf crop=1028:738:0:0 output.mp4
    ffmpeg version git-2011-12-04-f88d5df, Copyright (c) 2000-2011 the FFmpeg developers
    built on Dec 4 2011 11:21:47 with gcc 4.6.1
    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
    libavutil 51. 30. 0 / 51. 30. 0
    libavcodec 53. 40. 0 / 53. 40. 0
    libavformat 53. 24. 0 / 53. 24. 0
    libavdevice 53. 4. 0 / 53. 4. 0
    libavfilter 2. 50. 0 / 2. 50. 0
    libswscale 2. 1. 0 / 2. 1. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [avi @ 0xa676ac0] parser not found for codec camtasia, packets or times may be invalid.
    [avi @ 0xa676ac0] parser not found for codec pcm_s16le, packets or times may be invalid.
    Input #0, avi, from 'input.avi':
    Duration: 00:01:04.00, start: 0.000000, bitrate: 743 kb/s
    Stream #0:0: Video: camtasia (tscc / 0x63637374), bgr24, 1028x739, 15 tbr, 15 tbn, 15 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    Incompatible pixel format 'bgr24' for codec 'libx264', auto-selecting format 'yuv420p'
    [buffer @ 0xa67e160] w:1028 h:739 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
    [crop @ 0xa694600] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_crop_0'
    [scale @ 0xa6949a0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
    [crop @ 0xa694600] w:1028 h:739 -> w:1028 h:738
    [libx264 @ 0xa67c240] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
    [libx264 @ 0xa67c240] profile Main, level 3.1
    [libx264 @ 0xa67c240] 264 - core 119 r2106 07efeb4 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:-1:-1 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=29.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [mp4 @ 0xa67bd40] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'
    Output #0, mp4, to 'output.mp4':
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1028x738, q=-1--1, 90k tbn, 15 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, 352 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (camtasia -> libx264)
    Stream #0:1 -> #0:1 (copy)
    Could not write header for output file #0 (incorrect codec parameters ?)
    ... But when I pointing output file as mkv or avi, it recodes. Maybe options, mentioned in this command, incompatible with mp4?
    Last edited by rulet; December 26th, 2011 at 11:26 AM.

  6. #2066
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    525
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rulet View Post
    ... But when I pointing output file as mkv or avi, it recodes. Maybe options, mentioned in this command, incompatible with mp4?
    Code:
    [mp4 @ 0xa67bd40] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'
    -acodec copy is the problem. MP4 doesn't support PCM audio, or at least ffmpeg doesn't like trying to put it in MP4. Compress it with AAC, MP3, or AC3.

  7. #2067
    Join Date
    May 2008
    Beans
    32
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Attempting to use ffmpeg to get video taken by my vid-cam to burn to DVD using the following:
    Code:
    ffmpeg -i MAH00212.MP4 -target ntsc-dvd -s hd1080 -aspect 16:9 ./sandbox/2011-CM.mpg
    ffmpeg version 0.7.2-4:0.7.2-1ubuntu1, Copyright (c) 2000-2011 the Libav developers
      built on Oct  2 2011 15:13:26 with gcc 4.6.1
      configuration: --extra-version='4:0.7.2-1ubuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      WARNING: library configuration mismatch
      avutil      configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
      avcodec     configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
      avformat    configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
      swscale     configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
      postproc    configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
      libavutil    51.  7. 0 / 51.  7. 0
      libavcodec   53.  5. 0 / 53.  5. 0
      libavformat  53.  2. 0 / 53.  2. 0
      libavdevice  53.  0. 0 / 53.  0. 0
      libavfilter   2.  4. 0 /  2.  4. 0
      libswscale    2.  0. 0 /  2.  0. 0
      libpostproc  52.  0. 0 / 52.  0. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MAH00212.MP4':
      Metadata:
        major_brand     : MSNV
        minor_version   : 20054127
        compatible_brands: MSNVmp42isom
        creation_time   : 2011-12-25 14:39:34
      Duration: 00:04:03.26, start: 0.000000, bitrate: 8955 kb/s
        Stream #0.0(und): Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8821 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
        Metadata:
          creation_time   : 2011-12-25 14:39:34
        Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
        Metadata:
          creation_time   : 2011-12-25 14:39:34
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    This results in video and no sound.

    I am assuming the possible "library mismatch" is causing my issue?
    A torn jacket is soon mended; but hard words bruise the heart of a child.
    ~ H. W. Longfellow (1807-1882)

  8. #2068
    Join Date
    Dec 2006
    Beans
    6,926

    Re: HOWTO: Install and use the latest FFmpeg and x264

    When you use '-target ntsc-dvd' by default FFmpeg tries to use mpeg2video video and ac3 sound, looks like the problem might be more likely the conversion to ac3 sound. The 'library mismatch' and 'auto-selecting format 'flt'' warnings are both red herrings, you need to give the rest of the terminal output which unfortunately has been snipped .
    You think that's air you're breathing now?

  9. #2069
    Join Date
    Dec 2011
    Beans
    1

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Hi

    I have done everything by the book, but when recording videos from RTSP feed, I get "MOOV ATOM" errors:

    ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264 -b_strategy 2 -flags2 +bpyramid -coder 1 -flags +loop -deblockalpha 0 -deblockbeta 0 -flags2 +wpred -me_method hex -subq 8 -keyint_min 20 -crf 17 -threads 0 -y /tmp/test.mp4

    Some times file is OK and sometimes it's not but there is broken "moov atom":


    root@Vod1:~# ffmpeg -i /tmp/test.mp4
    ffmpeg version N-31684-g6071e4d, Copyright (c) 2000-2011 the FFmpeg developers
    built on Dec 29 2011 09:01:07 with gcc 4.6.1
    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
    libavutil 51. 33.100 / 51. 33.100
    libavcodec 53. 49.100 / 53. 49.100
    libavformat 53. 29.100 / 53. 29.100
    libavdevice 53. 4.100 / 53. 4.100
    libavfilter 2. 55.100 / 2. 55.100
    libswscale 2. 1.100 / 2. 1.100
    libswresample 0. 5.100 / 0. 5.100
    libpostproc 51. 2.100 / 51. 2.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1a3b7e0] moov atom not found
    /tmp/test.mp4: Operation not permitted
    root@Vod1:~#

    root@Vod1:~# x264 -V
    x264 0.120.2120 0c7dab9
    (libswscale 2.1.100)
    (libavformat 53.29.100)
    built on Dec 29 2011, gcc: 4.6.1
    configuration: --bit-depth=8 --chroma-format=all
    x264 license: GPL version 2 or later

    Some times the recording is OK, sometimes it's broken.

    Hope someone can help me with this.

    Cheers,
    Jii
    Last edited by salmjuh; December 30th, 2011 at 12:13 PM. Reason: bug

  10. #2070
    Join Date
    Sep 2006
    Beans
    3,483

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by salmjuh View Post
    Hi

    I have done everything by the book, but when recording videos from RTSP feed, I get "MOOV ATOM" errors:

    Code:
    ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264   -b_strategy 2 -flags2 +bpyramid -coder 1 -flags +loop -deblockalpha 0 -deblockbeta 0   -flags2 +wpred -me_method hex -subq 8 -keyint_min 20  -crf 17  -threads 0 -y /tmp/test.mp4
    Some times file is OK and sometimes it's not but there is broken "moov atom".
    Is there a reason that you're not using an encoding preset instead of declaring a bunch of individual options? Example:
    Code:
    ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264 -preset fast -crf 18 output.mp4

Page 207 of 231 FirstFirst ... 107157197205206207208209217 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •