VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I have been tinkering around with some flv files that I downloaded from CBS.com. I am trying to remux them into mp4 containers so that I can push them up to my Tivo to watch them. I am having no luck. I tried flvextract to extract the elementary streams. That seems to work fine. Then I try to remux them with either mp4box or mp4creator and I end up with a mp4 file that is roughly half the total size as the flv. It doesn't play back in MPCHC (blank screen and timeline doesn't progress).

    I found a thread on this where someone uses ffmpeg to copy both streams into a mp4, and then extracts the elementary streams with mp4box and then remuxes them again with mp4box. That doesn't work either.

    I then tried encoding the file with avisynth (ffmpegsource2+assumefps(24)) and x264 (r1745). That also doesn't play in MPCHC.

    This is on a new laptop, so it is possible that I don't have something set up correctly. Don't know.

    What am I doing wrong? Also, flvextract will output a timecode file when I demux a flv. What is that used for?

    MediaInfo on flv:
    Code:
    General
    Complete name                    : D:\encode\Test\Blue.Bloods-101-pilot.flv
    Format                           : Flash Video
    File size                        : 794 MiB
    Duration                         : 42mn 47s
    Overall bit rate                 : 2 594 Kbps
    aacaot                           : 2.000
    audiochannels                    : 2.000
    audiocodecid                     : mp4a
    avclevel                         : 40.000
    avcprofile                       : 100.000
    moovPosition                     : 28.000
    videocodecid                     : avc1
    
    Video
    Format                           : AVC
    Format/Info                      : Advanced Video Codec
    Format profile                   : High@L4.0
    Format settings, CABAC           : Yes
    Format settings, ReFrames        : 2 frames
    Muxing mode                      : Container profile=Unknown@4.0
    Duration                         : 42mn 47s
    Bit rate mode                    : Constant
    Nominal bit rate                 : 2 500 Kbps
    Width                            : 1 920 pixels
    Height                           : 1 080 pixels
    Display aspect ratio             : 16:9
    Frame rate mode                  : Constant
    Frame rate                       : 24.000 fps
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Bits/(Pixel*Frame)               : 0.050
    Color primaries                  : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
    Transfer characteristics         : BT.709-5, BT.1361
    Matrix coefficients              : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
    
    Audio
    Format                           : AAC
    Format/Info                      : Advanced Audio Codec
    Format version                   : Version 4
    Format profile                   : LC
    Format settings, SBR             : Yes
    Format settings, PS              : No
    Duration                         : 42mn 47s
    Channel(s)                       : 2 channels
    Channel positions                : Front: L R
    Sampling rate                    : 44.1 KHz
    Bit depth                        : 16 bits
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    If CBS actually lets you download unprotected files of complete episodes, that would certainly be a first for the US major TV networks. If you did something you aren't telling us to get these files, like you actually used a recording program of some kind to capture the streams, it would be useful to mention that.
    Quote Quote  
  3. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I used StreamTransport to download it.
    Quote Quote  
  4. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Nevermind. Looks like I have a codec problem that is futzing with my playback in MPCHC. Videos remuxed in ffmpeg play fine in VLC.
    Quote Quote  
  5. Member
    Join Date
    Dec 2009
    Location
    Macedonia
    Search Comp PM
    The best way to remux a flv to mp4 is with Avi demux https://www.videohelp.com/tools/AviDemux, open your flv (this works if the flash video us compressed with h264 + aac not with VP6, if the video is vp4 or vp6 you'll need to re-compress the video) select copy stream for the audio and video, for output container select mp4 and process, ffmpeg (mencoder) re-compresses the file, and doing a lossy compression on an already lossy compressed file is not a good idea. by the way mpc-hc has build in support for h264 and aac so you shouldn't get a codec problem using it.
    Quote Quote  
  6. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Thanks for the response, iana. I just did a stream copy with ffmpeg, so all that I was doing was remuxing. I prefer to have command line utilities if possible so that I can just incorporate into batch files. Thanks though!

    Your point about mpc-hc is interesting. I don't know what the exact cause of the problem is. The files play back fine using MPC-HC on my home machine. It was just on my new laptop at work using MPC-HC (VLC was fine). I figured that I just didn't have something set up correctly and was too lazy to troubleshoot it since I don't generally do much video work on the laptop.
    Quote Quote  
  7. Member
    Join Date
    Dec 2009
    Location
    Macedonia
    Search Comp PM
    well you should check your mpc-hc config, a frined of mine had a lot of trouble playing some (not all) files with mpc-hc it turned out it was the Direct Show output config, options->playback->output check and see what's the setup for DX output, I use VMR-9 (renderless) (on an XP and a 7-64 machines), if that's ok see options->Internal Filters and confirm that all the apropriate source filters are active (mp4), as well as the transform filters (aac, h264 etc) if U are having problems with the DXVA filters disable them and use the software renders they're bases on ffmpeg

    ps. I didn't know ffmpeg could do stream copy I should reread their FAQ.
    Quote Quote  
  8. Member
    Join Date
    Dec 2009
    Location
    Macedonia
    Search Comp PM
    just remembered a few months ago I was having problems rendering mp4 files in mpc and mpc-hc it turned out to be a bug in haali media splitter, K-Lite usualy installs haali so if U have it installed you should update it, the last build 14/08/2010 fixes problems with mp4 rendering.
    Quote Quote  
  9. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Thanks for the pointers on MPC-HC. Will have to take a look. Here is the batch file that I use to remux flv if you are interested. At least you can see the syntax for stream copying with ffmpeg.

    Code:
    setlocal
    set ffmpeg="D:\encode\ffmpeg.exe"
    set mp4creator="D:\encode\mp4creator\mp4creator.exe"
    
    FOR %%A IN (*.flv) DO (
    %ffmpeg% -i %%A -vcodec copy -acodec copy %%~nA.mp4
    %mp4creator% -O %%~nA.mp4
    )
    The mp4creator line isn't really necessary for standard playback, but I push my video up to my Tivo for playback, so I need to move the moov atom to the front of the file. It doesn't hurt anything to have it like that though.
    Quote Quote  
  10. txporter, do you mind if I jump in on your thread?

    I'm in a similar boat, I have a quasi-HD 1024x576 PAL 25fps FLV file that won't play in my Networked Media Tank box (but plays fine in VLC/Movist on my Mac).

    The video/audio streams inside are H.264/AAC. I'd like to get the streams sucked out and remuxed into something palatable to my NMT (it's a Chinese analog to a Popcorn Hour A110), like to either MP4 or MKV.

    I tried using avidemux on the Mac already but it crashes

    Wondering if I should be using ffmpegX or something else for this task. Or going for your command-line ffmpeg invocation. (What does "%%~nA" get expanded to?)
    Quote Quote  
  11. Member
    Join Date
    Dec 2009
    Location
    Macedonia
    Search Comp PM
    Code:
    setlocal
    set ffmpeg="D:\encode\ffmpeg.exe"
    set mp4creator="D:\encode\mp4creator\mp4creator.exe"
    
    FOR %%A IN (*.flv) DO (
    %ffmpeg% -i %%A -vcodec copy -acodec copy %%~nA.mp4
    %mp4creator% -O %%~nA.mp4
    )
    is a windows batch file you can't use it under a Unix like system, I forgot what I knew about bash scripting but the simplest thing you could do is
    Code:
    ffmpeg -i yourFile.flv -vcodec copy -acodec copy yourFile.mp4
    just remember to place ffmpeg in your path (haven't used OSX but most Linux systems have a writable $Path folder located at $HOME/bin)
    avidemux might crash if the flv file uses b frames as references (instead of i frames).
    Quote Quote  
  12. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    iana got it right.

    The windows script looks at all flv files in a directory and runs them through the DO loop. Each file is assigned to %%A when it passes through the script. %%~nA tells it to use the name of the file before the extension. Adding the .mp4 just adds that to the file name.

    example:
    %%A=video1.flv
    %%~nA=video1
    %%~nA.mp4=video1.mp4
    Quote Quote  
  13. Thanks for the tips, unfortunately ffmpeg croaked when I tried to do it this way with an error.

    I was eventually able to use iSkysoft iMedia Converter to convert the FLV file into an equivalent MKV file, so I'm good to go now.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!