[FFmpeg-user] Help converting .mov and .mp4 to .mp4 and playing in JWPlayer5

Andrew Rietbergen andrew at reflexionsdata.com
Tue Jan 14 17:46:42 CET 2014


Hello,

Thank you for your help.

I am still having difficulty with .mp4 files, from your reply I understood that I should also be re-musing mp4 files into mp4. I have tried using the file as is, (with no ffmpeg command run on it) but in JWPlayer5 and JWPlayer6 I am getting audio, but no video. (Although the video plays fine in Quicktime on my local machine)

I have tried using the -pix_fmt yuv420p flag and without with the same results. The original video is 0:39 and the remuxed video is 0:01 in length. I removed all the size flags.

Please let me know if you have any additional insight.


I have tried to remux with the following command:
/usr/bin/ffmpeg -i '/var/www/vhosts/[SERVER_NAME]/public/htdocs/uploads/Eva_La_Rue.mp4' -codec copy -y   '/var/www/vhosts/[SERVER_NAME]/public/htdocs/uploads/Eva_La_Rue.mp4' 2> '/var/www/vhosts/[SERVER_NAME]/logs/ffmpeg/01-14-2014_11-14-42_mp4.log'

To get the following output:
ffmpeg version git-2013-12-19-a33c7dd Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec 19 2013 17:29:21 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr/bin/ffmpeg_build --extra-cflags=-I/usr/bin/ffmpeg_build/include --extra-ldflags=-L/usr/bin/ffmpeg_build/lib --bindir=/usr/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libtheora
  libavutil      52. 58.101 / 52. 58.101
  libavcodec     55. 45.102 / 55. 45.102
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.100 /  4.  0.100
  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 '/var/www/vhosts/[HOST_NAME]/public/htdocs/uploads/Eva_La_Rue.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42mp41
    creation_time   : 2011-04-22 22:03:56
  Duration: 00:00:39.27, start: 0.000000, bitrate: 1652 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1343 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 1k tbc (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple Video Media Handler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 252 kb/s (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple Sound Media Handler
    Stream #0:2(eng): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple MPEG-4 Scene Media Handler
    Stream #0:3(eng): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple MPEG-4 ODSM Media Handler
    Stream #0:4(eng): Data: none (rtp  / 0x20707472), 14 kb/s
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : hint media handler
    Stream #0:5(eng): Data: none (rtp  / 0x20707472), 34 kb/s
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : hint media handler
Output #0, mp4, to '/var/www/vhosts/[HOST_NAME]/public/htdocs/uploads/Eva_La_Rue.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42mp41
    encoder         : Lavf55.22.100
    Stream #0:0(eng): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1343 kb/s, 29.97 fps, 11988 tbn, 2997 tbc (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple Video Media Handler
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 252 kb/s (default)
    Metadata:
      creation_time   : 2011-04-22 22:03:56
      handler_name    : Apple Sound Media Handler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   16 fps=0.0 q=-1.0 Lsize=     182kB time=00:00:00.51 bitrate=2917.0kbits/s    
video:165kB audio:16kB subtitle:0 global headers:0kB muxing overhead 0.955003%









On Jan 6, 2014, at 2:51 PM, Lou <lou at lrcd.com> wrote:

> On Mon, 6 Jan 2014 09:56:53 -0500
> Andrew Rietbergen <andrew at reflexionsdata.com> wrote:
> 
>> Hello ffmpeg-user,
>> 
>> I'm having some trouble converting some files (.mp4 and .mov) to .mp4 and subsequently trying to play the file with JWPlayer 5. The most common side effect I get is that the file converts and an file is created, but the audio is there, but there is no video. I need some guidance.
>> 
>> Here is the command I am attempting to run some directory names changed:
>> 
>> /usr/bin/ffmpeg -i '/var/www/vhosts/[HOST_NAME]/public/htdocs/uploads/sample.mov' -codec:v libx264rgb -codec:a libfdk_aac -y -s 640x360 -b:v 345k '/var/www/vhosts/[HOST_NAME]/public/htdocs/uploads/sample.mp4' 2> '/var/www/vhosts/[HOST_NAME]/logs/ffmpeg/01-06-2014_09-08-34_mp4.log'
> 
> Why are you using libx264rgb instead of libx264?
> 
> You should add "-movflags +faststart" as an output option so the viewer
> does not need to download the complete file before beginning playback.
> 
> Why are you re-encoding in the first place? Why not just re-mux if you
> want to use mp4 container since your input video and audio should be
> playable by JW Player:
> 
> ffmpeg -i input.mov -codec copy -movflags +faststart output.mp4
> 
> 
>> Stream #0:1(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 192x242, 66 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
> 
> Your input is 192x242, but forcing the size to 640x360 will make it
> look weird.

--
Andrew Rietbergen
Developer

135 Fifth Avenue, Third Floor, New York, NY 10010
Tel: 212-729-1544 x214
http://reflexionsdata.com





More information about the ffmpeg-user mailing list