7

I have a set of MP4 files; all of them play with VLC on my Ubuntu box. But when copy them to USB; and want to play them from my TV (Grundig, 28 VLE 5500WG) some work; others do not.There is no specific error message; just something like “unknown file format.”

Mediainfo (working file):

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 368 MiB
Duration                                 : 1h 6mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 770 Kbps

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1h 6mn
Bit rate                                 : 640 Kbps
Width                                    : 720 pixels
Height                                   : 404 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.088
Stream size                              : 306 MiB (83%)
Writing library                          : x264 core 142 r2479 dd79a61
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1h 6mn
Bit rate mode                            : Variable
Bit rate                                 : 124 Kbps
Maximum bit rate                         : 140 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 59.3 MiB (16%)

Mediainfo broken file:

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 269 MiB
Duration                                 : 47mn 22s
Overall bit rate mode                    : Variable
Overall bit rate                         : 793 Kbps
Writing application                      : Stupid Ocelot

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 47mn 22s
Bit rate                                 : 680 Kbps
Width                                    : 720 pixels
Height                                   : 404 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.094
Stream size                              : 231 MiB (86%)
Writing library                          : x264 core 142 r2479 dd79a61
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 47mn 22s
Bit rate mode                            : Variable
Bit rate                                 : 96.0 Kbps
Maximum bit rate                         : 110 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 32.5 MiB (12%)
1
  • Given the info you provided I see no practical difference between these files.
    – llogan
    Mar 29, 2015 at 17:14

2 Answers 2

7

I figured one way that works (not sure if it is optimal). Running

ffmpeg -i broken.mp4 -pix_fmt yuv420p -crf 18 good.mp4

Creates an MP4 that is a bit larger (probably minimally worse in terms of quality) ... and that works on my TV set.

(but I am still looking for other answers, if there are any)

5
  • Does it also work if you simply remux? ffmpeg -i input.mp4 -c copy output.mp4.
    – llogan
    Mar 29, 2015 at 17:14
  • 1
    I tried; and not, that doesn't work. I guess my TV set like whatever the "Stupid Ocelot" encoder is creating.
    – GhostCat
    Mar 29, 2015 at 18:01
  • 2
    Your solution worked for my case too (an Android screen recording, with cyclothymia framerate). I solved it as well by just doing: ffmpeg -i broken.mp4 fixed.mp4, but I guess it's re-encoding, with default settings. Jul 5, 2019 at 23:22
  • 1
    Your solution helped me. I recorded the screen and could play with ffplay and chrome but not with firefox or vlc. This command fixed that. The record command was ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac output.mp4
    – Joshua
    Nov 24, 2020 at 14:43
  • Thanks @joshua your command helped me. My BASH_HISTORY seems to have lost the exact command now but to fix the audio that was not playing on some platforms I did this: ffmpeg -i in.mp4 -f alsa -ac 2 -i pulse -acodec aac out.mp4.
    – NeilG
    Dec 4, 2022 at 1:39
2

Use the following options:

-c:v libx264 -crf 24 -pix_fmt yuv420p -tune film -c:a aac -b:a 192k -ar 44100 -vol 300 -strict -2 -speed fastest

The final result should run smoothly on most TVs.

2
  • This code in shall run video smoothly in any tv Aug 3, 2020 at 6:57
  • Thank you very much for your efforts. Please note: just repeating your claim as comment isn't really helpful. You already said so. Beyond that, remember that your content might sit here for a long time, and many people might look at it. Thus: take a bit more time, to write down something that is really helpful. It starts with proper formatting (maybe learn about the markdown language you can use here to mark stuff). And more importantly: dont just drop "code" on your readers. Take the time to explain what your options do, and why you think your idea is "better" than the other answer!
    – GhostCat
    Aug 3, 2020 at 8:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .