Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ffmpeg and corrupt file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Fri Feb 13, 2015 7:57 pm    Post subject: ffmpeg and corrupt file Reply with quote

the file in question should be corrupt but i can play good with vlc
Code:

ffmpeg -ss 10000 -i 2991348_1800.mp4 -target pal-dv -aspect 16:9 p2.dv
...
Error while decoding stream #0:0: Operation not permitted
[h264 @ 0x12608c0] AVC: nal size 0
[h264 @ 0x12608c0] no frame!
...


i need recover or override the issue.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Feb 13, 2015 8:09 pm    Post subject: Reply with quote

well when vlc can play it means the data is still there.

did you run vlc in console mode and check how it is played? which codec and such?

there are so many codecs and how they are saved in the containers.

I suppose you assume the data is defect but when it is playable i highly doubt.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Sat Feb 14, 2015 1:10 pm    Post subject: Reply with quote

i have this on start
Code:

m@localhost ~ $ vlc -v /mnt/work/det2/2991348_1800.mp4
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x2471118] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x2541cd8] qt4 interface error: Unable to load extensions module
[0x7f4540c015d8] mp4 stream warning: unknown box type btrt (incompletely loaded)
[0x7f4540c01828] mp4 demux warning: CTTS table
[h264 @ 0x7f45414bd380] Warning: not compiled with thread support, using thread emulation
[aac @ 0x7f4541566910] Warning: not compiled with thread support, using thread emulation
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x251de18] alsa audio output warning: device cannot be paused
[0x7f452c001248] main vout display error: Failed to resize display

and at a certain point this
Code:

...
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[h264 @ 0x7f2b094bd380] AVC: nal size 0
[h264 @ 0x7f2b094bd380] no frame!
[aac @ 0x7f2b09566910] channel element 0.0 is not allocated
...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Feb 14, 2015 4:34 pm    Post subject: Reply with quote

vlc can re-record (or convert) what it plays (hit ctrl+r)
so you can have vlc play what it can and record it to get a non-corrupt file with what was readable of the corrupt file.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Feb 14, 2015 4:53 pm    Post subject: Reply with quote

You could try "ffplay -strict ignore_err /mnt/work/det2/2991348_1800.mp4". If that works then the standard ffmpeg command should work with ignore_err too.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Sat Feb 14, 2015 6:23 pm    Post subject: Reply with quote

i no have ffplay installed and in portage too, strange.
Code:

m@localhost /mnt/work/det2 $ ffmpeg -strict ignore_err -i 2991348_1800.mp4 -target pal-dv -aspect 16:9 p2.dv
ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb  5 2015 14:47:48 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 -march=native' --extra-cflags='-O2 -march=native' --extra-cxxflags='-O2 -march=native' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-indev=oss --disable-outdev=oss --disable-outdev=sdl --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --enable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --disable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --disable-libtheora --enable-libtwolame --disable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --ena  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[NULL @ 0x1bd5920] [Eval @ 0x7fffc7e26910] Undefined constant or missing '(' in 'ignore_err'
[NULL @ 0x1bd5920] Unable to parse option value "ignore_err"
[NULL @ 0x1bd5920] Error setting option strict to value ignore_err.
[NULL @ 0x1bd65f0] [Eval @ 0x7fffc7e26910] Undefined constant or missing '(' in 'ignore_err'
[NULL @ 0x1bd65f0] Unable to parse option value "ignore_err"
[NULL @ 0x1bd65f0] Error setting option strict to value ignore_err.
[h264 @ 0x1bd5920] Warning: not compiled with thread support, using thread emulation
[aac @ 0x1bd65f0] Warning: not compiled with thread support, using thread emulation
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2991348_1800.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2014-09-18 16:19:18
  Duration: 01:36:40.07, start: 0.000000, bitrate: 1898 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 1800 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 93 kb/s
    Metadata:
      creation_time   : 2014-09-18 16:19:18
      handler_name    : GPAC ISO Audio Handler
[dvvideo @ 0x1bd7dd0] Warning: not compiled with thread support, using thread emulation
[pcm_s16le @ 0x1bd89e0] Warning: not compiled with thread support, using thread emulation
[NULL @ 0x1bd5920] [Eval @ 0x7fffc7e22cc0] Undefined constant or missing '(' in 'ignore_err'
[NULL @ 0x1bd5920] Unable to parse option value "ignore_err"
[NULL @ 0x1bd5920] Error setting option strict to value ignore_err.
Output #0, dv, to 'p2.dv':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    Stream #0:0(und): Video: dvvideo, yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      creation_time   : 2014-09-18 16:19:18
      handler_name    : GPAC ISO Audio Handler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> dvvideo)
  Stream #0:1 -> #0:1 (aac -> pcm_s16le)
Error while opening decoder for input stream #0:0


krinn i will test your solution later, if this doesn' t work.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Feb 14, 2015 7:37 pm    Post subject: Reply with quote

You may have better luck with a non-ancient version of ffmpeg. The latest is 2.5.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Sun Feb 15, 2015 1:16 pm    Post subject: Reply with quote

my portage updated give me only this version
Code:

*  media-video/ffmpeg
      Latest version available: 1.2.6-r1
      Latest version installed: 1.2.6-r1
      Size of files: 5,831 KiB
      Homepage:      http://ffmpeg.org/
      Description:   Complete solution to record, convert and stream audio and video. Includes libavcodec
      License:       GPL-2 amr? ( GPL-3 ) encode? ( aac? ( GPL-3 ) )

why?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Feb 15, 2015 5:17 pm    Post subject: Reply with quote

Code:
 ~ $ cave show media-video/ffmpeg::gentoo
* media-video/ffmpeg::gentoo
    ::gentoo                  0.10.15(~) {:0.10} 1.0.10(~) 1.2.6-r1 1.2.11(~) {:0} 2.2.12(~) {:0/52.55.55} 2.5.3(~)* (9999)K {:0/54.56.56}
    media-video/ffmpeg-2.5.3:0::gentoo (world)
    Description               Complete solution to record, convert and stream audio and video. Includes libavcodec
    Homepage                  http://ffmpeg.org/
    Herds                     video
    Maintainers               <media-video@gentoo.org>

It looks like you've fallen into the "stable trap". It's good iff you want to install other ancient media players, not so good if you want the last two years of bugfixes.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Sun Feb 15, 2015 8:40 pm    Post subject: Reply with quote

what is precisely this stable trap?
Code:

m@localhost ~ $ eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/gnome/systemd
  [6]   default/linux/amd64/13.0/desktop/kde
  [7]   default/linux/amd64/13.0/desktop/kde/systemd
  [8]   default/linux/amd64/13.0/developer
  [9]   default/linux/amd64/13.0/no-emul-linux-x86
  [10]  default/linux/amd64/13.0/no-emul-linux-x86/desktop
  [11]  default/linux/amd64/13.0/no-emul-linux-x86/desktop/gnome
  [12]  default/linux/amd64/13.0/no-emul-linux-x86/desktop/gnome/systemd
  [13]  default/linux/amd64/13.0/no-emul-linux-x86/desktop/kde
  [14]  default/linux/amd64/13.0/no-emul-linux-x86/desktop/kde/systemd
  [15]  default/linux/amd64/13.0/no-emul-linux-x86/developer
  [16]  default/linux/amd64/13.0/no-emul-linux-x86/selinux
  [17]  default/linux/amd64/13.0/no-multilib *
  [18]  default/linux/amd64/13.0/x32
  [19]  hardened/linux/amd64
  [20]  hardened/linux/amd64/selinux
  [21]  hardened/linux/amd64/no-multilib
  [22]  hardened/linux/amd64/no-multilib/selinux
  [23]  hardened/linux/amd64/x32
  [24]  hardened/linux/musl/amd64
  [25]  default/linux/uclibc/amd64
  [26]  hardened/linux/uclibc/amd64

i understand i have an ubnormal world, older than the normal.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Wed Feb 18, 2015 9:32 am    Post subject: Reply with quote

