Error while opening encoder for output stream #0:0 - ffmpeg

I can't play a video using clipbucket after installation, getting conversion status as completed but while playing the video I get an message as "not available"
Conversion file
Checking File ....
File : /var/www/html/files/conversion_queue/14958856828d300.mp4
File Exists : Yes
Preparing file...
format : mov,mp4,m4a,3gp,3g2,mj2
duration : 62.09
size : 4480694
bitrate : 577316
video_width : 640
video_height : 360
video_wh_ratio : 1.7777777777778
video_codec : h264
video_rate : 23.976023976024
video_bitrate : 479302
video_color : N/A
audio_codec : aac
audio_bitrate : 95999
audio_rate : 44100
audio_channels : 2
path : /var/www/html/files/conversion_queue/14958856828d300.mp4
rotation : 0
======Converting Video=========
Starting : Thumbs Generation
=======Low Resolution Conversion=======
Sarting : Generating Low resolution video # 2017-05-27 17:18:11
Converting Video SD File
Command : /usr/local/bin/ffmpeg -i /var/www/html/files/conversion_queue/14958856828d300.mp4 -vcodec flv -acodec libmp3lame -s 640x360 -preset medium -f mp4 -b:v 512000 -minrate 512000 -maxrate 512000 -b:a 128000 -minrate 128000 -maxrate 128000 -r 25 -ar 22050 /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4
ffmpeg output : ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/files/conversion_queue/14958856828d300.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-03-17 10:27:42
Duration: 00:01:02.09, start: 0.000000, bitrate: 577 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 479 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:27:42
handler_name : IsoMedia File Produced by Google, 5-11-2011
Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (/var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[flv # 0x2506080] Either both buffer size and max rate or neither must be specified
Output #0, mp4, to '/var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
Stream #0:0(und): Video: flv1, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.26.100 flv
Stream #0:1(eng): Audio: mp3, 0 channels, 128 kb/s (default)
Metadata:
creation_time : 2016-03-17 10:27:42
handler_name : IsoMedia File Produced by Google, 5-11-2011
encoder : Lavc56.26.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Sarting : MP4Box Conversion for SD
MP4Box Command : /usr/local/bin/MP4Box -inter 0.5 /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4 -tmp /var/www/html/files/temp
output : Error opening file /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4: IsoMedia File is truncated
Conversion Status : Successful # 2017-05-27 17:18:11
output_format : mov,mp4,m4a,3gp,3g2,mj2
output_duration : 62.09
output_size : 4480694
output_bitrate : 577316
output_video_width : 640
output_video_height : 360
output_video_wh_ratio : 1.7777777777778
output_video_codec : h264
output_video_rate : 23.976023976024
output_video_bitrate : 479302
output_video_color : N/A
output_audio_codec : aac
output_audio_bitrate : 95999
output_audio_rate : 44100
output_audio_channels : 2
output_path : /var/www/html/files/conversion_queue/14958856828d300.mp4
output_rotation : 0
Time Took : 9.2965 seconds
conversion_status : completed
**Error Messages**
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
output : Error opening file /var/www/html/files/videos/2017/05/27/14958856828d300-sd.mp4: IsoMedia File is truncated

Related

ffmpeg doesn't detect the subtitle format (webvtt) and refuses to copy it

I am trying to re-encode the audio on some video files.
I want to copy the video and subtitles without touching them, however, ffmpeg doesn't detect the format of the subtitle (which is webvtt) and refuses to do anything.
fmpeg -copy_unknown -analyzeduration 2000M -probesize 2000M -i input.mkv -map_metadata 0 -map 0 -c copy -c:a:0 aac -b:a 384k output.mkv
[matroska,webm # 0x5597558e4040] Unknown/unsupported AVCodecID S_TEXT/WEBVTT.
[matroska,webm # 0x5597558e4040] Could not find codec parameters for stream 2 (Subtitle: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'input.mkv':
Metadata:
encoder : libebml v1.3.9 + libmatroska v1.5.2
creation_time : 2020-03-05T09:03:02.000000Z
Duration: 00:56:33.26, start: 0.000000, bitrate: 3597 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 3340067
DURATION-eng : 00:56:33.140000000
NUMBER_OF_FRAMES-eng: 81354
NUMBER_OF_BYTES-eng: 1416664616
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: eac3, 48000 Hz, 5.1, fltp (default)
Metadata:
BPS-eng : 256000
DURATION-eng : 00:56:33.248000000
NUMBER_OF_FRAMES-eng: 106039
NUMBER_OF_BYTES-eng: 108583936
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: none (default)
Metadata:
BPS-eng : 38
DURATION-eng : 00:54:47.388000000
NUMBER_OF_FRAMES-eng: 514
NUMBER_OF_BYTES-eng: 15766
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Stream #0:2 -> #0:2 (copy)
[aac # 0x5597b06ae000] Using a PCE to encode channel layout "5.1(side)"
[matroska # 0x5597b06ab540] Subtitle codec 0 is not supported.
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:1 --
[aac # 0x5597b06ae000] Qavg: -nan
Conversion failed!
VLC shows it as WebVTT and displays the subtitles correctly:
MediaInfo also detects properly as webvtt:
Text
ID : 3
Format : S_TEXT/WEBVTT
Codec ID : S_TEXT/WEBVTT
Duration : 54 min 47 s
Bit rate : 38 b/s
Count of elements : 514
Stream size : 15.4 KiB (0%)
Language : English
Default : Yes
Forced : No
My ffmpeg was built with webvtt:
$ ffmpeg -codecs | grep VTT
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.3.0 (Arch Linux 9.3.0-1)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
DES... webvtt WebVTT subtitle
How can I tell ffmpeg "this is webvtt, just copy it please!"?
EDIT: RESOLVED (thanks #Gyan)
To force the decoder, -c:s webvtt must be set before the input:
fmpeg -analyzeduration 50M -probesize 50M -c:s webvtt -i input.mkv ...

Panasonc GH5 4K 10 Bit 25p (cannot allocate memory)

I am converting GH5 files with the following script. With my Notebook I get no error and it goes through but at my desktop workstation I get this error. Anybody an idea. I convert 4K 10Bit Panasonic GH5 files to AVID HQX files. No error at the notebook but the desktop pc produces this error message. OS is windows 7 just new installed because of this. Same MeGUI and FFMPEG version and development server.
enter code here
D:\Test>for %f in (*.mov) do "C:\Program Files (x86)\MeGUI\tools\ffmpeg\ffmpeg.e
xe" -i "%~f" -c:a pcm_s16le -c:v dnxhd -profile:v dnxhr_hqx "%~nf_test.mov"
D:\Test>"C:\Program Files (x86)\MeGUI\tools\ffmpeg\ffmpeg.exe" -i "P1011064.MOV"
-c:a pcm_s16le -c:v dnxhd -profile:v dnxhr_hqx "P1011064_test.mov"
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --e
nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopu
s --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --ena
ble-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-lib
x264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-z
lib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-c
uvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-l
ibmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[mov,mp4,m4a,3gp,3g2,mj2 # 005a7860] decoding for stream 0 failed
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'P1011064.MOV':
Metadata:
major_brand : qt
minor_version : 537986816
compatible_brands: qt pana
creation_time : 2017-11-19T16:16:23.000000Z
com.panasonic.Semi-Pro.metadata.xml: <?xml version="1.0" encoding="UTF-8" st
andalone="no" ?>
: <ClipMain xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst
ance" xmlns="urn:schemas-Professional-Plug-in:Semi-Pro:ClipMetadata:v1.0">
: <ClipContent>
: <GlobalClipID>060A2B340101010501010D2113000000171BA845
E82C2C3470010E90B8D50052</GlobalClipID>
: <Duration>84</Duration>
: <EditUnit>1/25</EditUnit>
: <EssenceList>
: <Video>
: <Codec BitRate="150">H264_422_LongGOP</Codec>
: <ActiveLine>2160</ActiveLine>
: <ActivePixel>3840</ActivePixel>
: <BitDepth>10</BitDepth>
: <FrameRate>25p</FrameRate>
: <TimecodeType>NonDrop</TimecodeType>
: <StartTimecode>07:12:44:18</StartTimecode>
: </Video>
: <Audio>
: <Channel>2</Channel>
: <SamplingRate>48000</SamplingRate>
: <BitsPerSample>16</BitsPerSample>
: </Audio>
: </EssenceList>
: <ClipMetadata>
: <Rating>0</Rating>
: <Access>
: <CreationDate>2017-11-19T16:16:23+02:00</CreationD
ate>
: <LastUpdateDate>2017-11-19T16:16:23+02:00</LastUpd
ateDate>
: </Access>
: <Device>
: <Manufacturer>Panasonic</Manufacturer>
: <ModelName>DC-GH5</ModelName>
: </Device>
: <Shoot>
: <StartDate>2017-11-19T16:16:23+02:00</StartDate>
: </Shoot>
: </ClipMetadata>
: </ClipContent>
: <UserArea>
: <AcquisitionMetadata xmlns="urn:schemas-Professional-P
lug-in:P2:CameraMetadata:v1.2">
: <CameraUnitMetadata>
: <Gamma>
: <CaptureGamma>CINELIKE_D</CaptureGamma>
: </Gamma>
: <Gamut>
: <CaptureGamut>BT.709</CaptureGamut>
: </Gamut>
: </CameraUnitMetadata>
: </AcquisitionMetadata>
: </UserArea>
: </ClipMain>
:
Duration: 00:00:03.36, start: 0.000000, bitrate: 174710 kb/s
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(
tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 147582 kb/s, 25 fps, 25 tbr, 90k tbn,
50 tbc (default)
Metadata:
creation_time : 2017-11-19T16:16:23.000000Z
timecode : 07:12:44:18
Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s1
6, 1536 kb/s (default)
Metadata:
creation_time : 2017-11-19T16:16:23.000000Z
timecode : 07:12:44:18
Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2017-11-19T16:16:23.000000Z
timecode : 07:12:44:18
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
Stream #0:1 -> #0:1 (pcm_s16be (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[dnxhd # 0542fe60] Cannot allocate memory.
[dnxhd # 04d508a0] ff_frame_thread_encoder_init failed
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
D:\Test>pause
Drücken Sie eine beliebige Taste . . .

FFmpeg Hardware Acceleration with NVENC produces Half Green output video

Using the FFmpeg build found here: https://github.com/illuspas/ffmpeg-hw-win32
gcc 5.3.0
--enable-nvenc nvidia_video_sdk_6.0.1
--enable-libmfx Intel(R)_Media_SDK_2016.0.1
--enable-libfdk-aac 0.1.4
--enable-libspeex 1.2rc1
--enable-libx264 1:148.20150725
--enable-libopenh264 1.5.0
--enable-libx265 1.8
--enable-libopus 1.1.2
--enable-libmp3lame 3.99.5
--enable-libkvazaar 0.8.2
./configure --prefix=/home/aliang/FFmpeg/x86_64 --enable-small --disable-debug --disable-doc --arch=x86_64 --cc='ccache x86_64-w64-mingw32-gcc' --cross-prefix=x86_64-w64-mingw32- --enable-cross-compile --target-os=mingw32 --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libx264 --enable-libx265 --enable-libmfx --enable-nvenc --enable-libopenh264 --enable-libkvazaar --enable-gpl --enable-nonfree
I'm running Windows on a MacBook Pro. I also tried with a more recent build and had the same output.
Input video is from sample-videos.com.
The ffmpeg command I am running is:
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
sample-out-nvenc.mp4 looks like this via ffplay or vlc:
When I grab a frame using jpeg2, the colors appear normal, but the height is squished.
ffmpeg -y -ss 15.5 -i sample.mp4 -vframes 1 -s 480x300 -f image2 grab.jpg
The ffprobe results for the output (sample-out-nvenc.mp4):
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:31.02, start: 0.021333, bitrate: 1994 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 1650 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 342 kb/s (default)
Metadata:
handler_name : SoundHandler
Lastly the output from the nvenc encoding command:
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/home/aliang/FFmpeg/x86_64 --enable-small --disable-debug --disable-doc --arch=x86_64 --cc='ccache x86_64-w64-mingw32-gcc' --cross-prefix=x86_64-w64-mingw32- --enable-cross-compile --target-os=mingw32 --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libx264 --enable-libx265 --enable-libmfx --enable-nvenc --enable-libopenh264 --enable-libkvazaar --enable-gpl --enable-nonfree
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:31.00, start: 0.000000, bitrate: 1353 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 966 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Output #0, mp4, to 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Stream #0:0(und): Video: h264 (nvenc_h264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 2000 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.24.102 nvenc_h264
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1, fltp, 341 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.24.102 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (nvenc_h264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 774 fps=253 q=-0.0 Lsize= 7551kB time=00:00:30.99 bitrate=1995.6kbits/s speed=10.1x
video:6236kB audio:1297kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.243011%
[aac # 000001cdd9900520] Qavg: 743.457
I had exactly the same problem, with a GTX 980. This started after installing driver update 368.22. I downloaded and reverted to driver version 365.19 from the nividia driver archive and the problem went away.
So it appears to affect all nvidia cards and drivers.
I experienced the same problem with nvenc through another usecase. It seems to have been caused by the latest nvidia quadro driver. The problem was resolved when I reverted it. As you have a macbook, I guess it's fair to assume you don't have a quadro card, but it still might be a driver problem.

FFmpeg freezes during conversion

I am trying to run a merge between a mp4 video and a m4a audio files. Several other were generated properly, but this one starts and freezes at time 00:02:54.08. If I stop it (ctrl+c) several minutes afterwards, the output.mp4 file have 0 bytes. I do not have a lot of clues why it happens. Anybody experienced something similar?
[]# ffmpeg -i 91dff482-213e-45f7-84ea-a176f255c118.mp4 -i 91dff482-213e-45f7-84ea-a176f255c118.m4a -c:v copy -strict -2 -c:a aac -b:a 160k output.mp4
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '91dff482-213e-45f7-84ea-a176f255c118.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1iso6mp41
encoder : Lavf56.25.101
Duration: 00:05:00.00, start: 0.133333, bitrate: 30 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 29 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
rotate : 90
handler_name : VideoHandler
Side data:
displaymatrix: rotation of -90.00 degrees
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '91dff482-213e-45f7-84ea-a176f255c118.m4a':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2iso6mp41
encoder : Lavf56.25.101
Duration: 00:05:00.15, start: 0.000000, bitrate: 14 kb/s
Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 13 kb/s (default)
Metadata:
handler_name : SoundHandler
[aac # 0x1b761a0] Too many bits per frame requested, clamping to max
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1iso6mp41
encoder : Lavf56.25.101
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 29 kb/s, 15 fps, 15 tbr, 15360 tbn, 15360 tbc (default)
Metadata:
rotate : 90
handler_name : VideoHandler
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 48 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.26.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 2612 fps= 33 q=-1.0 size= 1568kB time=00:02:54.08 bitrate= 73.8kbits/s
Run
ffmpeg -ss 02:50 -i video -ss 02:50 -i audio -c:v copy -strict -2 -c:a aac -b:a 160k test.mp4.
If this stops after few seconds, there's some anomaly in one of the bitstreams and you'll have to remux one or both of the input files and try again i.e.
ffmpeg -i video -c copy -an newvideo.mp4
ffmpeg -i audio -c copy -vn newaudio.mp4

Changing portrait videos to landscape aspect with latest ffmpeg release is breaking

I am having an issue scaling videos recorded in portrait with the latest version of ffmpeg (2.1). This worked fine in a previous version, but I need the lastest version to fix a different issue.
I am trying to take any video passed and make it 852 wide by 480 high. It works fine when converting videos that are wider then tall, but when the video is taller then wide it corrupts the video. It actually adds a letter box to the top and bottom, rather then left and right. Also, the meta data shows it as the correct height & width, but its wrong when played in windows.
Here are the parameters I am using.
ffmpeg -i INPUT -s 852x480 -r 30 -aspect 1.775 -b:v 2000000 -vcodec mpeg4 -vf "scale=iw*min(852/iw\,480 /ih):ih*min(852/iw\,480 /ih),pad=852:480 :(852-iw)/2:(480 -ih)/2" -ac 2 -b:a 128k -ar 44100 -y OUTPUT
Console output from ffmpeg -i INPUT -r 30 -b:v 2000000 -vcodec mpeg4 -vf "scale=852:480" -ac 2 -b:a 128k -ar 44100 -y OUTPUT:
C:\Lib>ffmpeg -i "d\ca96cd13-2995-4794-b753-22be3b918659.mov" -r 30 -b:v 2000000 -vcodec mpeg4 -vf "
scale=852:480" -ac 2 -b:a 128k -ar 44100 -y "d\portx.mp4"
ffmpeg version N-58015-g8cdf4e0 Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 10 2013 18:04:45 with gcc 4.8.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32thread
s --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-icon
v --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr -
-enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enab
le-libxavs --enable-libxvid --enable-zlib
libavutil 52. 52.100 / 52. 52.100
libavcodec 55. 41.100 / 55. 41.100
libavformat 55. 21.100 / 55. 21.100
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.102 / 3. 90.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd\ca96cd13-2995-4794-b753-22be3b918659.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2013-11-12 15:02:21
model : iPhone 5
model-eng : iPhone 5
encoder : 7.0.2
encoder-eng : 7.0.2
date : 2013-11-12T10:02:21-0500
date-eng : 2013-11-12T10:02:21-0500
make : Apple
make-eng : Apple
Duration: 00:00:15.48, start: 0.000000, bitrate: 780 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 7
05 kb/s, 29.98 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2013-11-12 15:02:21
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
Metadata:
creation_time : 2013-11-12 15:02:21
handler_name : Core Media Data Handler
Output #0, mp4, to 'd\portx.mp4':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
make-eng : Apple
model : iPhone 5
model-eng : iPhone 5
make : Apple
encoder-eng : 7.0.2
date : 2013-11-12T10:02:21-0500
date-eng : 2013-11-12T10:02:21-0500
encoder : Lavf55.21.100
Stream #0:0(und): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 852x480, q=2-31, 2000 kb/s, 15360
tbn, 30 tbc (default)
Metadata:
rotate : 90
creation_time : 2013-11-12 15:02:21
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128
kb/s (default)
Metadata:
creation_time : 2013-11-12 15:02:21
handler_name : Core Media Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
Press [q] to stop, [?] for help
frame= 465 fps=417 q=3.8 Lsize= 4118kB time=00:00:15.52 bitrate=2173.3kbits/s
video:3860kB audio:243kB subtitle:0 global headers:0kB muxing overhead 0.348231%
Try this:
ffmpeg -i input -filter:v "scale='w=min(720,trunc((480*33/40*dar)/2+0.5)*2):h=min(480,trunc((704*40/33/dar)/2+0.5)*2)',pad='w=720:h=480:x=(ow-iw)/2:y=(oh-ih)/2',setsar='r=40/33'" -target ntsc-dvd output

Resources