LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-27-2017, 09:40 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Rep: Reputation: 40
ffmpeg : mp4 conversion - no video in output file


Hello,
i have a few files downloaded from youtube as mp4. They play just fine in vlc.
I'd like to convert them either into avi or mkv. And my naive attempts to leverage ffmpeg have failed.

in all attempts i get an audio track in a fil, but no video.
Please advise what am doing wrong.

Thank you
Code:
ffmpeg -i '2015%20Rhythmic%20Worlds,%20Stuttgart%20(GER)%20-%20Highlights%204,%20All-Around%20Final%20(group%20A).mp4'  out.aviffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.1 (GCC) 20161221 (Red Hat 6.3.1-1)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-avfilter --enable-avresample --enable-bzlib --enable-cuda --enable-cuvid --enable-libnpp --enable-doc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libkvazaar --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libzvbi --enable-lzma --enable-nonfree --enable-openal --enable-opencl --enable-nvenc --enable-opengl --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --enable-version3 --enable-x11grab --enable-xlib --enable-zlib --extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda' --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2015%20Rhythmic%20Worlds,%20Stuttgart%20(GER)%20-%20Highlights%204,%20All-Around%20Final%20(group%20A).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1
    creation_time   : 2017-02-28T02:39:23.000000Z
    encoder         : vlc 3.0.0-git stream output
    encoder-eng     : vlc 3.0.0-git stream output
  Duration: 00:26:36.70, start: 0.000000, bitrate: 130 kb/s
    Stream #0:0(eng): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 127 kb/s (default)
    Metadata:
      creation_time   : 2017-02-28T02:39:23.000000Z
      handler_name    : SoundHandler
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1
    ISFT            : Lavf57.56.101
    Stream #0:0(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p (default)
    Metadata:
      creation_time   : 2017-02-28T02:39:23.000000Z
      handler_name    : SoundHandler
      encoder         : Lavc57.64.101 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
size=   26501kB time=00:26:36.69 bitrate= 136.0kbits/s speed=14.4x    
video:0kB audio:24936kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.275330%
to MKV:
Code:
[az@toshiba Desktop]$ ffmpeg -i '2015%20Rhythmic%20Worlds,%20Stuttgart%20(GER)%20-%20Highlights%204,%20All-Around%20Final%20(group%20A).mp4'  out.mkv
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.1 (GCC) 20161221 (Red Hat 6.3.1-1)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-avfilter --enable-avresample --enable-bzlib --enable-cuda --enable-cuvid --enable-libnpp --enable-doc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libkvazaar --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libzvbi --enable-lzma --enable-nonfree --enable-openal --enable-opencl --enable-nvenc --enable-opengl --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --enable-version3 --enable-x11grab --enable-xlib --enable-zlib --extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda' --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2015%20Rhythmic%20Worlds,%20Stuttgart%20(GER)%20-%20Highlights%204,%20All-Around%20Final%20(group%20A).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1
    creation_time   : 2017-02-28T02:39:23.000000Z
    encoder         : vlc 3.0.0-git stream output
    encoder-eng     : vlc 3.0.0-git stream output
  Duration: 00:26:36.70, start: 0.000000, bitrate: 130 kb/s
    Stream #0:0(eng): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 127 kb/s (default)
    Metadata:
      creation_time   : 2017-02-28T02:39:23.000000Z
      handler_name    : SoundHandler
Output #0, matroska, to 'out.mkv':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1
    encoder         : Lavf57.56.101
    Stream #0:0(eng): Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp (default)
    Metadata:
      creation_time   : 2017-02-28T02:39:23.000000Z
      handler_name    : SoundHandler
      encoder         : Lavc57.64.101 libvorbis
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
size=   21911kB time=00:26:36.70 bitrate= 112.4kbits/s speed=17.7x    
video:0kB audio:21092kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 3.884141%
 
Old 02-27-2017, 10:05 PM   #2
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
mmm....
It is difficult to convert something that doesn't exist to begin with...
Of course i can continue trying and one day I might even succeed...

Less excited action, but more pragmatic, is to get sources with video...
 
Old 02-28-2017, 03:06 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
That file name is a mess. It has commas, parenthesis, % chars in it.
Start with a file_name.mp4 FileName.mp4 or similar.
Quote:
I'd like to convert them either into avi or mkv
If all that you want to do is change containers:
Code:
ffmpeg -i file.mp4 -c:a copy -c:v copy file.avi
Depending on what you start with that will probably be h264 video and aac audio.
If you want just the audio from it
Code:
ffmpeg -i file.mp4 -vn -c:a copy file.m4a
If you look, utube vids come in different formats. You can get just the
audio, or the video resolution and size that you want from the start.

From an example:
Code:
format code  extension  resolution note
249          webm       audio only DASH audio   66k , opus @ 50k, 1.32MiB
250          webm       audio only DASH audio   86k , opus @ 70k, 1.73MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.91MiB
171          webm       audio only DASH audio  131k , vorbis@128k, 2.95MiB
251          webm       audio only DASH audio  158k , opus @160k, 3.33MiB
278          webm       256x144    144p  103k , webm container, vp9, 30fps, video only, 2.10MiB
160          mp4        256x144    DASH video  112k , avc1.4d400c, 30fps, video only, 1.53MiB
242          webm       426x240    240p  237k , vp9, 30fps, video only, 3.71MiB
133          mp4        426x240    DASH video  247k , avc1.4d4015, 30fps, video only, 3.34MiB
134          mp4        640x360    DASH video  372k , avc1.4d401e, 30fps, video only, 5.02MiB
243          webm       640x360    360p  432k , vp9, 30fps, video only, 7.04MiB
135          mp4        854x480    DASH video  738k , avc1.4d401f, 30fps, video only, 10.47MiB
244          webm       854x480    480p  762k , vp9, 30fps, video only, 11.88MiB
136          mp4        1280x720   DASH video 1506k , avc1.4d401f, 30fps, video only, 22.58MiB
247          webm       1280x720   720p 1523k , vp9, 30fps, video only, 25.51MiB
248          webm       1920x1080  1080p 2766k , vp9, 30fps, video only, 53.58MiB
137          mp4        1920x1080  DASH video 3834k , avc1.640028, 30fps, video only, 67.39MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
43           webm       640x360    medium , vp8.0,  vorbis@128k
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)
 
1 members found this post helpful.
  


Reply

Tags
ffmpeg; video



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how do i merge mp4 video files using ffmpeg ? dEnDrOn Linux - Software 2 02-04-2012 06:17 AM
magic words wanted ffmpeg avi to mp4 conversion for youtube vtbludgeon Linux - Software 9 06-23-2010 12:07 PM
ffmpeg and mencoder slice mp4 video audio out of sync lindylex Linux - Software 5 01-10-2010 03:26 AM
Trying to convert mp4 animation to dvd video with ffmpeg, unsupported codec? newtovanilla Linux - Newbie 4 12-29-2008 12:10 PM
Green screen after video conversion, AVI to MP4 using Mencoder,Mplayer,FFmpeg,x264, manuken Linux - Newbie 4 10-29-2008 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration