Hi
Just joined to ask a question regarding some video encoding I'm currently doing. I've been using x264 to encode music videos from TV, previously using the --preset veryslow setting. Recently I decided to change to either medium or slow, however playback of those files seems a bit choppy and jerky. I've researched different settings (bitrates, --tune fastdecode option, hardware decoding) but it never seemed to get any better. While playing with the hardware decoding options of the LAV codec, I noticed that the active decoder was always displaying inactive, so I tried some different things to to make it actually change that status. One of the things I tried was changing the file extension, which is where I'm looking for some input.
Here's the media info from one of the files I've encoded, using --preset medium --crf 25 --tff and a crop filter.
This video plays mostly ok, but the motion isn't smooth. It seems to stutter a bit in panning shots and doesn't look fluid. Audio plays without any problem and CPU usage during playback is very low.Code:General Complete name : Q:\Music Videos\NewClips\VideoClips\MusicVideos\Aaliyah - Try Again.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom File size : 35.7 MiB Duration : 3mn 39s Overall bit rate : 1 366 Kbps Writing application : Lavf54.37.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.0 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 3mn 39s Bit rate : 1 175 Kbps Width : 512 pixels Height : 560 pixels Display aspect ratio : 4:3 Frame rate mode : Constant Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : MBAFF Bits/(Pixel*Frame) : 0.164 Stream size : 30.7 MiB (86%) Writing library : x264 core 128 r2216 198a7ea Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / 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=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=25.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 3mn 39s Bit rate mode : Constant Bit rate : 187 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 4.87 MiB (14%) Menu
However, if I do nothing more than change the file extension from .mp4 to .mpg, the video plays fine. Picture and audio quality are exactly the same as far as I can tell, but the motion is smooth and fluid. I'm not sure I understand why just changing that would make a difference. I suspect that the different extension is triggering a different codec for playback (currently I'm using Shark007 V3.9.3), but I would have thought that the decoder would be selected based on the internal reference on the video stream, rather than the file extension.
I use x264 to produce the video file, and NeroAACEnc for the audio, then FFMpeg to mux them into an MP4 file (using -vcodec copy -acodec copy). Changing this to MPG (or Mpeg) produces files that don't play, as I found that the mpeg container can't contain avc video. Using WMP for playback, and I'm not interested in using an alternative player as that wouldn't suit my needs
Is my best option to make the files as I've been doing and rename them?
Could I use a better container format for the final files (mkv)?
Is this a case where the PC is struggling to decode the files?
Are there other encoder options I can use to make playback better (using --tune fastdecode implements --no-cabac --no-deblocking --no-weightb --weightp 0)
Are there better decoders available that will do a better job?
Any other thoughts?
Simon
+ Reply to Thread
Results 1 to 12 of 12
-
-
You can try disable the WMP built in decoder for mp4 / h264 first. Use preferred filter tweaker.
And this must be a software player issue. How does the mp4 work in VLC (it has built in decoders)? Just to compare with WMP. -
I totally agree with baldrick ... well, he's pretty reliable ... another player would definitely "suit your needs". I'd install both vlc and smplayer. I use the latter for my default video player. If I can't play a file with either of those there's probably something wrong with it.
While I'm not anti Microsoft per se like a lot of linux users, their media software is awful. The only times I've used wmp in years is by accident, in a new install where I forgot to change the file association.
Also, my policy with Nero for years is that nothing with that name is going anywhere near my hard drive. -
Thanks I'll give the tweak tool a go, and failing that will install VLC to see how it performs there
Originally Posted by Hoser Rob), so even if another player can be implemented into my project, I'm not sure I'd have the skills to get it working.
Originally Posted by Hoser Rob -
I use FFMpeg in a batch file as I generally convert upwards of 10 files at a time (often more). When I was using the original veryslow setting, each music video would take around 30 mins to process on my old hardware, so I needed it to run unattended overnight.
I might also try specifying the output of ffmpeg using -f mp4 and using mpg in the file name. That might work too. -
am i the only one that finds it odd that media info reports the resolution as 512x560 with a DAR of 4:3?
-
This is the media info for the source file, which is a recording from a digital broadcast and the individual clip extracted using VideoRedo Plus using default settings (I think, haven't looked at settings for VideoRedo for a long time so I'm not sure if I changed any)
Code:General Complete name : Q:\Music Videos\NewClips\VideoClips\MPEG Store\Aaliyah - Try Again.mpg Format : MPEG-PS File size : 134 MiB Duration : 3mn 39s Overall bit rate mode : Variable Overall bit rate : 5 131 Kbps Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Duration : 3mn 39s Bit rate mode : Variable Bit rate : 4 773 Kbps Maximum bit rate : 10 000 Kbps Width : 720 pixels Height : 576 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.460 Stream size : 125 MiB (93%) Audio ID : 192 (0xC0) Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Duration : 3mn 38s Bit rate mode : Constant Bit rate : 256 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 6.68 MiB (5%)
-
mpeg2-program stream? Yes it can contain AVC video
whether or not WMP has the splitters and filters to play it is another story...
This video plays mostly ok, but the motion isn't smooth. It seems to stutter a bit in panning shots and doesn't look fluid. Audio plays without any problem and CPU usage during playback is very low.
However, if I do nothing more than change the file extension from .mp4 to .mpg, the video plays fine. Picture and audio quality are exactly the same as far as I can tell, but the motion is smooth and fluid. I'm not sure I understand why just changing that would make a difference. I suspect that the different extension is triggering a different codec for playback (currently I'm using Shark007 V3.9.3), but I would have thought that the decoder would be selected based on the internal reference on the video stream, rather than the file extension.
-
I was going by the wiki container comparison page that says no for mpeg video files, but does say it can be contained in a PS. I don't really understand the difference between and mpeg video file, a program stream or a transport stream, so I guess that's where I got it wrong.
I've done some playing with the tweak tool. At first I didn't see any improvement when changing the preferred codec for H.264 or MP4V, regardless of which setting I tried. Under MS Codec Tweaks, it said that Media Foundation was disabled (32 & 64 bits), however selecting the option to disable Media Foundation for .mp4 in the Media Foundation options fixed the problem (and also displayed the LAV system tray icons while playing, something that was not happening before for the mp4 files)
As some further research, I uninstalled the Shark007 codec pack completely. Now the mp4 file still plays the same as it was before (badly), and the mpg file doesn't play at all. (edit: this is when mp4 files are still set to use the WMF)
So I guess that the mp4 uses the Media Foundation unless explicitly told not to, and mpg files do not use the Media Foundation at all. By changing the extension to mpg it was using the LAV codec when available.
Similar Threads
-
x264 and specifying a target filesize creates bad mp4
By sirsad in forum Video ConversionReplies: 9Last Post: 29th Apr 2012, 09:35 -
Mp4 format problem, the vid have a bad quality after i rendered it.
By aisple_aislesz in forum Newbie / General discussionsReplies: 12Last Post: 25th Apr 2011, 10:02 -
No Audio In Encore/Bad Aspect Ratio/Bad Files/Bad ISO/Bad Everything
By koberulz in forum Newbie / General discussionsReplies: 35Last Post: 24th Jan 2010, 04:48 -
how to fix: MKV to MP4 with bad ac3?
By cjh1452000 in forum Video ConversionReplies: 2Last Post: 28th May 2008, 03:11 -
VC-1 to Mpg-2 and MP4-AVC to Mpg-2
By Bruce Kuhn in forum DVD RippingReplies: 6Last Post: 10th Jan 2008, 17:06