Sie sind nicht angemeldet.

1

26.01.2015, 19:47

ffmpeg Error while opening encoder

Hi,

Ich konvertiere aktuell ein paar Dateien nach h265 um platz zu sparen :). Das funktioniert soweit auch gut, nur die eine Datei fehlert mit:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
ffmpeg version 2.2.11 Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec 19 2014 11:38:55 with gcc 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=core-avx-i' --extra-cflags='-O2 -pipe -march=core-avx-i' --extra-cxxflags='-O2 -pipe -march=core-avx-i' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --disable-vaapi --enable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --enable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-mmxext --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --cpu=core-avx-i
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xe42900] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tvp-continuum-s01e10-1080p.mkv':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : HandBrake 0.10.0 2014112200
    title           : Der Anschlag
    artist          : Rachel Nichols, Victor Webster, Erik Knudsen, Stephen Lobo, Roger Cross, Lexa Doig, Tony Amendola, Omari Newton, Luvia Petersen, Jennifer Spence, Brian Markinson
    date            : 2012
    track           : 10/10
    genre           : Sci-Fi, Thriller
    show            : Continuum
    season_number   : 1
    episode_id      : 10-01
    episode_sort    : 10
  Duration: 00:42:07.21, start: 0.080000, bitrate: 4125 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2799 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(deu): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 657 kb/s (default)
    Metadata:
      handler_name    : Surround
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 658 kb/s
    Metadata:
      handler_name    : Surround
    Stream #0:3: Video: png, rgba, 480x660, 90k tbr, 90k tbn, 90k tbc
x265 [info]: HEVC encoder version 1.4
x265 [info]: build info [Linux][GCC 4.8.3][64 bit] 16bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [error]: Sample Aspect Ratio width must be greater than 0
[libx265 @ 0xf0c230] Cannot open libx265 encoder.
Output #0, matroska, to 'e10.mkv':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : HandBrake 0.10.0 2014112200
    title           : Der Anschlag
    artist          : Rachel Nichols, Victor Webster, Erik Knudsen, Stephen Lobo, Roger Cross, Lexa Doig, Tony Amendola, Omari Newton, Luvia Petersen, Jennifer Spence, Brian Markinson
    date            : 2012
    track           : 10/10
    genre           : Sci-Fi, Thriller
    show            : Continuum
    season_number   : 1
    episode_id      : 10-01
    episode_sort    : 10
    Stream #0:0(und): Video: hevc, yuv420p, 1280x720, q=2-31, 200 kb/s, 90k tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(deu): Audio: ac3, 48000 Hz, 5.1, fltp (default)
    Metadata:
      handler_name    : Surround
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1, fltp
    Metadata:
      handler_name    : Surround
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx265)
  Stream #0:1 -> #0:1 (aac -> ac3)
  Stream #0:2 -> #0:2 (aac -> ac3)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!


Ich habe nen h264 encoder (ich kann die datei auch wiedergeben). Den einzigen Unterschied den ich gefunden habe zu den anderen Dateien die ich bisher konvertiert habe ist:

Funktioniert: Codec ID : V_MPEG4/ISO/AVC
Funktioniert nicht: Codec ID : avc1

Die Info hab ich von mediainfo.

Ich versteh nicht ganz was ich brauche, bzw. was mein problem ist, über hilfe wäre ich dankbar!

Danke!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Thorus« (31.01.2015, 12:00)


2

27.01.2015, 12:40

Tach zosamme.

Brauchst Du unbedingt FFMPEG ?
Vielleicht kannst Du das selbe mit mencoder erreichen ?

Wenn es unbedingt FFMPEG (sprich LibAV) sein muss, dann
vesuch es langsam heranzutasten mit avprobe und avplay

Evtl Du kannst auch selbst ein einfaches Decoder-Encoder-Transcoder kompilieren.
https://libav.org/doxygen/release/0.8/li…8c-example.html
https://ffmpeg.org/doxygen/trunk/api-example_8c-source.html
Kompilieren geht ungefär so

Quellcode

1
 gcc -o avcodec_decoding_encoding_8c avcodec_decoding_encoding_8c.c  -lavformat -lavcodec -lavutil -lswscale -lz -lbz2  -lavresample -I/usr/local/include/ -L/usr/local/lib/ -lm -lpthread
Ich kann media-video/libav nicht emerge-n , deswegen hab es manuell unter /usr/local/ installiert.
https://libav.org/download.html
Libav 11 "One Louder" 11.2 was released on 2015-01-17.
Vielleicht kannst Du Dein Der Anschlag mit Libav 11.2 konvertieren ?
Angeblich FFMPEG nutzt ein Fork von LibAV .

Quellcode

1
2
3
4
5
6
7
8
eix libav
* media-video/libav
     Available versions:  
	(0/0.8)	0.8.7 **0.8.9999
	(0/9)	(~)9.7 **9.9999 **9999^t
	{{(+)3dnow (+)3dnowext X aac alsa altivec amr avx bindist +bzip2 cdio cpudetection custom-cflags debug dirac doc +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k (+)mmx (+)mmxext mp3 neon network openssl opus oss pic pulseaudio +qt-faststart rtmp schroedinger sdl speex ssl (+)ssse3 static-libs test theora threads tools truetype v4l vaapi vdpau vis vorbis vpx x264 xvid +zlib}}
     Homepage:            http://libav.org/
     Description:         Complete solution to record, convert and stream audio and video.


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
emerge media-video/libav

 * IMPORTANT: 4 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

 * Last emerge --sync was 1y 212d 1h 9m 24s ago.
Calculating dependencies... done!
[ebuild  N    ~] media-video/libav-9.7  USE="X aac alsa amr bzip2 encode faac gpl hardcoded-tables jack jpeg2k mmx mmxext mp3 oss sdl speex ssl theora threads truetype v4l vaapi vorbis x264 xvid zlib -3dnow -3dnowext (-altivec) -avx -bindist -cdio -cpudetection -custom-cflags -debug -doc -fdk -frei0r -gsm -ieee1394 (-neon) -network -openssl -opus -pic -pulseaudio -rtmp -schroedinger -ssse3 -static-libs {-test} -tools -vdpau (-vis) -vpx" 
[blocks B      ] media-video/ffmpeg ("media-video/ffmpeg" is blocking media-video/libav-9.7)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (media-video/libav-9.7::gentoo, ebuild scheduled for merge) pulled in by
    media-video/libav
    >=media-video/libav-0.8.4[X,encode,jpeg2k,mp3,sdl,speex,theora,threads,truetype,vaapi,x264] required by (virtual/ffmpeg-0.10.3::gentoo, installed)

  (media-video/ffmpeg-1.0.7::gentoo, installed) pulled in by
    media-video/ffmpeg required by (media-libs/xine-lib-1.2.2::gentoo, installed)
    >=media-video/ffmpeg-0.10.3[X,encode,jpeg2k,mp3,sdl,speex,theora,threads,truetype,vaapi,x264] required by (virtual/ffmpeg-0.10.3::gentoo, installed)
    media-video/ffmpeg required by (media-plugins/gst-plugins-ffmpeg-0.10.13_p201211::gentoo, installed)
    media-video/ffmpeg required by (media-video/vlc-2.0.5::gentoo, installed)


For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked



Mach et joot.

3

27.01.2015, 19:03

Hi,

In ffmpeg hab ich mich halt schon n bisschen eingearbeitet, von daher wäre es schon schön es in ffmpeg zu können.

Wie würde der Befehl den in mencoder aussehen?

Quellcode

1
ffmpeg -i input.mkv -vcodec hevc -x265-params crf=28 -sn -acodec ac3 -map 0:0 -map 0:1 -map 0:2 output.mkv


avplay und avprobe habe ich nicht, in welchem ebuild ist das drin?

libav wird bei mir auch von ffmpeg blockiert, und es selbst zu kompilieren möchte ich nicht.

Danke für die Hilfe!

4

27.01.2015, 20:36

Daach zosamme.

Hast Du Windoze ? Ich hab Proram SUPER (2008) installiert
http://www.videohelp.com/tools/SUPER
und mit ProcessExplorer http://www.chip.de/downloads/Process-Explorer_12996492.html
wårend des Encoding-prozesses eigentliche kommando-Zeile entlockt.
Dann kommandozeile (fast) alles 1:1 funzt unter Linux.
Seit 2008 ich habe nix neues versucht.

Vielleicht gibt es so was auch fuer Linux. http://www.videohelp.com/tools/sections/linux-video-tools

Meine SD Mpeg's hab ungefår so konvertiert.
Viellecht Du muss an vbitrate=800 rum fummeln und aspect=16/9 setzen.
Bin aber nicht sicher.
RTFM

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# DSF
# \_ /usr/bin/mencoder -v -o /mnt/hda2/kino/sport.mpg.avi -oac copy -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:keyint=100:dia=1 /mnt/hda2/kino/sport.mpg

# /usr/bin/mencoder -v -o /mnt/hda2/kino/sport.mpg.avi -oac copy -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:keyint=100:dia=1:aspect=1/1 /mnt/hda2/kino/sport.mpg

# /usr/bin/mencoder -v -o /mnt/hda2/kino/sport.mpg.avi -oac copy -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:keyint=100:dia=1:aspect=1/1 /mnt/hda2/kino/sport.mpg

#/usr/bin/mencoder -v  -o $aus_datei  -oac copy -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:keyint=100:dia=1:aspect=4/3 $1

# Zeilenweise Ausgabe aller Aufrufparameter:

prm_skaits=$#
echo "prm_skaits = $prm_skaits"
echo ====
i=1
while [ $i -le $prm_skaits ]
do
        aus_datei=$1.xvid
        echo "MPEG DATEI nr $i"
	echo $1
	echo $aus_datei
#/usr/bin/mencoder -v  -o $aus_datei  -oac copy -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800:keyint=100:dia=6:mbd=1:v4mv:aspect=4/3 $1
#/usr/bin/mencoder -v  -o $aus_datei  -oac copy -ovc lavc -lavcopts vcodec=wmv2:vqscale=5:keyint=100:dia=6:mbd=1:aspect=4/3 $1
 /usr/bin/mencoder -v  -o $aus_datei  -oac copy -ovc xvid -xvidencopts fixed_quant=5:max_key_interval=100:vhq=4:par=pal43:aspect=4/3 $1
        i=`expr $i + 1`
	shift   # mit shift werden die Parameter nach
                # Links geshiftet (aus $2 wird $1)
done

Quellcode

1
2
3
C:\Dokumente und Einstellungen\grabba>C:\Programme\MPlayer-1.0rc2\mencoder.exe
-v -oac mp3lame -lameopts cbr:preset=64:mode=3 -srate 48000 -af resample=48000:0:1,channels=1  -vf scale=512:288,harddup -of avi -ovc xvid -xvidencopts vhq=4:bvhq=1:hq_ac:quant_type=mpeg:chroma_opt:bitrate=420:max_key_interval=250:nointerlacing:max_bframes=2 -ofps 25 -ffourcc XVID
  N:\kino\TrickMagie-2009-05-05.mpg  -o N:\kino\TrickMagie-2009-05-05.mpg.xvid


Mach et joot.

5

27.01.2015, 20:46

P.S.

Nix ebuild, wenn Du hast schon emerged FFMpeg .
avplay und avprobe bekommst Du so :
https://libav.org/download.html
wget https://libav.org/releases/libav-11.2.tar.gz
unzip

Quellcode

1
2
3
4
cd libav-11.2
./configure --prefix=/usr/local(oder-sonst-wat)
make
make install

Su einfach es et.

Mach et joot

6

31.01.2015, 12:00

Hi,

Konnte es jetzt lösen:

x265 [error]: Sample Aspect Ratio width must be greater than 0

Ist ein bug in ffmpeg (https://trac.ffmpeg.org/ticket/3502) welcher bereits gefixed wurde, oder als workaround einfach -aspect x:y setzen.