ottieni file avi con codec UMSV per giocare in vlc, o convertire con ffmpeg


2

Ho dei video da telecamere di sicurezza. Il programma viene emesso nell'estensione del file avi. Posso riprodurre il file in Kaffeine (openSUSE 12.3) ma il file non viene riprodotto in vlc - dice che non riproduce file con codec UMSV. È per un cliente e quindi devono essere in grado di riprodurre il file in Windows utilizzando vlc. Così ho pensato di convertire il file usando ffmpeg. Ho aggiornato l'ultimo ffmpeg 2.0.1 di openSUSE.

Quanto segue non funziona.

ffmpeg -i CH01.avi -c:v mpeg4 -c:a copy myavi.avi 
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  6 2013 19:42:08 with gcc 4.7 (SUSE Linux)
  configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  WARNING: library configuration mismatch
  avutil      configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  avcodec     configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  avformat    configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  avdevice    configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  avfilter    configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  avresample  configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  swscale     configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  swresample  configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  postproc    configuration: --shlibdir=/usr/lib --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[avi @ 0x990ccc0] non-interleaved AVI
[avi @ 0x990ccc0] Could not find codec parameters for stream 0 (Video: none (UMSV / 0x56534D55), 352x240): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, avi, from 'CH01.avi':
  Duration: 00:59:58.96, start: 0.000000, bitrate: 845 kb/s
    Stream #0:0: Video: none (UMSV / 0x56534D55), 352x240, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, mono, s16, 64 kb/s
File 'myavi.avi' already exists. Overwrite ? [y/N] y
[buffer @ 0x993da80] Unable to parse option value "-1" as pixel format
    Last message repeated 1 times
[buffer @ 0x993da80] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:0 @ 0x990cbc0] Error applying options to the filter. 

qualsiasi aiuto per farlo funzionare in VLC sarebbe apprezzato. L'idea è che dovrebbe "giocare" per il cliente senza dover scaricare nulla. Grazie per il tuo tempo e la tua attenzione.

Potrebbe essere necessaria una riga "filter format" davanti all'argomento di input. Non ne so molto.


Non ho un breve campione. Ho solo un file da 365 mb. Ho provato a fare un campionamento usando ffmpeg -i CH01.avi -c: v copy -t 00:01:00 myavi.avi. Non ha funzionato - produrrebbe solo un file audio senza video - come si vede in Kaffeine. Questo è lontano da un caso di omicidio :). Vedo speranza in quanto Kaffeine riconosce il codec ...
Craig

Il campione sarebbe comunque apprezzato (anche se è grande e se non è troppo disturbo per te) per ottenere che questo sia correttamente supportato in ffmpeg.
llogan

Attualmente sto caricando su Dropbox ... ma sembra molto lento.48 minuti. Inoltre, la mia soluzione non funziona ancora abbastanza. L'ho provato in vlc per linux ... che funziona perfettamente. Vlc per Windows mostra una cornice grigia ogni 3 secondi circa. Non so perché sarebbe diverso, ma ci si aspetta visto che in realtà è un codec proprietario e non h264. Tuttavia, ho scoperto che il cliente sta effettivamente usando un mac, non ho avuto risposta da lui se ha funzionato sul suo Mac o no. Una volta terminato il caricamento, pubblicherò un link.
Craig


1
Questo è ora un bug # 3046 . Puoi fornire alcuni dettagli sul file; compreso cosa ha creato il file?
llogan

Risposte:


4

da LordNeckbeard sono stato in grado di indovinare che avrei potuto forzare un codec video specificandolo prima del file di input. Ho provato l'ovvio codec mpeg2video. Non ha funzionato, quindi rawvideo. Lavorato visualizzando, beh, rawvideo. Alla fine ho provato h264. Questo ha fatto il trucco. quindi la linea di lavoro era la seguente

ffmpeg -c:v h264 -i CH01.avi -c:v copy myavi.avi

Grazie per tutto il tuo aiuto Lord Neckbeard.

MODIFICARE in Windows-VLC mostra cornici grigie ogni 3 secondi circa. Questo è risolto con uno di questi due:

ffmpeg -c:v h264 -i CH01.avi -c:v h264 myavi.avi

o

ffmpeg -c:v h264 -i CH01.avi -c:v mpeg4 myavi.avi
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.