i have installed the 2.5 version but i have the same problem
Code:


m@localhost /mnt/work/det2 $ ffmpeg -strict ignore_err -i 2991348_1800.mp4 -target pal-dv -aspect:9 p2.dv
ffmpeg version 2.5.4 Copyright (c) 2000-2015 the FFmpeg developers
  built on Feb 17 2015 21:38:07 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 nable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu---optflags='-O2 -march=native' --extra-cflags='-O2 -march=native' --extra-cxxflags='-O2 -march=nae' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disabltripping --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disaboutdev=oss --disable-outdev=sdl --enable-bzlib --disable-runtime-cpudetect --disable-debug --disa-doc --enable-gnutls --enable-hardcoded-tables --enable-iconv --disable-lzma --enable-network --dble-openssl --disable-libsmbclient --disable-ffplay --disable-vaapi --disable-vdpau --enable-xlibdisable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --enable-libvo-aacenc -sable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libtheo--enable-libtwolame --enable-libwavpack --disable-libwebp --disable-libx264 --disable-libx265 --ele-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --enableenal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libbs2b --dile-libflite --disable-frei0r --disable-libfribidi --enable-fontconfig --disable-ladspa --disable-ass --enable-libfreetype --disable-libsoxr --disable-pthreads --disable-libopencore-amrwb --disablibopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libceltdisable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disablibrtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --disablebvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disabvfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altive-disable-amd3dnow --disable-amd3dnowext --disable-avx --disable-avx2 --disable-fma3 --disable-fma-disable-mmxext --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop --cpust
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  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
[NULL @ 0x1995150] [Eval @ 0x7fffea0cac40] Undefined constant or missing '(' in 'ignore_err'
[NULL @ 0x1995150] Unable to parse option value "ignore_err"
[NULL @ 0x1995150] Error setting option strict to value ignore_err.
2991348_1800.mp4: Invalid argument
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 562

PostPosted: Wed Feb 18, 2015 10:32 am    Post subject: Reply with quote

FFmpeg Codecs Documentation:
Quote:
-err_detect ignore_err
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Thu Feb 19, 2015 12:41 pm    Post subject: Reply with quote

it doesn' t work yet
Code:

Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x1b22770] AVC: nal size 0
[h264 @ 0x1b22770] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x1b22770] AVC: nal size 0
[h264 @ 0x1b22770] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x1b22770] AVC: nal size 0
[h264 @ 0x1b22770] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x1b22d60] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x1b22770] AVC: nal size 0
[h264 @ 0x1b22770] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
frame=39839 fps= 43 q=0.0 Lsize= 2819531kB time=00:26:33.63 bitrate=14493.7kbits/s dup=19787 drop=0   
video:5602359kB audio:150396kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Received signal 2: terminating.
m@localhost /mnt/work/det2 $
Back to top
View user's profile Send private message
lagalopex
Guru
Guru


Joined: 16 Oct 2004
Posts: 562

PostPosted: Thu Feb 19, 2015 2:33 pm    Post subject: Reply with quote

ev56o wrote:
it doesn' t work yet
Code:

frame=39839 fps= 43 q=0.0 Lsize= 2819531kB time=00:26:33.63 bitrate=14493.7kbits/s dup=19787 drop=0   
video:5602359kB audio:150396kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Received signal 2: terminating.
m@localhost /mnt/work/det2 $


You processed 26 minutes and canceled ffmpeg? Why?

Do you know when the corruption is? Cut it, to just keep the intact parts?

vlc can play it, so use that one as krinn already mentioned.
Back to top
View user's profile Send private message
ev56o
Apprentice
Apprentice


Joined: 26 Jan 2010
Posts: 180

PostPosted: Thu Feb 19, 2015 7:35 pm    Post subject: Reply with quote

i keep krinn solution at last resort
i killed ffmpeg because the destination file was stop to grow (as length in bytes) and the output messages doesn' t promise nothing good, if you think i' m wrong i can retry with no stop.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum